4.9.9. __rt_stack_overflow()

This function is called if a stack overflow occurs. An incomplete prototype implementation is in rt_memory.s


This function is called with r12 (ip) equal to the desired new sp, and with sp up to 256 bytes below sl.

If your memory model is used only with the default non stack-checked ATPCS, you do not have to implement this function.

The stack overflow routines are called at function entry if a stack limit check fails. These are subject to the usual register-use restrictions on stack overflow routines. In particular, they cannot use r0-r3 because the arguments are still held there, and they cannot use registers r4 to r11 in case the routine did not save them.


The function does not return to lr. It must return by branching to __rt_stack_overflow_return.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D