This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [IFUNC] PATCH: Add an ifunc attribute


On Fri, Jul 24, 2009 at 7:09 AM, Alan Modra<amodra@bigpond.net.au> wrote:
> On Thu, Jul 23, 2009 at 08:38:53AM -0700, H.J. Lu wrote:
>> On Thu, Jul 23, 2009 at 8:17 AM, Richard Henderson<rth@redhat.com> wrote:
>> > The dynamic linker needs to be rearranged to perform ifunc
>> > relocations last, globally. ?Otherwise this feature will be
>> > totally useless on non-x86 targets.
>
> Needs to be done this way even on x86, or else you can't write a
> reliable ifunc that reads a global var.
>
>> Sure. Linker and dynamic linker have to work together
>> to sure this within a DSO. I am not sure about doing it
>> globally though.
>
> Then you haven't thought about the problem sufficiently. ?See what fun
> we have accessing uninitialised GOT entries in the following.
>

ld.so can call a function if its dependencies have been resolved.
You have to change ld and ld.so to make sure that. It took me a
while to get it right in ld and ld.so for x86.

Which GOT entry is uninitialized? Why hasn't it been initialized?
What is this GOT entry used for?

-- 
H.J.


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