[Ltrace-devel] [PATCH v2] Tracing PLT-less MIPS binaries

Faraz Shahbazker faraz.shahbazker at imgtec.com
Thu Feb 5 22:41:10 UTC 2015


Hi,

Dropped one variable, replacing pc with lladdr throughout.

I found and fixed 2 other issues while testing:

1. The check for whether GOT entries are already biased in
arch_elf_add_plt_entry needed update. There are 3 conditions under which
the GOT entries will be biased:
- Non-PIE ELFs obviously have biased GOT entries
- Pre-linked ELFs, likewise
- when ltrace attaches to an already running process

To capture the last one, I've added a check for whether proc->pid occurs 
in options.h:opt_p - not sure if there is a simpler way of performing
this check.

2. mips_unresolved_data is shallow copied for each cloned symbol. If a
child detaches whilst a symbol remains in NEED_UNRESOLVE state, then
we shouldn't free its unresolve_data because the parent/siblings may 
still need it. I've added a ref_count field to the struct to fix this.
I am not sure how(if at all) PPC tackles this problem.

Regards,
Faraz Shahbazker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Tracing-PLT-less-MIPS-binaries.patch
Type: text/x-patch
Size: 9362 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20150205/bae110ce/attachment.bin>


More information about the Ltrace-devel mailing list