mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
Leif's BSS fix
This commit is contained in:
1 parent
72a21cf09b
commit
c59fe1d776
1 file changed
+6
-1
@@ -99,8 +99,13 @@ FUNCTION(codestart)
|
|||||||
@ Since we _are_ the C run-time, we need to manually zero the BSS
|
@ Since we _are_ the C run-time, we need to manually zero the BSS
|
||||||
@ region before continuing
|
@ region before continuing
|
||||||
ldr r0, =EXT_C(__bss_start) @ zero from here
|
ldr r0, =EXT_C(__bss_start) @ zero from here
|
||||||
ldr r1, =EXT_C(_end) @ to here
|
@ If unaligned, bytewise zero until base address aligned.
|
||||||
mov r2, #0
|
mov r2, #0
|
||||||
|
1: tst r0, #3
|
||||||
|
beq 2f
|
||||||
|
strb r2, [r0], #1
|
||||||
|
b 1b
|
||||||
|
2: ldr r1, =EXT_C(_end) @ to here
|
||||||
1: str r2, [r0], #4
|
1: str r2, [r0], #4
|
||||||
cmp r0, r1
|
cmp r0, r1
|
||||||
bne 1b
|
bne 1b
|
||||||
|
|||||||
Reference in new issue
Block a user