Back to index

cell-binutils  2.17cvs20070401
vers4.c
Go to the documentation of this file.
00001 /*
00002  * Testcase to make sure that a versioned symbol definition in an
00003  * application correctly defines the version node, if and only if
00004  * the actual symbol is exported.  This is built both with and without
00005  * -export-dynamic.
00006  */
00007 #include <stdio.h>
00008 
00009 extern int foo ();
00010 
00011 int
00012 bar()
00013 {
00014        return 3;
00015 }
00016 
00017 int
00018 new_foo()
00019 {
00020        return 1000+bar();
00021 
00022 }
00023 
00024 __asm__(".symver new_foo,foo@@VERS_2.0");
00025 
00026 int
00027 main()
00028 {
00029   printf("%d\n", foo());
00030   return 0;
00031 }