This is the mail archive of the
mailing list for the binutils project.
Re: PowerPC STT_GNU_IFUNC support
On Tue, Jul 14, 2009 at 08:31:59PM +0000, Joseph S. Myers wrote:
> On Fri, 10 Jul 2009, Alan Modra wrote:
> > include/elf/
> > * ppc.h (R_PPC_IRELATIVE): Add.
> > (R_PPC_RELAX32, R_PPC_RELAX32PC,
> > R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Renumber.
> > * ppc64.h (R_PPC64_IRELATIVE): Add.
> Do you have specifications for the new relocations? They'll need to be
> looked at by the Power.org ABI working group, whether for the present
> revision or a future revision. (We're thinking of working on the 64-bit
> ABI once the 32-bit ABI revision is finished, though the 64-bit ABI needs
> a lot less work done to it.)
I probably should have written a spec before I started, and I may have
realised that PowerPC needs two new relocations. On PLT entries we
need a relocation that behaves like R_PPC_JMP_SLOT, while for GOT
entries we need one that behaves like R_PPC_RELATIVE. For the new
secureplt ABI, the PLT is really just another GOT. Unsurprisingly,
R_PPC_JMP_SLOT behaves just like GOT relocs there. However, for the
old ABI, R_PPC_JMP_SLOT does a whole lot of work, creating various
branches and other data. It's rather too messy to expect one new
relocation to handle both situations.
PowerPC64 similarly needs two new relocations. In the PLT, one new
reloc needs to copy a 24 byte OPD entry, while in the GOT the other
new reloc just writes an 8 byte word.
Australia Development Lab, IBM