]> sourceware.org Git - systemtap.git/commit
Prioritize symbol table lookup for ppc64le
authorHemant Kumar <hemant@linux.vnet.ibm.com>
Mon, 20 Apr 2015 10:29:24 +0000 (15:59 +0530)
committerMark Wielaard <mjw@redhat.com>
Wed, 22 Apr 2015 13:41:23 +0000 (15:41 +0200)
commitb4c6a4b1cd00fd1681d76de6850a88aa516c4fef
treeee86ad3d11bb0cfe57bf6938919527fd53af5adc
parent66ac435c7cb7b907642ebfd4daf4d84cdca242a3
Prioritize symbol table lookup for ppc64le

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.

Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com>
tapsets.cxx
This page took 0.026148 seconds and 5 git commands to generate.