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 | */ | |
5 | ||
6 | int | |
7 | foo_1() | |
8 | { | |
9 | return 1034; | |
10 | } | |
11 | ||
12 | int | |
13 | foo_2() | |
14 | { | |
15 | return 1343; | |
16 | } | |
17 | ||
18 | int | |
19 | foo_3() | |
20 | { | |
21 | return 1334; | |
22 | } | |
23 | ||
24 | int | |
25 | main() | |
26 | { | |
27 | printf("Expect 4, get %d\n", foo_1()); | |
28 | printf("Expect 13, get %d\n", foo_2()); | |
29 | printf("Expect 103, get %d\n", foo_3()); | |
30 | return 0; | |
31 | } | |
32 | ||
33 | __asm__(".symver foo_1,show_foo@"); | |
34 | __asm__(".symver foo_2,show_foo@VERS_1.1"); | |
35 | __asm__(".symver foo_3,show_foo@@VERS_1.2"); |