diff options
Diffstat (limited to 'ldso/ldso/powerpc/dl-startup.h')
-rw-r--r-- | ldso/ldso/powerpc/dl-startup.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ldso/ldso/powerpc/dl-startup.h b/ldso/ldso/powerpc/dl-startup.h index d86dd13c7..6fdf74301 100644 --- a/ldso/ldso/powerpc/dl-startup.h +++ b/ldso/ldso/powerpc/dl-startup.h @@ -19,6 +19,12 @@ asm( " bl _GLOBAL_OFFSET_TABLE_-4@local\n" /* Put our GOT pointer in r31, */ " mflr 31\n" " addi 1,1,16\n" /* Restore SP */ + " lwz 7,_dl_skip_args@got(31)\n" /* load EA of _dl_skip_args */ + " lwz 7,0(7)\n" /* Load word from _dl_skip_args */ + " lwz 8,0(1)\n" /* Load argc from stack */ + " subf 8,7,8\n" /* Subtract _dl_skip_args from argc. */ + " slwi 7,7,2\n" /* Multiply by 4 */ + " stwux 8,1,7\n" /* Adjust the stack pointer to skip _dl_skip_args words and store adjusted argc on stack. */ #if 0 /* Try beeing SVR4 ABI compliant?, even though it is not needed for uClibc on Linux */ /* argc */ |