1 /*
2  * Testcase to make sure that a versioned symbol definition in an
3  * application correctly defines the version node, if and only if
4  * the actual symbol is exported.  This is built both with and without
5  * -export-dynamic.
6  */
7 #include <stdio.h>
8 #include "vers.h"
9 
10 extern int foo ();
11 
12 int
bar()13 bar()
14 {
15 	return 3;
16 }
17 
18 int
new_foo()19 new_foo()
20 {
21 	return 1000+bar();
22 
23 }
24 
25 SYMVER(new_foo, foo@@VERS_2.0);
26 
27 int
main()28 main()
29 {
30   printf("%d\n", foo());
31   return 0;
32 }
33