PATCH: Add ifunc attribute

Jakub Jelinek jakub@redhat.com
Wed Jun 24 15:47:00 GMT 2009


On Wed, Jun 24, 2009 at 08:19:17AM -0700, H.J. Lu wrote:
> > I still fail to see why we need the ifunc argument here though.
> >
> > __typeof (foo) *
> > __attribute__((ifunc))
> > foo_ifunc (void) asm("foo")
> > {
> >  <return address of foo_{1,2,3}>
> > }
> >
> > works for me.  Adding __attribute__((alias("foo_ifunc"))) should
> > make an alias available that you could call directly if you really
> > want to.
> >
> 
> Is asm("foo") required for ifunc function?

If you have foo prototype in current scope, yes, what's wrong with that
though?

	Jakub



More information about the Gcc-patches mailing list