arm: Define elf_backend_extern_protected_data to 0 [PR 18705]
[binutils-gdb.git] / ld / testsuite / ld-ifunc / pr18808b.c
1 int foo (int) __attribute__ ((ifunc ("resolve_foo")));
2 extern void abort (void);
3
4 static int
5 foo_impl (int x)
6 {
7 return x;
8 }
9
10 void
11 bar (void)
12 {
13 int (*f)(int) = foo;
14
15 if (foo (5) != 5)
16 abort ();
17
18 if (f (42) != 42)
19 abort ();
20 }
21
22 void *
23 resolve_foo (void)
24 {
25 return (void *) foo_impl;
26 }