svn commit: r262437 - in projects/arm64/sys: arm64/arm64 conf
Andrew Turner
andrew at FreeBSD.org
Mon Feb 24 09:30:51 UTC 2014
Author: andrew
Date: Mon Feb 24 09:30:50 2014
New Revision: 262437
URL: http://svnweb.freebsd.org/changeset/base/262437
Log:
Zero the bss before entering initarm
Modified:
projects/arm64/sys/arm64/arm64/locore.S
projects/arm64/sys/conf/ldscript.arm64
Modified: projects/arm64/sys/arm64/arm64/locore.S
==============================================================================
--- projects/arm64/sys/arm64/arm64/locore.S Mon Feb 24 08:50:06 2014 (r262436)
+++ projects/arm64/sys/arm64/arm64/locore.S Mon Feb 24 09:30:50 2014 (r262437)
@@ -77,14 +77,28 @@ virtdone:
adr x29, initstack
mov sp, x29
+ /* Zero the BSS */
+ ldr x29, .Lbss
+ ldr x28, .Lend
+ b 2f
+1:
+ str xzr, [x29], #8
+ cmp x29, x28
+ b.lo 1b
+2:
+
/* Branch to C code */
bl initarm
-1: b 1b
+3: b 3b
.align 3
.Lvirtdone:
.quad virtdone
+.Lbss:
+ .quad __bss_start
+.Lend:
+ .quad _end
/*
* If we are started in EL2, configure the required hypervisor
Modified: projects/arm64/sys/conf/ldscript.arm64
==============================================================================
--- projects/arm64/sys/conf/ldscript.arm64 Mon Feb 24 08:50:06 2014 (r262436)
+++ projects/arm64/sys/conf/ldscript.arm64 Mon Feb 24 09:30:50 2014 (r262437)
@@ -97,6 +97,7 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
+ . = ALIGN(8);
.sdata : { *(.sdata) }
_edata = .;
PROVIDE (edata = .);
@@ -108,7 +109,7 @@ SECTIONS
*(.bss)
*(COMMON)
}
- . = ALIGN(32 / 8);
+ . = ALIGN(8);
_end = . ;
PROVIDE (end = .);
/* Stabs debugging sections. */
More information about the svn-src-projects
mailing list