Back to index

cell-binutils  2.17cvs20070401
vers9.c
Go to the documentation of this file.
00001 /*
00002  * Testcase to verify that reference to foo@BAR and a definition of foo@@BAR
00003  * are not treated as a multiple def.
00004  */
00005 const char * bar1 = "asdf";
00006 const char * bar2 = "asdf";
00007 
00008 extern int old_foo1();
00009 
00010 int
00011 bar()
00012 {
00013        return 3;
00014 }
00015 
00016 int
00017 original_foo()
00018 {
00019        return 1+bar();
00020 
00021 }
00022 
00023 int
00024 old_foo()
00025 {
00026        return 10+bar();
00027 
00028 }
00029 
00030 int
00031 new_foo()
00032 {
00033        return 1000+bar();
00034 
00035 }
00036 
00037 int
00038 main()
00039 {
00040   old_foo1();
00041   return 0;
00042 }
00043 
00044 __asm__(".symver original_foo,foo@");
00045 __asm__(".symver old_foo,foo@VERS_1.1");
00046 __asm__(".symver old_foo1,foo@VERS_1.2");
00047 __asm__(".symver new_foo,foo@@VERS_1.2");