From af6c5b7e8caf26a55f47a706ca33ff479df300be Mon Sep 17 00:00:00 2001 From: kp Date: Mon, 9 Sep 2019 15:57:24 +0000 Subject: [PATCH] riscv: Ensure that BSS is 8-byte aligned This makes clearing it (from locore.S) work without misaligned accesses (which can trap to machine mode, and be slow). Reviewed by: br Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D21538 --- sys/conf/ldscript.riscv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/ldscript.riscv b/sys/conf/ldscript.riscv index 449575cb6ed..2986486cf84 100644 --- a/sys/conf/ldscript.riscv +++ b/sys/conf/ldscript.riscv @@ -99,7 +99,7 @@ SECTIONS /* Ensure __bss_start is associated with the next section in case orphan sections are placed directly after .sdata, as has been seen to happen with LLD. */ - . = .; + . = ALIGN(8); __bss_start = .; .sbss : { *(.sbss) *(.scommon) } .bss : -- 2.39.5