This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: powerpc STT_GNU_IFUNC support, 1 of 2
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: libc-alpha at sourceware dot org, Steven Munroe <sjmunroe at us dot ibm dot com>
- Date: Thu, 30 Jul 2009 06:33:03 -0700
- Subject: Re: powerpc STT_GNU_IFUNC support, 1 of 2
- References: <20090730124350.GD14121@bubble.grove.modra.org>
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?
--
H.J.