include/elf/
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elfvers / vers4.c
CommitLineData
252b5132
RH
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 */
0cd9f5f0
ILT
7#include <stdio.h>
8
9extern int foo ();
10
252b5132
RH
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}
This page took 0.490573 seconds and 4 git commands to generate.