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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [sys/] [rtems/] [crt0.c] - Blame information for rev 1773

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

Line No. Rev Author Line
1 1010 ivang
void rtems_provides_crt0( void ) {}
2
/*
3
 *  RTEMS Fake crt0
4
 *
5
 *  Each RTEMS BSP provides its own crt0 and linker script.  Unfortunately
6
 *  this means that crt0 and the linker script are not available as
7
 *  each tool is configured.  Without a crt0 and linker script, some
8
 *  targets do not successfully link "conftest.c" during the configuration
9
 *  process.  So this fake crt0.c provides all the symbols required to
10
 *  successfully link a program.  The resulting program will not run
11
 *  but this is enough to satisfy the autoconf macro AC_PROG_CC.
12
 */
13
 
14
/* RTEMS provides some of its own routines including a Malloc family */
15
 
16
void *malloc() { return 0; }
17
void *realloc() { return 0; }
18
void free() { ; }
19
void abort() { ; }
20
int raise() { return -1; }
21
void rtems_gxx_mutex_init() { }
22
int rtems_gxx_mutex_lock() { return -1; }
23
int rtems_gxx_mutex_unlock() { return -1; }
24
int rtems_gxx_once() { return -1; }
25
 
26
/* gcc can implicitly generate references to these */
27
strcmp() {}
28
strcpy() {}
29
strlen() {}
30
memcmp() {}
31
memcpy() {}
32
memset() {}
33
 
34
/* The SH expects certain symbols to be defined in the linker script. */
35
 
36
#if defined(__sh__)
37
int __EH_FRAME_BEGIN__;
38
#endif
39
 
40
/* The PowerPC expects certain symbols to be defined in the linker script. */
41
 
42
#if defined(__PPC__)
43
  int __SDATA_START__;  int __SDATA2_START__;
44
  int __GOT_START__;    int __GOT_END__;
45
  int __GOT2_START__;   int __GOT2_END__;
46
  int __SBSS_END__;     int __SBSS2_END__;
47
  int __FIXUP_START__;  int __FIXUP_END__;
48
  int __EXCEPT_START__; int __EXCEPT_END__;
49
  int __init;           int __fini;
50
  int __CTOR_LIST__;    int __CTOR_END__;
51
  int __DTOR_LIST__;    int __DTOR_END__;
52
#endif
53
 
54
/*  The hppa expects this to be defined in the real crt0.s.
55
 *  Also for some reason, the hppa1.1 does not find atexit()
56
 *  during the AC_PROG_CC tests.
57
 */
58
 
59
#if defined(__hppa__)
60
/*
61
  asm ( ".subspa \$GLOBAL\$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40");
62
  asm ( ".export \$global\$" );
63
  asm ( "\$global\$:");
64
*/
65
 
66
  asm (".text");
67
  asm (".global");
68
  asm ("$$dyncall:");
69
  int atexit(void (*function)(void)) { return 0; }
70
#endif
71
 
72
 
73
/*
74
 *  The AMD a29k generates code expecting the following.
75
 */
76
 
77
#if defined(_AM29000) || defined(_AM29K)
78
asm (".global V_SPILL, V_FILL" );
79
asm (".global V_EPI_OS, V_BSD_OS" );
80
 
81
asm (".equ    V_SPILL, 64" );
82
asm (".equ    V_FILL, 65" );
83
 
84
asm (".equ    V_BSD_OS, 66" );
85
asm (".equ    V_EPI_OS, 69" );
86
#endif

powered by: WebSVN 2.1.0

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