This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add ifunc attribute


Hi!

Shouldn't this mention what indirect function actually is?

On Fri, Jun 12, 2009 at 09:37:36AM -0700, H.J. Lu wrote:
> > all the issues of wrong optimizations when seeing the function body,
> > but at least the documentation needs to be more explicit about
> > this subtle difference.
> >
> 
> How about this
> 
> `ifunc ("FUNCTION")'
>      The `ifunc' attribute only applies to global function definition,
>      which causes the definition to be emitted as an indirect function.
>      For instance,
> 
>           void* f_ifunc () __attribute__ ((ifunc ("f")));
> 
>      defines `f_ifunc' to be an indirect function for `f'.  The
>      indirect function `f_ifunc', which is used by static linker and
>      dynamic linker, is never called directly in the program.

It is called the first time the `f' function would be called and returns
a pointer to the actual function that should be executed as `f'.


>      This attribute is ignored if `f_ifunc' is undefined in the same
>      translation unit.
> 
>      See `STT_GNU_IFUNC' specified in `ifunc.txt' at
>      `http://groups.google.com/group/generic-abi/files' for details.
> 
>      Not all target machines support this attribute.

-- 
				Petr "Pasky" Baudis
The lyf so short, the craft so long to lerne. -- Chaucer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]