This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc STT_GNU_IFUNC support, 1 of 2


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]