summaryrefslogtreecommitdiff
path: root/lib/csu/powerpc
diff options
context:
space:
mode:
authorDale S. Rahn <rahnds@cvs.openbsd.org>2000-06-28 04:56:45 +0000
committerDale S. Rahn <rahnds@cvs.openbsd.org>2000-06-28 04:56:45 +0000
commit78a3f643521df55fde00af2670bd25bf6c07c9d0 (patch)
tree599fe1b3bee96d62329fb379d896edf8bcb99545 /lib/csu/powerpc
parent5c11983f9bec513c061c739396ecb8c1f30656e7 (diff)
Powerpc was missing the scrt.o startup file. now used by the ramdisk instbin.
also scrt does not support c++ ctors/dtors thus does not require crtbegin.o/crtend.o which it normally does.
Diffstat (limited to 'lib/csu/powerpc')
-rw-r--r--lib/csu/powerpc/Makefile9
-rw-r--r--lib/csu/powerpc/crt0.s6
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/csu/powerpc/Makefile b/lib/csu/powerpc/Makefile
index 2225f9d1ee5..fde62a6b022 100644
--- a/lib/csu/powerpc/Makefile
+++ b/lib/csu/powerpc/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.5 2000/06/13 04:07:03 rahnds Exp $
+# $OpenBSD: Makefile,v 1.6 2000/06/28 04:56:44 rahnds Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/1/93
CFLAGS= -DLIBC_SCCS
-OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+OBJS= crt0.o gcrt0.o scrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
CLEANFILES+= core a.out
all: ${OBJS}
@@ -17,6 +17,11 @@ gcrt0.o: crt0.s
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
+scrt0.o: crt0.s
+ ${CPP} -DSCRT0 ${.ALLSRC} | ${AS} -o $@
+ @${LD} -x -r ${.TARGET}
+ @mv a.out ${.TARGET}
+
crtbegin.o: crtbegin.c
@echo ${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
@${CC} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}.o
diff --git a/lib/csu/powerpc/crt0.s b/lib/csu/powerpc/crt0.s
index 21834f69357..de7a10bfac8 100644
--- a/lib/csu/powerpc/crt0.s
+++ b/lib/csu/powerpc/crt0.s
@@ -1,4 +1,4 @@
-# $OpenBSD: crt0.s,v 1.6 1999/08/20 14:11:36 niklas Exp $
+# $OpenBSD: crt0.s,v 1.7 2000/06/28 04:56:44 rahnds Exp $
.section ".data"
.comm environ, 4
@@ -46,7 +46,6 @@ no_slash_found:
lis 26, environ@HA
stw 15, environ@L(26)
- .globl __init
call_main:
#ifdef MCRT0
lis 3, _mcleanup@ha
@@ -58,7 +57,10 @@ call_main:
addi 4, 4, _etext@l
bl monstartup
#endif
+#ifndef SCRT0
+ .globl __init
bl __init
+#endif
# recover those saved registers
mr 3, 13
mr 4, 14