PATCH: Add ifunc attribute

Paolo Bonzini bonzini@gnu.org
Fri Jun 26 15:47:00 GMT 2009


> static int
> foo1 (int x)
> {
>  return x;
> }
>
> int
> __attribute__ ((ifunc))
> foo (int)
> {
>  return foo1;
> }
>
> int
> bar (int i)
> {
>  return foo (i);
> }
>
> supports C++ since we use the same prototype for ifunc function.
> The mangled name is the same.

This feels too wrong.  The prototypes are magically changed beyond
what any other attribute does.  Look at what Roland posted.

Paolo



More information about the Gcc-patches mailing list