include/elf
[deliverable/binutils-gdb.git] / ld / testsuite / ld-ifunc / lib.c
1 int
2 library_func1 (void)
3 {
4 return 2;
5 }
6
7 int global = 1;
8
9 #ifdef WITH_IFUNC
10
11 static int minus_one (void) { return -1; }
12 static int zero (void) { return 0; }
13
14 void * library_func2_ifunc (void) __asm__ ("library_func2");
15 void * library_func2_ifunc (void) { return global ? minus_one : zero ; }
16 __asm__(".type library_func2, %gnu_indirect_function");
17
18 #else /* WITHOUT_IFUNC */
19
20 int
21 library_func2 (void)
22 {
23 return 3;
24 }
25
26 #endif
This page took 0.038655 seconds and 5 git commands to generate.