[IFUNC] PATCH: Add an ifunc attribute

Richard Henderson rth@redhat.com
Thu Jul 23 15:53:00 GMT 2009


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.

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


r~



More information about the Gcc-patches mailing list