[klibc] [PATCH] update crt0.S on ppc32

Olaf Hering olh at suse.de
Mon Dec 8 20:15:03 PST 2003


 On Sun, Dec 07, H. Peter Anvin wrote:

> Olaf Hering wrote:
> >
> >I still dont see anything about onexit in the spec.
> >
> >http://www.linuxbase.org/spec/archLSB/PPC32/spec.html#PROCESSINITIALIZATION
> >
> 
> That's not the psABI; it references:

at least the url above mentions r7. I used this pdf:
www.cloudcaptech.com/MPC555%20Resources/Programming%20Environment/SVR4abippc.pdf

another thing is, udev is now build with -nodefaultlibs, which leads to
link errors on ppc, ia64 and s390. The Makefile change fixes it.


diff -p -purN klibc-0.91/klibc/arch/ppc/crt0.S klibc-0.91.ppc32/klibc/arch/ppc/crt0.S
--- klibc-0.91/klibc/arch/ppc/crt0.S	2003-12-08 00:52:13.000000000 +0100
+++ klibc-0.91.ppc32/klibc/arch/ppc/crt0.S	2003-12-08 19:59:38.000000000 +0100
@@ -9,7 +9,12 @@
 _start:
 	stwu	1,-16(1)
 	addi	3,1,16
-	li	4,0
+	/*
+	 * the SVR4abippc.pdf specifies r7 as a pointer to 
+	 * a termination function pointer.
+	 * It is unused on Linux.
+	 */
+	mr	4,7
 	bl	__libc_init
 	
 	.size _start,.-_start
diff -p -purN klibc-0.91/klibc/arch/ppc/Makefile.inc klibc-0.91.ppc32/klibc/arch/ppc/Makefile.inc
--- klibc-0.91/klibc/arch/ppc/Makefile.inc	2002-08-17 02:54:27.000000000 +0200
+++ klibc-0.91.ppc32/klibc/arch/ppc/Makefile.inc	2003-12-08 20:04:25.000000000 +0100
@@ -8,7 +8,13 @@
 #
 
 ARCHOBJS = \
-	arch/$(ARCH)/setjmp.o
+	arch/$(ARCH)/setjmp.o \
+	libgcc/__divdi3.o \
+	libgcc/__moddi3.o \
+	libgcc/__udivdi3.o \
+	libgcc/__umoddi3.o \
+	libgcc/__udivmoddi4.o
+
 
 ARCHSOOBJS = $(patsubst %.o,%.lo,$(ARCHOBJS))
 

-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG



More information about the klibc mailing list