Commit | Line | Data |
---|---|---|
5f7cbeec L |
1 | static int |
2 | one (void) | |
3 | { | |
4 | return 1; | |
5 | } | |
6 | ||
7 | static int | |
8 | minus_one (void) | |
9 | { | |
10 | return -1; | |
11 | } | |
12 | ||
13 | void * foo_ifunc (void) __asm__ ("foo"); | |
14 | __asm__(".type foo, %gnu_indirect_function"); | |
15 | ||
16 | void * | |
17 | foo_ifunc (void) | |
18 | { | |
19 | return one; | |
20 | } | |
21 | ||
22 | void * bar_ifunc (void) __asm__ ("bar"); | |
23 | __asm__(".type bar, %gnu_indirect_function"); | |
24 | ||
25 | void * | |
26 | bar_ifunc (void) | |
27 | { | |
28 | return minus_one; | |
29 | } |