powerpc STT_GNU_IFUNC support, 1 of 2
Alan Modra
amodra@bigpond.net.au
Fri Jul 31 01:11:00 GMT 2009
On Thu, Jul 30, 2009 at 06:33:03AM -0700, H.J. Lu wrote:
> On Thu, Jul 30, 2009 at 5:43 AM, Alan Modra<amodra@bigpond.net.au> wrote:
> > This patch implements ld.so STT_GNU_IFUNC support for powerpc and
> > powerpc64. Â A followup patch modifies the ifunc testcases for
> > powerpc, which then all pass on powerpc64. Â powerpc fails any test
> > that has non-pic indirect function addresses, ifuncmain1static,
> > ifuncmain4static, ifuncmain5static, ifuncmain7static, ifuncmain4, and
> > ifuncmain7. Â All others pass. Â For powerpc, non-pic function pointers
> > are formed in code using addis, addi insn pairs. Â If we were to allow
> > ifunc pointers then we'd need dynamic text relocs, and thus at some
> > point during ld.so processing a writable (to update the insns) and
> > executable (to run the ifunc) text segment. Â I figure that isn't
> > acceptable, so ld complains at link time.
> >
>
> I ran into the same issue on x86. I changed the x86 linker to turn
> relocation against IFUNC symbol into relocation against its PLT/GOT
> entry. Is that possible on Power?
That's a good idea. I'll do that for ppc32 too.
--
Alan Modra
Australia Development Lab, IBM
More information about the Libc-alpha
mailing list