source: trunk/binutils/ld/testsuite/ld-elfvers/vers4.c

Last change on this file was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 431 bytes
Line 
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
9extern int foo ();
10
11int
12bar()
13{
14 return 3;
15}
16
17int
18new_foo()
19{
20 return 1000+bar();
21
22}
23
24__asm__(".symver new_foo,foo@@VERS_2.0");
25
26int
27main()
28{
29 printf("%d\n", foo());
30 return 0;
31}
Note: See TracBrowser for help on using the repository browser.