PATCH: Add ifunc attribute

Paolo Bonzini bonzini@gnu.org
Wed Jun 24 14:11:00 GMT 2009


>> __typeof (foo) *
>> __attribute__ ((ifunc ("foo")))
>> foo_ifunc (void)
>> {
>>  <return address of foo_{1,2,3}>
>> }
>>
>> you could call foo_ifunc if you wish in principle, and the header file only
>> has the prototype of foo as expected.
> 
> Since foo_ifunc isn't generated, you can't call foo_ifunc.

So I guess mine is the fourth proposal. :-)  Same as 1, but also 
generate foo_ifunc, for example via an alias.

However, there is an additional catch.  What happens in option 1 if 
foo_ifunc is static?  With mine, foo would not be static but foo_ifunc 
would be.



More information about the Libc-alpha mailing list