The _start stuff was changed some time ago, but ppc was not updated.
This fixes klibc for me. I'm not sure what to do with the second arg to
__libc_init, so I set it to 0..
However, looking at other static binaries, there is more stuff todo.
diff -p -purNx linux -x '.*.d' -x syscalls -x socketcalls
y/klibc-0.87/klibc/arch/ppc/crt0.S klibc-0.87/klibc/arch/ppc/crt0.S
--- y/klibc-0.87/klibc/arch/ppc/crt0.S 2002-08-10 13:28:55.000000000 +0200
+++ klibc-0.87/klibc/arch/ppc/crt0.S 2003-11-28 00:39:11.000000000 +0100
@@ -1,29 +1,14 @@
#
# arch/ppc/crt0.S
#
-# void _start(void)
-# {
-# /* Divine up argc, argv, and envp */
-# environ = envp;
-# exit(main(argc, argv, envp));
-# }
-#
.text
.align 4
.type _start,@function
.globl _start
_start:
- lwz 3,0(1)
- addi 4,1,4
- addi 5,1,8
- slwi 0,3,2
- add 5,5,0
- li 0,0
- stwu 0,-16(1)
- lis 9,environ@ha
- stw 5,environ@l(9)
- bl main
- bl exit
+ mr 3,1
+ li 4,0
+ bl __libc_init
.size _start,.-_start
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n?RNBERG