Back to index

cell-binutils  2.17cvs20070401
vers15.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 int
00008 foo_1()
00009 {
00010   return 1034;
00011 }
00012 
00013 int
00014 foo_2()
00015 {
00016   return 1343;
00017 }
00018 
00019 int
00020 foo_3()
00021 {
00022   return 1334;
00023 }
00024 
00025 int
00026 main()
00027 {
00028   printf("Expect 4,    get %d\n", foo_1());
00029   printf("Expect 13,   get %d\n", foo_2());
00030   printf("Expect 103,  get %d\n", foo_3());
00031   return 0;
00032 }
00033 
00034 __asm__(".symver foo_1,show_foo@");
00035 __asm__(".symver foo_2,show_foo@VERS_1.1");
00036 __asm__(".symver foo_3,show_foo@@VERS_1.2");