| 1 | /* |
| 2 | * Testcase to verify that reference to foo@BAR and a definition of foo@@BAR |
| 3 | * are not treated as a multiple def. |
| 4 | */ |
| 5 | #include "vers.h" |
| 6 | |
| 7 | const char * bar1 = "asdf"; |
| 8 | const char * bar2 = "asdf"; |
| 9 | |
| 10 | extern int old_foo1(); |
| 11 | |
| 12 | int |
| 13 | bar() |
| 14 | { |
| 15 | return 3; |
| 16 | } |
| 17 | |
| 18 | int |
| 19 | original_foo() |
| 20 | { |
| 21 | return 1+bar(); |
| 22 | |
| 23 | } |
| 24 | |
| 25 | int |
| 26 | old_foo() |
| 27 | { |
| 28 | return 10+bar(); |
| 29 | |
| 30 | } |
| 31 | |
| 32 | int |
| 33 | new_foo() |
| 34 | { |
| 35 | return 1000+bar(); |
| 36 | |
| 37 | } |
| 38 | |
| 39 | int |
| 40 | main() |
| 41 | { |
| 42 | old_foo1(); |
| 43 | return 0; |
| 44 | } |
| 45 | |
| 46 | FUNC_SYMVER(original_foo, foo@); |
| 47 | FUNC_SYMVER(old_foo, foo@VERS_1.1); |
| 48 | FUNC_SYMVER(old_foo1, foo@VERS_1.2); |
| 49 | FUNC_SYMVER(new_foo, foo@@VERS_1.2); |