New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 799385 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

ec: cr50: warning: section `.bss' type changed to PROGBITS

Project Member Reported by drinkcat@chromium.org, Jan 5 2018

Issue description

When building BOARD=cr50, we get these warnings:

# make BOARD=cr50 -j
  LD      RW/ec.RW.elf
  LD      RW/ec.RW_B.elf
/usr/x86_64-pc-linux-gnu/arm-none-eabi/binutils-bin/2.27.0/ld.bfd.real: warning: section `.bss' type changed to PROGBITS
/usr/x86_64-pc-linux-gnu/arm-none-eabi/binutils-bin/2.27.0/ld.bfd.real: warning: section `.bss' type changed to PROGBITS
  NM      RW/ec.RW.smap
  NM      RW/ec.RW_B.smap
  OBJCOPY RW/ec.RW.hex
  RW_SIGN RW/ec.RW.flat
  RW_SIGN RW/ec.RW_B.flat
  CAT     ec.obj
  OBJCOPY ec.bin
  COPY_RW ec.bin
  MV      ec.bin
  OBJCOPY ec.hex

I did a bisect with this:
git bisect run sh -c "rm -rf build/cr50; if make BOARD=cr50 -j 2>&1 | grep PROGBITS; then exit 1; fi"

And the first bad CL is:

6b516eda69f92cbc9f06b33cdf2c34cf1114ca16 is the first bad commit
commit 6b516eda69f92cbc9f06b33cdf2c34cf1114ca16
Author: Vadim Bendebury <vbendeb@chromium.org>
Date:   Fri Oct 20 10:30:02 2017 -0700

    tpm2: add nvmem data to the right segment
    
    Modules in board/cr50/tpm2 are part of the TPM task, and their .bss
    segment needs to be wiped out along with other TPM modules' when TPM
    is reset.
    
    The only module from this directory which has static variables is
    NVMem.c. This patch groups the variables into a structure, and makes
    sure that the structure is stored in the part of .bss which is zeroed
    when TPM is reset.
    
    BRANCH=none
    BUG=none
    TEST=verified that TPM wipeout happening during RMA reset is
         successful.
    
    Change-Id: I5f80dc5e4f5f7cdce2d1a1ed59e0fbac354c5bf6
    Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
    Reviewed-on: https://chromium-review.googlesource.com/733814
    Reviewed-by: Randall Spangler <rspangler@chromium.org>
    Reviewed-by: Scott Collyer <scollyer@chromium.org>

Not sure if we should be concerned.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/57bb4ddf4163dbe3da48ba56464adbabfa596344

commit 57bb4ddf4163dbe3da48ba56464adbabfa596344
Author: Vadim Bendebury <vbendeb@chromium.org>
Date: Fri Jan 05 22:28:47 2018

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>

[modify] https://crrev.com/57bb4ddf4163dbe3da48ba56464adbabfa596344/core/cortex-m/ec.lds.S
[modify] https://crrev.com/57bb4ddf4163dbe3da48ba56464adbabfa596344/board/cr50/tpm2/NVMem.c

Status: Fixed (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 1 2018

Labels: merge-merged-firmware-cr50-9308.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/ad8d5cb82ae7c7928a8f8ffcf59cc8713a163363

commit ad8d5cb82ae7c7928a8f8ffcf59cc8713a163363
Author: Vadim Bendebury <vbendeb@chromium.org>
Date: Thu Feb 01 00:48:09 2018

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

[modify] https://crrev.com/ad8d5cb82ae7c7928a8f8ffcf59cc8713a163363/core/cortex-m/ec.lds.S
[modify] https://crrev.com/ad8d5cb82ae7c7928a8f8ffcf59cc8713a163363/board/cr50/tpm2/NVMem.c

Sign in to add a comment