summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/powerpc/dl-startup.h6
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"