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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [ld/] [testsuite/] [ld-ifunc/] [prog.c] - Blame information for rev 93

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

Line No. Rev Author Line
1 70 khays
extern int printf (const char *, ...);
2
 
3
extern int library_func1 (void);
4
extern int library_func2 (void);
5
extern int global;
6
 
7
int
8
main (void)
9
{
10
  int res = -1;
11
 
12
  res += library_func1 ();
13
  res += library_func2 ();
14
 
15
  switch (res)
16
    {
17
    case 0:
18
      if (global)
19
        printf ("ifunc working correctly\n");
20
      else
21
        {
22
          printf ("wrong value returned by library_func2\n");
23
          res = -1;
24
        }
25
      break;
26
 
27
    case 1:
28
      if (global)
29
        printf ("wrong value returned by library_func2\n");
30
      else
31
        {
32
          printf ("ifunc working correctly\n");
33
          res = 0;
34
        }
35
      break;
36
 
37
    case 4:
38
      printf ("non-ifunc testcase\n");
39
      break;
40
 
41
    default:
42
      printf ("ifunc function not evaluated at run-time, res = %x\n", res);
43
      break;
44
    }
45
  return res;
46
}

powered by: WebSVN 2.1.0

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