Support mcount/gprof test with GCC defaulting to PIE
[glibc.git] / sysdeps / generic / ifunc-sel.h
blob1fff4059ccb05bf181672f7cbb3c9b32bb2f096d
1 /* Used by the elf ifunc tests. */
2 #ifndef ELF_IFUNC_SEL_H
3 #define ELF_IFUNC_SEL_H 1
5 extern int global;
7 static inline void *
8 inhibit_stack_protector
9 ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void))
11 switch (global)
13 case 1:
14 return f1;
15 case -1:
16 return f2;
17 default:
18 return f3;
22 static inline void *
23 inhibit_stack_protector
24 ifunc_one (int (*f1) (void))
26 return f1;
28 #endif