------- Comment #3 from jakub at gcc dot gnu dot org  2009-06-24 15:54 -------
Option 2) is certainly the least intrusive in the compiler and you can use it
even with foo's prototype and calling it from the same CU, just use asm.
__typeof (foo) *
__attribute__ ((ifunc))
foo_ifunc (void) __asm ("foo")
{
  <return address of foo_{1,2,3}>
}
If you don't have a prototype, you can use the variant originally mentioned in
option 2).  Most users will wrap this stuff in a macro anyway and in that case
whether they use just an attribute or attribute and __asm is not a big deal.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40528

Reply via email to