1 /* Test STT_GNU_IFUNC symbols in PIE:
3 1. Direct function call.
5 3. Reference from a shared library.
11 typedef int (*foo_p) (void);
20 void * foo_ifunc (void) __asm__ ("foo");
21 __asm__(".type foo, %gnu_indirect_function");
26 return ifunc_one (one);
29 extern int foo (void);
30 extern foo_p get_foo (void);
31 extern foo_p get_foo_p (void);
33 foo_p my_foo_ptr = foo;
54 if (my_foo_ptr != foo)
56 if ((*foo_ptr) () != -30)
58 if ((*my_foo_ptr) () != -30)