PowerPC STT_GNU_IFUNC support

H.J. Lu hjl.tools@gmail.com
Thu Jul 23 21:20:00 GMT 2009


On Wed, Jul 22, 2009 at 11:26 PM, Alan Modra<amodra@bigpond.net.au> wrote:
> On Wed, Jul 22, 2009 at 10:32:23PM -0700, H.J. Lu wrote:
>> Can you just use R_PPC_IRELATIVE? I was thinking to add a new
>> JMP_SLOT relocation for x86. But it turned out not necessary.
>
> You can use just one relocation on x86 because you have .got.plt.
> The old powerpc abi has quite an unusual PLT.  It is a bss section,
> so the reloc needs to create the entire plt entry.  See
> glibc/sysdeps/powerpc/powerpc32/dl-machine.c.  It seems a silly idea
> to use just one reloc that does wildly different things depending
> on the section to which it applies.
>

I am not sure if it should make a difference. An IFUNC symbol
is just one level of indirection. As long as ld.so can call an IFUNC
function, one new relocation, which is used to handle an IFUNC
symbol without symbol lookup, should be enough.

-- 
H.J.



More information about the Binutils mailing list