Back to index

cell-binutils  2.17cvs20070401
vers6.c
Go to the documentation of this file.
00001 /*
00002  * Testcase to make sure that if we externally reference a versioned symbol
00003  * that we always get the right one.
00004  */
00005 #include <stdio.h>
00006 
00007 extern int foo_1();
00008 extern int foo_2();
00009 extern int foo_3();
00010 extern int foo_4();
00011 
00012 int
00013 main()
00014 {
00015   printf("Expect 4,    get %d\n", foo_1());
00016   printf("Expect 13,   get %d\n", foo_2());
00017   printf("Expect 103,  get %d\n", foo_3());
00018   printf("Expect 1003, get %d\n", foo_4());
00019   return 0;
00020 }
00021 
00022 __asm__(".symver foo_1,show_foo@");
00023 __asm__(".symver foo_2,show_foo@VERS_1.1");
00024 __asm__(".symver foo_3,show_foo@VERS_1.2");
00025 __asm__(".symver foo_4,show_foo@VERS_2.0");