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 Thu, Jul 23, 2009 at 8:17 AM, Richard Henderson<rth@redhat.com> wrote:
> On 07/23/2009 07:35 AM, H.J. Lu wrote:
>>
>> There are some limitations on STT_GNU_IFUNC functions:
>>
>> 1. Use other global data/function which may need relocations first.
>> 2. Call other global functions.
>>
>> You just have to avoid those cases.
>
> Nr 1 is impossible on most RISC targets. ?They are *forced*
> to use the GOT (requiring a relocation) to take the address
> of the function it wants to return. ?They have *no* other
> alternative.

Isn't this also the case for IFUNC in a DSO even on x86?

> The dynamic linker needs to be rearranged to perform ifunc
> relocations last, globally. ?Otherwise this feature will be
> totally useless on non-x86 targets.
>

Sure. Linker and dynamic linker have to work together
to sure this within a DSO. I am not sure about doing it
globally though.

-- 
H.J.


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