|
@@ -17,12 +17,22 @@ __asm__(
|
|
" mov.l .L_got, r12 ! Load the GOT on r12\n"
|
|
" mov.l .L_got, r12 ! Load the GOT on r12\n"
|
|
" mova .L_got, r0\n"
|
|
" mova .L_got, r0\n"
|
|
" add r0, r12\n"
|
|
" add r0, r12\n"
|
|
|
|
+ " mov.l .L_dl_skip_args,r0\n"
|
|
|
|
+ " mov.l @(r0,r12),r0\n"
|
|
|
|
+ " mov.l @r0,r0\n"
|
|
|
|
+ " mov.l @r15,r5 ! Get the original argument count\n"
|
|
|
|
+ " sub r0,r5 ! Subtract _dl_skip_args from it\n"
|
|
|
|
+ " shll2 r0\n"
|
|
|
|
+ " add r0,r15 ! Adjust the stack pointer to skip _dl_skip_args words\n"
|
|
|
|
+ " mov.l r5,@r15 ! Store back the modified argument count\n"
|
|
" mov.l .L_dl_fini, r0\n"
|
|
" mov.l .L_dl_fini, r0\n"
|
|
" mov.l @(r0,r12), r4 ! Pass the finalizer in r4\n"
|
|
" mov.l @(r0,r12), r4 ! Pass the finalizer in r4\n"
|
|
" jmp @r8\n"
|
|
" jmp @r8\n"
|
|
" nop\n"
|
|
" nop\n"
|
|
".L_dl_start:\n"
|
|
".L_dl_start:\n"
|
|
" .long _dl_start-.jmp_loc\n"
|
|
" .long _dl_start-.jmp_loc\n"
|
|
|
|
+ ".L_dl_skip_args:\n"
|
|
|
|
+ " .long _dl_skip_args@GOT\n"
|
|
".L_dl_fini:\n"
|
|
".L_dl_fini:\n"
|
|
" .long _dl_fini@GOT\n"
|
|
" .long _dl_fini@GOT\n"
|
|
".L_got:\n"
|
|
".L_got:\n"
|