OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.18.50/] [ld/] [testsuite/] [ld-elfvers/] [vers15.c] - Blame information for rev 38

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/*
2
 * Testcase to make sure that if we externally reference a versioned symbol
3
 * that we always get the right one.
4
 */
5
#include <stdio.h>
6
 
7
int
8
foo_1()
9
{
10
  return 1034;
11
}
12
 
13
int
14
foo_2()
15
{
16
  return 1343;
17
}
18
 
19
int
20
foo_3()
21
{
22
  return 1334;
23
}
24
 
25
int
26
main()
27
{
28
  printf("Expect 4,    get %d\n", foo_1());
29
  printf("Expect 13,   get %d\n", foo_2());
30
  printf("Expect 103,  get %d\n", foo_3());
31
  return 0;
32
}
33
 
34
__asm__(".symver foo_1,show_foo@");
35
__asm__(".symver foo_2,show_foo@VERS_1.1");
36
__asm__(".symver foo_3,show_foo@@VERS_1.2");

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.