Import binutils 2.18
[nacl-binutils.git] / ld / testsuite / ld-elfvers / vers15.c
blob4e22cac092aac1bacba517f2f95d8be649993bd0
1 /*
2 * Testcase to make sure that if we externally reference a versioned symbol
3 * that we always get the right one.
4 */
5 #include <stdio.h>
7 int
8 foo_1()
10 return 1034;
13 int
14 foo_2()
16 return 1343;
19 int
20 foo_3()
22 return 1334;
25 int
26 main()
28 printf("Expect 4, get %d\n", foo_1());
29 printf("Expect 13, get %d\n", foo_2());
30 printf("Expect 103, get %d\n", foo_3());
31 return 0;
34 __asm__(".symver foo_1,show_foo@");
35 __asm__(".symver foo_2,show_foo@VERS_1.1");
36 __asm__(".symver foo_3,show_foo@@VERS_1.2");