powerpc new PLT and GOT

Richard Henderson rth@redhat.com
Thu May 12 06:08:00 GMT 2005


On Wed, May 11, 2005 at 11:42:50PM +0930, Alan Modra wrote:
>   Note that this ABI does not specify a fixed GOT register, or even one
>   register used throughout a binary.  If a function uses a register
>   other than r30 for the GOT register, it will be specified as
>   r_addend = reg*4+2 on each R_PPC_PLTREL24 reloc used by calls.  This
>   of course will require the linker to generate different .glink code
>   than the example implementation given here.
>   To allow ld.so to support old shared libs, we need to flag a new got
>   and plt layout, so we'll define a new dynamic tag, DT_PPC_GLINK which
>   will be set to the link-time address of PLTresolve.

If the program does in fact use different got registers, then there
will have to be more than one PLTresolve.  At which point it doesn't
make sense to have DT_PPC_GLINK pick out any one of them.  I suggest
simply setting this entry to 1, as with DT_TEXTREL.



r~



More information about the Binutils mailing list