diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2018-01-05 10:26:02 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-05 14:28:47 -0800 |
commit | 57bb4ddf4163dbe3da48ba56464adbabfa596344 (patch) | |
tree | e5b0c9c1c3dc68ab7d69dd45fdc5cc12f305e3bb | |
parent | 0b9a0688946c76451d0770be9b1fe4de148a4691 (diff) | |
download | chrome-ec-57bb4ddf4163dbe3da48ba56464adbabfa596344.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>
-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 62f3b6f992..64fb132462 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -257,7 +257,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) |