diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2018-01-05 10:26:02 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-02-01 00:48:09 +0000 |
commit | ad8d5cb82ae7c7928a8f8ffcf59cc8713a163363 (patch) | |
tree | 805c48b662423e7a007814388a7e1ee68c77da1e | |
parent | 4baa9343b7624807bb8676b681720c7329fa0af1 (diff) | |
download | chrome-ec-ad8d5cb82ae7c7928a8f8ffcf59cc8713a163363.tar.gz |
cr50: fix annoying LD warnings
The compiler marks data put into the TPM2_common.bss section as
PROGBITS, which the linker does not like. Changing the section name
prevents the marking and keeps linker happy.
BRANCH=cr50
BUG=chromium:799385
TEST=verified that local_state is still in where it belongs:
$ egrep '(local_state|__bss_libtpm2)' build/cr50/RW/ec.RW.smap
00010400 B __bss_libtpm2_start
00015d0c b local_state
00015d18 B __bss_libtpm2_end
Change-Id: I48f7d2cb08c7ccb2ef3b3159eaf4d66e2b8720b4
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852793
Reviewed-by: Randall Spangler <rspangler@chromium.org>
(cherry picked from commit 57bb4ddf4163dbe3da48ba56464adbabfa596344)
Reviewed-on: https://chromium-review.googlesource.com/896753
-rw-r--r-- | board/cr50/tpm2/NVMem.c | 2 | ||||
-rw-r--r-- | core/cortex-m/ec.lds.S | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/board/cr50/tpm2/NVMem.c b/board/cr50/tpm2/NVMem.c index 7921270fb2..33ce13a336 100644 --- a/board/cr50/tpm2/NVMem.c +++ b/board/cr50/tpm2/NVMem.c @@ -25,7 +25,7 @@ static struct { BOOL s_NvIsAvailable; BOOL s_NV_unrecoverable; BOOL s_NV_recoverable; -} local_state __attribute__((section("Tpm2_common.bss"))); +} local_state __attribute__((section(".bss.Tpm2_common"))); /* * This function is used by the simulator to set the error flags in the NV * subsystem to simulate an error in the NV loading process. diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 5fbddcf269..639b17f7f7 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -251,7 +251,7 @@ SECTIONS Tpm2_*(.bss) /* TPM registers should be cleared at the same time */ STRINGIFY(OUTDIR/common/tpm_registers.o*)(.bss) - *(Tpm2_common.bss) + *(.bss.Tpm2_common) __bss_libtpm2_end = .; *(.bss) |