1 /* Test STT_GNU_IFUNC symbols without direct function call. */
5 /* Can't use __attribute__((visibility("protected"))) until the GCC bug:
7 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
10 asm (".protected global");
30 void * foo_ifunc (void) __asm__ ("foo");
31 __asm__(".type foo, %gnu_indirect_function");
36 return ifunc_sel (one
, minus_one
, zero
);
39 void * foo_hidden_ifunc (void) __asm__ ("foo_hidden");
40 __asm__(".type foo_hidden, %gnu_indirect_function");
43 foo_hidden_ifunc (void)
45 return ifunc_sel (minus_one
, one
, zero
);
48 void * foo_protected_ifunc (void) __asm__ ("foo_protected");
49 __asm__(".type foo_protected, %gnu_indirect_function");
52 foo_protected_ifunc (void)
54 return ifunc_sel (one
, zero
, minus_one
);
57 /* Test hidden indirect function. */
58 __asm__(".hidden foo_hidden");
60 /* Test protected indirect function. */
61 __asm__(".protected foo_protected");