This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH v3 2/2] Fix: ppc64le support
- From: Hemant Kumar <hemant at linux dot vnet dot ibm dot com>
- To: Mark Wielaard <mjw at redhat 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: Thu, 09 Apr 2015 21:51:48 +0530
- Subject: Re: [PATCH v3 2/2] Fix: ppc64le support
- Authentication-results: sourceware.org; auth=none
- References: <1427463736-4258-1-git-send-email-hemant at linux dot vnet dot ibm dot com> <1427463736-4258-2-git-send-email-hemant at linux dot vnet dot ibm dot com> <1428504604 dot 5539 dot 94 dot camel at bordewijk dot wildebeest dot org>
On 04/08/2015 08:20 PM, Mark Wielaard wrote:
Hi Hemant,
This looks good to me. One comment.
On Fri, 2015-03-27 at 19:12 +0530, Hemant Kumar wrote:
+ /* Giving priority to sym_table for ppc64*/
+ if ((em->e_machine == EM_PPC64) && (q->dw.mod_info->sym_table))
[...]
+ /*
+ * For ELF ABI v2 on PPC64 LE, we need to adjust sym.st_value corresponding
+ * to the bits of sym.st_other. These bits will tell us what's the offset
+ * of the local entry point from the global entry point.
+ *
+ * st_other field is currently only used with ABIv2 on ppc64
+ */
+ if ((em->e_machine == EM_PPC64) && (GELF_ST_TYPE(sym.st_info) == STT_FUNC)
+ && sym.st_other)
+ addr += PPC64_LOCAL_ENTRY_OFFSET(sym.st_other);
In both cases I believe the check should be:
em->e_machine == EM_PPC64 && (em->e_flags & EF_PPC64_ABI) == 2
Nice idea, thanks.
Will add this check in the next version.
Like the other PPC64 macros you probably need to #define EF_PPC64_ABI 3
if not yet defined in elf.h.
Sure, will define EF_PPC64_ABI if not defined.
Cheers,
Mark
--
Thanks,
Hemant Kumar