[PATCH v4 3/3] Fix: Priotirize symbol table lookup for ppc64le
Mark Wielaard
mjw@redhat.com
Wed Apr 22 13:48:00 GMT 2015
On Mon, 2015-04-20 at 15:59 +0530, Hemant Kumar wrote:
> PPC64 ELF ABI v2 has a Global entry point and a local entry point
> for the functions. We need the Local entry point in order to probe
> these functions. However, the DIE for these functions in debuginfo
> return the function.entrypc which is same as the global entry point.
> The local entry point is not encoded in the debuginfo of the ELFs. The
> offset to local entry point is however encoded in the st_other field
> of these symbols in the symbol table.
> We need to use this field to adjust the sym.st_value to actually point
> to the local entry point instead of the global entry point.
>
> This patch is in relation to this bug :
> https://sourceware.org/bugzilla/show_bug.cgi?id=17638
>
> So, while adding symbols to the sym_table, we add an offset of
> PPC64_LOCAL_ENTRY_OFFSET(sym.st_other) to st_value.
> And when the function address is queried in query_dwarf_func(), we give
> priority to the cached sym_table, where we can retrieve the adjusted
> entry address of the function. If we don't get any address from the
> symbol table, then we proceed to get from the debuginfo.
>
> Macro definition PPC64_LOCAL_ENTRY_OFFSET has been picked up from glibc.
> It won't be defined if we are building systemtap on a machine having
> older elf.h and hence, won't recognize PPC64_LOCAL_ENTRY_OFFSET.
Looks good. Pushed with one tiny change (in the commit message):
s/Priotirize/Prioritize/
Thanks,
Mark
More information about the Systemtap
mailing list