summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc/crt1.S
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-06-26 00:11:34 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-06-26 00:11:34 +0000
commit8ccf1631d32e06e4ca17a784f7a16041e03b61f4 (patch)
tree950e679fe37d668e8775c457a7b8808daed84809 /libc/sysdeps/linux/powerpc/crt1.S
parent802af2a812ce0e450136cb1257249a30b7fbe43f (diff)
stack_end in __uClibc_main must point to where argc is.
Diffstat (limited to 'libc/sysdeps/linux/powerpc/crt1.S')
-rw-r--r--libc/sysdeps/linux/powerpc/crt1.S7
1 files changed, 3 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/powerpc/crt1.S b/libc/sysdeps/linux/powerpc/crt1.S
index a97b0d142..eef12faf0 100644
--- a/libc/sysdeps/linux/powerpc/crt1.S
+++ b/libc/sysdeps/linux/powerpc/crt1.S
@@ -40,9 +40,8 @@
.type __uClibc_main,%function
_start:
- mr r10,r1 /* Save the stack pointer */
+ mr r9,r1 /* Save the stack pointer and pass it to __uClibc_main */
clrrwi r1,r1,4 /* Align stack ptr to 16 bytes */
- mr r9,r1 /* Pass aligned stack ptr */
#ifdef __PIC__
bl _GLOBAL_OFFSET_TABLE_-4@local
mflr r31
@@ -53,9 +52,9 @@ _start:
mtlr r0
stw r0,0(r1)
/* find argc from the stack pointer */
- lwz r4,0(r10)
+ lwz r4,0(r9)
/* find argv one word offset from the stack pointer */
- addi r5,r10,4
+ addi r5,r9,4
mr r8,r7 /* Pass _dl_fini from ldso or NULL if statically linked */
/* Ok, now run uClibc's main() -- shouldn't return */
#ifdef __PIC__