| 1 |
/* |
| 2 |
* Testcase to verify that foo@BAR and foo@@BAR are correctly detected |
| 3 |
* as a multiply defined symbol. |
| 4 |
*/ |
| 5 |
const char * bar1 = "asdf"; |
| 6 |
const char * bar2 = "asdf"; |
| 7 |
|
| 8 |
int |
| 9 |
bar() |
| 10 |
{ |
| 11 |
return 3; |
| 12 |
} |
| 13 |
|
| 14 |
int |
| 15 |
original_foo() |
| 16 |
{ |
| 17 |
return 1+bar(); |
| 18 |
|
| 19 |
} |
| 20 |
|
| 21 |
int |
| 22 |
old_foo() |
| 23 |
{ |
| 24 |
return 10+bar(); |
| 25 |
|
| 26 |
} |
| 27 |
|
| 28 |
int |
| 29 |
old_foo1() |
| 30 |
{ |
| 31 |
return 100+bar(); |
| 32 |
|
| 33 |
} |
| 34 |
|
| 35 |
int |
| 36 |
new_foo() |
| 37 |
{ |
| 38 |
return 1000+bar(); |
| 39 |
|
| 40 |
} |
| 41 |
|
| 42 |
__asm__(".symver original_foo,foo@"); |
| 43 |
__asm__(".symver old_foo,foo@VERS_1.1"); |
| 44 |
__asm__(".symver old_foo1,foo@VERS_1.2"); |
| 45 |
__asm__(".symver new_foo,foo@@VERS_1.2"); |
| 46 |
|
| 47 |
int |
| 48 |
main () |
| 49 |
{ |
| 50 |
return 0; |
| 51 |
} |