diff options
author | Yilun Lin <yllin@google.com> | 2019-06-06 16:06:54 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-12 08:44:02 +0000 |
commit | 75870a2f6c3136c537815df97afc36026257642c (patch) | |
tree | dac337ffd20aab9714a052e7708029a5060ed279 | |
parent | 530e993a15600a6bbc7708522bf75644188279ff (diff) | |
download | chrome-ec-75870a2f6c3136c537815df97afc36026257642c.tar.gz |
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 <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1646689
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
-rw-r--r-- | core/cortex-m/ec.lds.S | 6 |
1 files changed, 5 insertions, 1 deletions
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*)) |