Commit | Line | Data |
---|---|---|
c8a8d3bb ILT |
1 | /* |
2 | * Testcase to make sure that if we externally reference a versioned symbol | |
3 | * that we always get the right one. | |
4 | */ | |
5 | ||
6 | ||
7 | foo_1() | |
8 | { | |
9 | return 1034; | |
10 | } | |
11 | ||
12 | foo_2() | |
13 | { | |
14 | return 1343; | |
15 | } | |
16 | ||
17 | foo_3() | |
18 | { | |
19 | return 1334; | |
20 | } | |
21 | ||
22 | main() | |
23 | { | |
24 | printf("Expect 4, get %d\n", foo_1()); | |
25 | printf("Expect 13, get %d\n", foo_2()); | |
26 | printf("Expect 103, get %d\n", foo_3()); | |
27 | } | |
28 | ||
29 | __asm__(".symver foo_1,show_foo@"); | |
30 | __asm__(".symver foo_2,show_foo@VERS_1.1"); | |
31 | __asm__(".symver foo_3,show_foo@@VERS_1.2"); |