ld: Add -static-pie tests
[deliverable/binutils-gdb.git] / ld / testsuite / ld-ifunc / pr18841b.c
1 void foo() __attribute__((ifunc("resolve_foo")));
2
3 static void foo_impl() {}
4
5 extern void abort (void);
6 void test()
7 {
8 void (*pg)(void) = foo;
9 if (pg != foo_impl)
10 abort ();
11 pg();
12 }
13
14 static void* resolve_foo()
15 {
16 extern void zoo(void);
17
18 void (*pz)(void) = zoo;
19 pz();
20 return foo_impl;
21 }
This page took 0.09089 seconds and 4 git commands to generate.