diff options
author | Edgar E. Iglesias <edgar@axis.com> | 2012-09-27 17:02:38 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-09-27 17:46:10 +0200 |
commit | 6ef7b2597cd3f4edf851a7b3516aef7449e554ad (patch) | |
tree | 5f3820dcdfe888b3fdb63d12ae16566625c9ef18 /proc.c | |
parent | 9f274ffc8d38bd73c31c2b181f25349b813cb9dd (diff) | |
download | ltrace-6ef7b2597cd3f4edf851a7b3516aef7449e554ad.tar.gz |
mipsel: Add mips specific symbol info loading
MIPS needs a backend specific way to load symbol info.
We add fields to the symbol representation to keep track
of the state of the dynamic symbol.
At arch_dynlink_done we go through the symbols that are
connected to a GOT entry but that where not resolved at
startup time (e.g function pointers to external syms).
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -637,6 +637,19 @@ breakpoint_for_symbol(struct library_symbol *libsym, void *data) assert(proc->leader == proc); bp_addr = sym2addr(proc, libsym); + + /* For external function pointers, MIPS brings in stub-less funcs + * that point to zero at startup. These symbols get resolved by + * the dynamic linker and are ready to use at arch_dynlink_done(). + * + * Allow the backend to add these into the process representation + * but don't put breakpoints at this point. Let the backend fix that + * up later. */ + if (bp_addr == 0 && libsym->plt_type == LS_TOPLT_GOTONLY) { + /* Don't add breakpoints yet. */ + return CBS_CONT; + } + /* If there is an artificial breakpoint on the same address, * its libsym will be NULL, and we can smuggle our libsym * there. That artificial breakpoint is there presumably for |