This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH v4 3/3] Fix: Priotirize symbol table lookup for ppc64le
- From: Mark Wielaard <mjw at redhat dot com>
- To: Hemant Kumar <hemant at linux dot vnet dot ibm dot com>
- Cc: systemtap at sourceware dot org, naveen dot n dot rao at linux dot vnet dot ibm dot com, ulrich dot weigand at de dot ibm dot com, uweigand at gcc dot gnu dot org, anton at samba dot org, fche at redhat dot com
- Date: Wed, 22 Apr 2015 15:48:36 +0200
- Subject: Re: [PATCH v4 3/3] Fix: Priotirize symbol table lookup for ppc64le
- Authentication-results: sourceware.org; auth=none
- References: <1429525764-23471-1-git-send-email-hemant at linux dot vnet dot ibm dot com> <1429525764-23471-3-git-send-email-hemant at linux dot vnet dot ibm dot com>
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