[PATCH v3 2/2] Fix: ppc64le support
Hemant Kumar
hemant@linux.vnet.ibm.com
Thu Apr 9 16:22:00 GMT 2015
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
More information about the Systemtap
mailing list