diff options
Diffstat (limited to 'sysdeps/sparc/sparc32/start.S')
-rw-r--r-- | sysdeps/sparc/sparc32/start.S | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sysdeps/sparc/sparc32/start.S b/sysdeps/sparc/sparc32/start.S index 694b020..8393760 100644 --- a/sysdeps/sparc/sparc32/start.S +++ b/sysdeps/sparc/sparc32/start.S @@ -35,6 +35,7 @@ #include <sysdep.h> +#define FRAME_SIZE 104 .section ".text" .align 4 @@ -48,12 +49,12 @@ _start: /* Terminate the stack frame, and reserve space for functions to drop their arguments. */ mov %g0, %fp - sub %sp, 6*4, %sp + sub %sp, FRAME_SIZE, %sp /* Extract the arguments and environment as encoded on the stack. The argument info starts after one register window (16 words) past the SP. */ - ld [%sp+22*4], %o1 - add %sp, 23*4, %o2 + ld [%sp+168], %o1 + add %sp, 172, %o2 /* Load the addresses of the user entry points. */ #ifndef PIC @@ -73,6 +74,10 @@ _start: be NULL. */ mov %g1, %o5 + /* Provide the highest stack address to update the __libc_stack_end (used + to enable executable stacks if required). */ + st %sp, [%sp+23*4] + /* Let libc do the rest of the initialization, and call main. */ call __libc_start_main nop |