aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/weak_as_needed_b.c
blob: 6a1fbf8f854a9ee8bbd566ac15e2df8df8219ea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>

__asm__ (".symver bar_v1, bar@v1");
__asm__ (".symver bar_v2, bar@@v2");

void bar_v1(void);
void bar_v2(void);
void baz(void);

void bar_v1(void)
{
  printf("weak_as_needed_b: bar_v1\n");
}

void bar_v2(void)
{
  printf("weak_as_needed_b: bar_v2\n");
}

void baz(void)
{
  printf("weak_as_needed_b: baz\n");
}