diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-10-05 23:54:40 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-17 18:24:58 +0000 |
commit | bc85da4ee284112fd8589de8e71bf16c8fe99de5 (patch) | |
tree | 993c8c704deab2679cc67e42413f32afa56ab6c9 /chip | |
parent | 5374c39953e955b25f7bf4bdc0d240edc469a4f8 (diff) | |
download | chrome-ec-bc85da4ee284112fd8589de8e71bf16c8fe99de5.tar.gz |
chip/npcx: Disable linker section check warning
When linking with clang (lld), it complains that the .header and .text
virtual memory address (VMA) overlaps:
ld.lld: error: section .header virtual address range overlaps with .text
>>> .header range is [0x10070000, 0x1007003F]
>>> .text range is [0x10070000, 0x10095DDB]
However, in this case it appears that it's ok that the header overlaps
with the text section, since the bootloader uses the header to copy the
firmware from flash to RAM (the header itself is not copied).
BRANCH=none
BUG=b:172020503
TEST=CC=clang make BOARD=elemi
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ic2a7058c85bbcb90c69d2b372f6d33930ac4d212
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3207346
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/npcx/build.mk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/npcx/build.mk b/chip/npcx/build.mk index 1de37f6b0a..3a41cfbd53 100644 --- a/chip/npcx/build.mk +++ b/chip/npcx/build.mk @@ -11,6 +11,9 @@ CORE:=cortex-m # Allow the full Cortex-M4 instruction set CFLAGS_CPU+=-march=armv7e-m -mcpu=cortex-m4 +# Disable overlapping section warning that linker emits due to NPCX_RO_HEADER. +LDFLAGS_EXTRA+=-Wl,--no-check-sections + # Assign default CHIP_FAMILY as npcx5 for old boards used npcx5 series ifeq ($(CHIP_FAMILY),) CHIP_FAMILY:=npcx5 |