1/* Used by the elf ifunc tests. */
2#ifndef ELF_IFUNC_SEL_H
3#define ELF_IFUNC_SEL_H 1
4
5extern int global;
6
7static inline void *
8inhibit_stack_protector
9ifunc_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
22static inline void *
23inhibit_stack_protector
24ifunc_one (int (*f1) (void))
25{
26 return f1;
27}
28#endif
29

source code of glibc/sysdeps/generic/ifunc-sel.h