This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 2/2] Fix: ppc64le support



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]