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: 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, 08 Apr 2015 16:50:04 +0200
- 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>
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
Like the other PPC64 macros you probably need to #define EF_PPC64_ABI 3
if not yet defined in elf.h.
Cheers,
Mark