1 | /* Used by the elf ifunc tests. */ |
---|---|
2 | #ifndef ELF_IFUNC_SEL_H |
3 | #define ELF_IFUNC_SEL_H 1 |
4 | |
5 | extern int global; |
6 | |
7 | static inline void * |
8 | inhibit_stack_protector |
9 | ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void)) |
10 | { |
11 | switch (global) |
12 | { |
13 | case 1: |
14 | return f1; |
15 | case -1: |
16 | return f2; |
17 | default: |
18 | return f3; |
19 | } |
20 | } |
21 | |
22 | static inline void * |
23 | inhibit_stack_protector |
24 | ifunc_one (int (*f1) (void)) |
25 | { |
26 | return f1; |
27 | } |
28 | #endif |
29 |