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");
24 inhibit_stack_protector
27 return ifunc_one (one
);
30 extern int foo (void);
31 extern foo_p
get_foo (void);
32 extern foo_p
get_foo_p (void);
34 foo_p my_foo_ptr
= foo
;
55 if (my_foo_ptr
!= foo
)
57 if ((*foo_ptr
) () != -30)
59 if ((*my_foo_ptr
) () != -30)