1 /* Test STT_GNU_IFUNC symbols:
3 1. Direct function call.
5 3. Visibility with override.
12 int ret_foo_protected
;
14 extern int foo (void);
15 extern int foo_protected (void);
18 typedef int (*foo_p
) (void);
22 foo_p foo_procted_ptr
= foo_protected
;
24 extern foo_p
get_foo_p (void);
25 extern foo_p
get_foo_hidden_p (void);
26 extern foo_p
get_foo_protected_p (void);
29 __attribute__ ((noinline
))
36 __attribute__ ((noinline
))
43 __attribute__ ((noinline
))
56 if ((*foo_ptr
) () != -30)
59 if (foo_procted_ptr
!= foo_protected
)
61 if ((*foo_procted_ptr
) () != -40)
69 if (ret_foo
!= -30 || (*p
) () != ret_foo
)
72 p
= get_foo_hidden_p ();
73 if (foo_hidden () != -20)
75 if (ret_foo_hidden
!= 1 || (*p
) () != ret_foo_hidden
)
78 p
= get_foo_protected_p ();
79 if (p
== foo_protected
)
81 if (foo_protected () != -40)
83 if (ret_foo_protected
!= 0 || (*p
) () != ret_foo_protected
)