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, 2 of 2


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.


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