1 void foo() __attribute__((ifunc("resolve_foo"))); 2 foo_impl()3 static void foo_impl() {} 4 extern void zoo(void); 5 void (*pz)(void) = zoo; 6 test()7 void test() 8 { 9 void (*pg)(void) = foo; 10 pg(); 11 } 12 resolve_foo()13 static void* resolve_foo() 14 { 15 pz(); 16 return foo_impl; 17 } 18