PATCH: Add ifunc attribute

Richard Henderson rth@twiddle.net
Wed Jun 24 16:46:00 GMT 2009


On 06/24/2009 03:22 AM, Paolo Bonzini wrote:
> Looks a bit too like DWIM and too little like a specification. I think I
> prefer option 1, in some cases you may want to call the trampoline and
> having it accessible can help. With
>
> __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.

I think I have to agree with you, Paolo.  This example is the sort of
thing I'd expect to actually be writing.


r~



More information about the Libc-alpha mailing list