Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | /* |
2 | * Testcase to make sure that if we externally reference a versioned symbol | |
3 | * that we always get the right one. | |
4 | */ | |
0cd9f5f0 | 5 | #include <stdio.h> |
252b5132 RH |
6 | |
7 | int | |
8 | foo_1() | |
9 | { | |
10 | return 1034; | |
11 | } | |
12 | ||
13 | int | |
14 | foo_2() | |
15 | { | |
16 | return 1343; | |
17 | } | |
18 | ||
19 | int | |
20 | foo_3() | |
21 | { | |
22 | return 1334; | |
23 | } | |
24 | ||
25 | int | |
26 | main() | |
27 | { | |
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; | |
32 | } | |
33 | ||
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"); |