[COMMITTED] sparc: Fix sparc32 Fix argument passing to __libc_start_main (BZ 32981)
Andreas Schwab
schwab@suse.de
Wed Jun 18 14:32:31 GMT 2025
On Jun 18 2025, Adhemerval Zanella wrote:
> diff --git a/sysdeps/sparc/sparc32/start.S b/sysdeps/sparc/sparc32/start.S
> index cef7c96cac..8393760da6 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
FRAME_SIZE+64?
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list