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