aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfvers/vers21.c
blob: 4a994a19fee8cf82e17b8fb6ec2b1e45ada13089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "vers.h"

FUNC_SYMVER(_old_foo, foo@VERS.0);
FUNC_SYMVER(_old_bar, bar@VERS.0);
SYMVER(_old_foobar, foobar@VERS.0);

int
bar () 
{
  return 1;
}

int __attribute__ ((weak))
_old_bar () 
{
  return bar ();
}

int
foo () 
{
  return 2;
}

int
_old_foo () 
{
  return foo ();
}

int _old_foobar = -1;

int foobar = 1;