Fix x86-64 build without multiarch.
[glibc.git] / elf / ifuncdep2.c
blob758bae1932e493583d145005b323091af8da7a8a
1 /* Test 3 STT_GNU_IFUNC symbols. */
3 #include "ifunc-sel.h"
5 int global __attribute__ ((visibility ("protected"))) = -1;
7 static int
8 one (void)
10 return 1;
13 static int
14 minus_one (void)
16 return -1;
19 static int
20 zero (void)
22 return 0;
25 void * foo1_ifunc (void) __asm__ ("foo1");
26 __asm__(".type foo1, %gnu_indirect_function");
28 void *
29 foo1_ifunc (void)
31 return ifunc_sel (one, minus_one, zero);
34 void * foo2_ifunc (void) __asm__ ("foo2");
35 __asm__(".type foo2, %gnu_indirect_function");
37 void *
38 foo2_ifunc (void)
40 return ifunc_sel (minus_one, one, zero);
43 void * foo3_ifunc (void) __asm__ ("foo3");
44 __asm__(".type foo3, %gnu_indirect_function");
46 void *
47 foo3_ifunc (void)
49 return ifunc_sel (one, zero, minus_one);