bfd/
[binutils.git] / ld / testsuite / ld-elfvers / vers4.c
blob453f2eb4d9c951f98dfa67e7567ade524197fed7
1 /*
2 * Testcase to make sure that a versioned symbol definition in an
3 * application correctly defines the version node, if and only if
4 * the actual symbol is exported. This is built both with and without
5 * -export-dynamic.
6 */
7 #include <stdio.h>
9 extern int foo ();
11 int
12 bar()
14 return 3;
17 int
18 new_foo()
20 return 1000+bar();
24 __asm__(".symver new_foo,foo@@VERS_2.0");
26 int
27 main()
29 printf("%d\n", foo());
30 return 0;