[PATCH][Newlib] arm: Fix the SP used in setting stack limit for standalone application.

Richard Earnshaw Richard.Earnshaw@foss.arm.com
Fri Mar 3 13:34:41 GMT 2023


I've tweaked the commit message and pushed (we don't use ChangeLog files 
in newlib).

R.

On 03/03/2023 12:45, Srinath Parvathaneni wrote:
> Hi,
> 
> When the processor by default starts in USER mode, in __stack_init
> function of crt0.s the stack limit register is not getting set
> correctly for standalone application. This is because the register r3
> used to set this stack limit register is not updated with correct stack
> pointer value. This patch fixes this issue and updates r3 with correct
> stack pointer value.
> 
> Regression tested on arm-none-eabi target for newlib and newlib-nano and 
> found
> no regressions.
> 
> Ok for newlib master?
> 
> Regards,
> Srinath.
> 
> libgloss/ChangeLog:
> 
> 2023-03-03  Srinath Parvathaneni<srinath.parvathaneni@arm.com>
> 
>      * arm/crt0.S (__stack_init): Update r3 value before mode checking.
> 
> newlib/ChangeLog:
> 
> 2023-03-03  Srinath Parvathaneni<srinath.parvathaneni@arm.com>
> 
>      * libc/sys/arm/crt0.S (__stack_init): Update r3 value before mode
>          checking.


More information about the Newlib mailing list