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

Subversion Repositories or1k

[/] [or1k/] [tags/] [tn_m001/] [newlib/] [newlib/] [libc/] [sys/] [rtems/] [crt0.c] - Blame information for rev 57

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

Line No. Rev Author Line
1 39 lampret
void rtems_provides_crt0( void ) {}
2 56 joel
/*
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
 
22
/* The PowerPC expects certain symbols to be defined in the linker script. */
23
 
24
#if defined(__PPC__)
25
  int __SDATA_START__;  int __SDATA2_START__;
26
  int __GOT_START__;    int __GOT_END__;
27
  int __GOT2_START__;   int __GOT2_END__;
28
  int __SBSS_END__;     int __SBSS2_END__;
29
  int __FIXUP_START__;  int __FIXUP_END__;
30
  int __EXCEPT_START__; int __EXCEPT_END__;
31
  int __init;           int __fini;
32
#endif
33
 
34
/*  The hppa expects this to be defined in the real crt0.s.
35
 *  Also for some reason, the hppa1.1 does not find atexit()
36
 *  during the AC_PROG_CC tests.
37
 */
38
 
39
#if defined(__hppa__)
40
/*
41
  asm ( ".subspa \$GLOBAL\$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40");
42
  asm ( ".export \$global\$" );
43
  asm ( "\$global\$:");
44
*/
45
 
46
  int atexit(void (*function)(void)) { return 0; }
47
#endif
48
 

powered by: WebSVN 2.1.0

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