This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: powerpc STT_GNU_IFUNC support, 2 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:47:18 -0700
- Subject: Re: powerpc STT_GNU_IFUNC support, 2 of 2
- References: <20090730124535.GE14121@bubble.grove.modra.org>
On Thu, Jul 30, 2009 at 5:45 AM, Alan Modra<amodra@bigpond.net.au> wrote:
> This patch modifies the ifunc testcase for powerpc. ?The changes are:
>
> a) Don't use external global vars in indirect functions. ?Any variable
> used in an indirect function must be locally defined, ie. at least
> with protected visibility. ?Otherwise you must use a GOT entry to
> access the variable, and it's trivially easy to construct cases where
> the GOT entry won't be relocated at the time the ifunc runs. ?Or else
> ld.so will need to run two passes over relocations or somesuch to
> guarantee that ifunc relocs are applied last, globally. ?I figure it
> is bad to write testcases that might lead to wrong user expectations.
>
> b) Implement powerpc indirect functions in assembly. ?Returning
> pic function addresses in C on powerpc requires GOT entries.
Isn't it the same for x86? I guess Power is really different.
--
H.J.