diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-12-15 07:50:05 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-12-15 07:50:05 +0000 |
commit | 813349ca63e3987cb6a2567cbfbd8572ae78554f (patch) | |
tree | 4831fdba8138f839542f11596c65387d9c0f70e2 /ldso | |
parent | f68a5cd995f89baba6e6500612fcfb6962f41555 (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 'ldso')
-rw-r--r-- | ldso/ldso/powerpc/dl-startup.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ldso/ldso/powerpc/dl-startup.h b/ldso/ldso/powerpc/dl-startup.h index 6fdf74301..e6fd814e5 100644 --- a/ldso/ldso/powerpc/dl-startup.h +++ b/ldso/ldso/powerpc/dl-startup.h @@ -42,8 +42,10 @@ asm( " bne 2b\n" " addi 6,6,4\n" #endif - /* Pass a termination function pointer (in this case _dl_fini) in r7. */ - " lwz 7,_dl_fini@got(31)\n" + /* Pass a termination function pointer (in this case _dl_fini) in r3. */ + /* Paulus promized he would keep r3 zero in the exec ABI. */ + " lwz 3,_dl_fini@got(31)\n" + " mr 7,3\n" /* Pass _dl_fini in r7 to maintain compat */ " bctr\n" /* Jump to entry point */ " .size _start,.-_start\n" " .previous\n" |