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

Subversion Repositories or1k

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

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 59 joel
 
22
/* gcc 2.8.1 implicitly can generate references to these for at
23
 * least sparc-elf */
24
#if (__GNUC__ == 2) && (__GNUC_MINOR__ == 8)
25
strcmp() {}
26
strcpy() {}
27
strlen() {}
28
memcmp() {}
29
memcpy() {}
30
memset() {}
31
#endif
32
 
33 56 joel
/* The PowerPC expects certain symbols to be defined in the linker script. */
34
 
35
#if defined(__PPC__)
36
  int __SDATA_START__;  int __SDATA2_START__;
37
  int __GOT_START__;    int __GOT_END__;
38
  int __GOT2_START__;   int __GOT2_END__;
39
  int __SBSS_END__;     int __SBSS2_END__;
40
  int __FIXUP_START__;  int __FIXUP_END__;
41
  int __EXCEPT_START__; int __EXCEPT_END__;
42
  int __init;           int __fini;
43
#endif
44
 
45
/*  The hppa expects this to be defined in the real crt0.s.
46
 *  Also for some reason, the hppa1.1 does not find atexit()
47
 *  during the AC_PROG_CC tests.
48
 */
49
 
50
#if defined(__hppa__)
51
/*
52
  asm ( ".subspa \$GLOBAL\$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40");
53
  asm ( ".export \$global\$" );
54
  asm ( "\$global\$:");
55
*/
56
 
57
  int atexit(void (*function)(void)) { return 0; }
58
#endif
59
 

powered by: WebSVN 2.1.0

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