[GOLD] ifunc tests

Alan Modra amodra@gmail.com
Thu Mar 7 00:12:00 GMT 2013

On Wed, Mar 06, 2013 at 03:44:41PM -0800, Ian Lance Taylor wrote:
> On Wed, Mar 6, 2013 at 3:39 PM, Alan Modra <amodra@gmail.com> wrote:
> > Yes, we do the same on powerpc (*), but it only works for relocs in a
> > single binary, not when the ifunc relocation in a shared library uses
> > a resolver function in another shared library or the main app.  In
> > that case GOT relocs may not have been applied.  Exactly this
> > situation occurs in ifuncmain6pie/ifuncmod6.so.
> Argh.
> OK, next (unrelated) thought: perhaps the PPC code should just safely
> retrieve global into a local variable, rather than writing the whole
> switch statement in assembler.
>   int i;
> #ifdef __powerpc__
>   asm
> #else
>   i = global;
> #endif
>   switch (i)

Funny enough, I wrote the ifunc-sel.h modifications that way first.
Then I looked at glibc/sysdeps/powerpc/ifunc-sel.h, and decided to
import that in case someone decides to copy more ifunc tests from

Alan Modra
Australia Development Lab, IBM

More information about the Binutils mailing list