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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [ld/] [testsuite/] [ld-elfvers/] [vers4.c] - Blame information for rev 146

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

Line No. Rev Author Line
1 58 khays
/*
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
#include "vers.h"
9
 
10
extern int foo ();
11
 
12
int
13
bar()
14
{
15
        return 3;
16
}
17
 
18
int
19
new_foo()
20
{
21
        return 1000+bar();
22
 
23
}
24
 
25
SYMVER(new_foo, foo@@VERS_2.0);
26
 
27
int
28
main()
29
{
30
  printf("%d\n", foo());
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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