firmware: add missing linker sections to fw_base.ldS

The linker sections .sdata and .sbss are missing from the linker script
fw_base.ldS. Add them to the .data and .bss sections.

On current builds, most variables are in the .sbss section. They are not
correctly initialized to zero, because they are not within the
boundaries indicated by _bss_start and _bss_end. Currently, this does
not cause any issues, however with relocation support lock-ups may occur
due to incorrectly initialized lock variables.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Acked-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
Lukas Auer
2019-06-11 13:11:48 +02:00
committed by Anup Patel
parent f19611e1e4
commit 6fec1c7e11

View File

@@ -50,6 +50,8 @@
{ {
PROVIDE(_data_start = .); PROVIDE(_data_start = .);
*(.sdata)
*(.sdata.*)
*(.data) *(.data)
*(.data.*) *(.data.*)
*(.readmostly.data) *(.readmostly.data)
@@ -64,6 +66,8 @@
.bss : .bss :
{ {
PROVIDE(_bss_start = .); PROVIDE(_bss_start = .);
*(.sbss)
*(.sbss.*)
*(.bss) *(.bss)
*(.bss.*) *(.bss.*)
. = ALIGN(8); . = ALIGN(8);