xref: /llvm-project/bolt/test/Inputs/ifunc.c (revision 31ac3d092bd047ab2c0bdcb6d527736472b9d4a6)
1 // This test checks that IFUNC trampoline is properly recognised by BOLT
2 
3 static void foo() {}
4 static void bar() {}
5 
6 extern int use_foo;
7 
8 static void *resolver_foo(void) { return use_foo ? foo : bar; }
9 
10 __attribute__((ifunc("resolver_foo"))) void ifoo();
11 
12 void _start() { ifoo(); }
13