* ld-elfvers/vers.exp: Use -rpath in new vers19 test.
[binutils-gdb.git] / ld / testsuite / ld-elfvers / vers4.c
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 int
8 bar()
9 {
10 return 3;
11 }
12
13 int
14 new_foo()
15 {
16 return 1000+bar();
17
18 }
19
20 __asm__(".symver new_foo,foo@@VERS_2.0");
21
22 int
23 main()
24 {
25 printf("%d\n", foo());
26 return 0;
27 }