summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-12-15 07:50:05 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-12-15 07:50:05 +0000
commit813349ca63e3987cb6a2567cbfbd8572ae78554f (patch)
tree4831fdba8138f839542f11596c65387d9c0f70e2 /libc/sysdeps/linux/powerpc
parentf68a5cd995f89baba6e6500612fcfb6962f41555 (diff)
Fix static apps on linux 2.6. Linux clobbers r7 in 2.6, so
use r3 instead to pass _dl_fini.
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r--libc/sysdeps/linux/powerpc/crt1.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/powerpc/crt1.S b/libc/sysdeps/linux/powerpc/crt1.S
index c042462e9..47419bb52 100644
--- a/libc/sysdeps/linux/powerpc/crt1.S
+++ b/libc/sysdeps/linux/powerpc/crt1.S
@@ -60,7 +60,8 @@ _start:
lwz r4,0(r9)
/* find argv one word offset from the stack pointer */
addi r5,r9,4
- mr r8,r7 /* Pass _dl_fini from ldso or NULL if statically linked */
+ mr r8,r3 /* Pass _dl_fini from ldso or NULL if statically linked
+ Note: using r3 instead of r7, since linux 2.6 clobbers r7 */
/* Ok, now run uClibc's main() -- shouldn't return */
#ifdef __PIC__
lwz r6,_init@got(r31)