"Thierry@vnet" <[email protected]> writes: > Still working on the port, the first test from > ltrace.main/trace-irelative.exp fails because the current implementation > I have > scan for STUB symbols and had them to the plt_stub table. > When I populate, I am properly checking over these symbols. > The problem is that the plt_relocs vector used to populate plt is not > updated (so I don't have any breakpoint to the symbol xyz in that > case). Should I review the complete logic, or at end of > arch_elf_init() should I > look for all names in plt_stub area and check if it matches an entry in > relocate vector ? > Any better idea ?
plt_relocs is an interface between frontend and backend. The structure is primed from the .rela.plt, but the backend is free to add more. The PPC backend in particular looks into .rela.dyn, and copies any IRELATIVE relocations found there to the plt_relocs structure. Later on, it can tell an irelative relocation by looking at its type, and for those, it puts breakpoints to the IFUNC resolver instead to a PLT entry (because there is none). I'm not sure how ELFv2 does things on PPC, but similar approach should work there as well. You can put what you need to plt_relocs, and adjust arch_plt_sym_val and arch_elf_add_plt_entry (or possibly other backend hooks) to answer what you need them to. Hope this helps, PM _______________________________________________ Ltrace-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/ltrace-devel
