mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-08-15 05:18:32 +00:00
arm: start: set sp to stack_bottom instead of stack_top
For conveniency, stack_bottom points to the end of the stack region in the
linker file as it grows backwards on arm:
.stack ALIGN(0x1000) : {
__stack_top = .;
. += 0x1000;
__stack_bottom = .;
}
However, we have somehow missed that and STILL made sp point to __stack_top,
which makes it grow backwards into .bss... oops, lol. Tested on qemu-virt set
to use cortex-a15.
This commit is contained in:
committed by
Igor Bełwon
parent
c509adb742
commit
d712a206bb
@@ -18,7 +18,7 @@ ENTRY(_start)
|
||||
bic r12, #(1<<2 | 1<<0)
|
||||
mcr p15, 0, r12, c1, c0, 0
|
||||
|
||||
ldr sp, =__stack_top
|
||||
ldr sp, =__stack_bottom
|
||||
|
||||
/* Zero BSS section */
|
||||
ldr r0, =__bss_start
|
||||
|
||||
Reference in New Issue
Block a user