aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@serpentine.com>2003-11-29 06:17:07 +0000
committerH. Peter Anvin <hpa@zytor.com>2003-11-29 06:17:07 +0000
commitaccaee150add27c65011d77328cc09524fa67ccc (patch)
treeabe21c518c5addee3321bdb18767959af8fdf0b2
parenta9f93546d6151c1a82c88ad3a68a4dfb3cf8e01a (diff)
downloadklibc-accaee150add27c65011d77328cc09524fa67ccc.tar.gz
From: Olaf Hering <olh@suse.de>klibc-0.88
Subject: [klibc] [PATCH] update crt0.S on ppc32 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.
-rw-r--r--klibc/arch/ppc/crt0.S21
1 files changed, 3 insertions, 18 deletions
diff --git a/klibc/arch/ppc/crt0.S b/klibc/arch/ppc/crt0.S
index f7274b07dd549..861c8e7c78b63 100644
--- a/klibc/arch/ppc/crt0.S
+++ b/klibc/arch/ppc/crt0.S
@@ -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