1 /* Test STT_GNU_IFUNC symbols:
3 1. Direct function call.
5 3. Visibility with override.
10 int __attribute__ ((noinline
)) foo_hidden (void);
14 int ret_foo_protected
;
16 extern int foo (void);
17 extern int foo_protected (void);
20 typedef int (*foo_p
) (void);
24 foo_p foo_procted_ptr
= foo_protected
;
26 extern foo_p
get_foo_p (void);
27 extern foo_p
get_foo_hidden_p (void);
28 extern foo_p
get_foo_protected_p (void);
31 __attribute__ ((noinline
))
38 __attribute__ ((noinline
))
45 __attribute__ ((noinline
))
58 if ((*foo_ptr
) () != -30)
61 if (foo_procted_ptr
!= foo_protected
)
63 if ((*foo_procted_ptr
) () != -40)
71 if (ret_foo
!= -30 || (*p
) () != ret_foo
)
74 p
= get_foo_hidden_p ();
75 if (foo_hidden () != -20)
77 if (ret_foo_hidden
!= 1 || (*p
) () != ret_foo_hidden
)
80 p
= get_foo_protected_p ();
81 if (p
== foo_protected
)
83 if (foo_protected () != -40)
85 if (ret_foo_protected
!= 0 || (*p
) () != ret_foo_protected
)