source: trunk/binutils/ld/testsuite/ld-elfvers/vers5.c

Last change on this file was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 546 bytes
Line 
1/*
2 * Testcase to verify that foo@BAR and foo@@BAR are correctly detected
3 * as a multiply defined symbol.
4 */
5const char * bar1 = "asdf";
6const char * bar2 = "asdf";
7
8int
9bar()
10{
11 return 3;
12}
13
14int
15original_foo()
16{
17 return 1+bar();
18
19}
20
21int
22old_foo()
23{
24 return 10+bar();
25
26}
27
28int
29old_foo1()
30{
31 return 100+bar();
32
33}
34
35int
36new_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
47int
48main ()
49{
50 return 0;
51}
Note: See TracBrowser for help on using the repository browser.