This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

rtems dummy crt0.c


RTEMS has a dummy crt0.c only used to guarantee that you
can link an executable without having RTEMS installed.
This addresses some configuration specific oddities.

2000-12-01      Joel Sherrill <joel@OARcorp.com>

        * libc/sys/rtems/crt0.c: Add stubs for functions implicitly
        referenced by code generated by gcc 2.8.1.
        * libc/sys/rtems/crt0.c (a29k): Add stubs for V_SPILL, V_FILL,
        V_BSD_OS, V_EPI_OS to satisfy gcc.


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985
Index: newlib/libc/sys/rtems/crt0.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/rtems/crt0.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 crt0.c
--- crt0.c	2000/02/17 19:39:50	1.1.1.1
+++ crt0.c	2000/12/01 13:20:19
@@ -18,7 +18,18 @@
 void free() { ; }
 void abort() { ; }
 int raise() { return -1; }
- 
+
+/* gcc 2.8.1 implicitly can generate references to these for at
+ * least sparc-elf */
+#if (__GNUC__ == 2) && (__GNUC_MINOR__ == 8)
+strcmp() {}
+strcpy() {}
+strlen() {}
+memcmp() {}
+memcpy() {}
+memset() {}
+#endif
+
 /* The PowerPC expects certain symbols to be defined in the linker script. */
 
 #if defined(__PPC__)
@@ -46,3 +57,18 @@
   int atexit(void (*function)(void)) { return 0; }
 #endif
 
+
+/*
+ *  The AMD a29k generates code expecting the following.
+ */
+
+#if defined(_AM29000) || defined(_AM29K)
+asm (".global V_SPILL, V_FILL" );
+asm (".global V_EPI_OS, V_BSD_OS" );
+
+asm (".equ    V_SPILL, 64" );
+asm (".equ    V_FILL, 65" );
+
+asm (".equ    V_BSD_OS, 66" );
+asm (".equ    V_EPI_OS, 69" );
+#endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]