[IFUNC] PATCH: Add an ifunc attribute

H.J. Lu hjl.tools@gmail.com
Sun Jun 28 21:24:00 GMT 2009


On Sun, Jun 28, 2009 at 12:31 PM, Joseph S.
Myers<joseph@codesourcery.com> wrote:
> On Sun, 28 Jun 2009, H.J. Lu wrote:
>
>> Some ABIs have the leading underscore in the symbol name.
>
> The ELF gABI specifies that they do not.  "External C symbols have the
> same names in C and object files' symbol tables.".  STT_GNU_IFUNC is
> ELF-specific.

IFUNC works on local symbols also.

>
>> How does a programmer use asm () portably?
>
> Stringize __USER_LABEL_PREFIX__ if you care about that case.
>

When using asm to change C++ symbol name, you have to mangle it
by hand. When you change the prototype of the ifunc function,
you have to mangle the symbol name again.  Should we ask gcc
users which approach is better?

Thanks.


-- 
H.J.



More information about the Gcc-patches mailing list