Commit | Line | Data |
---|---|---|
252b5132 RH |
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 | */ | |
0cd9f5f0 | 7 | #include <stdio.h> |
b9e33f30 | 8 | #include "vers.h" |
0cd9f5f0 ILT |
9 | |
10 | extern int foo (); | |
11 | ||
252b5132 RH |
12 | int |
13 | bar() | |
14 | { | |
15 | return 3; | |
16 | } | |
17 | ||
18 | int | |
19 | new_foo() | |
20 | { | |
21 | return 1000+bar(); | |
22 | ||
23 | } | |
24 | ||
4e95fbcd | 25 | FUNC_SYMVER(new_foo, foo@@VERS_2.0); |
252b5132 RH |
26 | |
27 | int | |
28 | main() | |
29 | { | |
30 | printf("%d\n", foo()); | |
31 | return 0; | |
32 | } |