From 75870a2f6c3136c537815df97afc36026257642c Mon Sep 17 00:00:00 2001 From: Yilun Lin Date: Thu, 6 Jun 2019 16:06:54 +0800 Subject: cortex-m/ec.ld.S: .dram.bss section should not have LOAD attribute. .dram.bss section is like .bss section that all the contents should be initialized to zero. TEST=build a image with .dram.bss section, and verify it only has ALLOC attribute. $ arm-none-eabi-objdump -h build/kukui_scp/RW/ec.RW.elf 7 .dram.bss 00000acb 3009aaa8 3009aaa8 0010aaa8 2**2 ALLOC BUG=b:134079593, b:122058243 BRANCH=master Change-Id: I853b2977465b83458f566c5dd953458147d4e10e Signed-off-by: Yilun Lin Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1646689 Reviewed-by: Jett Rink Reviewed-by: Daisuke Nojiri Commit-Queue: Yilun Lin Tested-by: Yilun Lin --- core/cortex-m/ec.lds.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 1d759cf843..f4524682e1 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -455,7 +455,11 @@ SECTIONS __dram_data_end = .; } > DRAM - .dram.bss : { + /* + * ld assigns correct attribute for .bss, but not for other .*.bss, we need + * an explicltly NOLOAD. + */ + .dram.bss(NOLOAD) : { . = ALIGN(4); __dram_bss_start = .; *(SORT(.dram.bss*)) -- cgit v1.2.1