summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>2019-06-11 14:11:48 +0300
committerAnup Patel <anup@brainfault.org>2019-06-12 15:13:47 +0300
commit6fec1c7e1118add3aa16707914ada8adca09bf1b (patch)
tree60b365a85c3cba57c3497d048d82c45f278a571a /firmware
parentf19611e1e4918ca19d0278f7494965c3083fd8d0 (diff)
downloadopensbi-6fec1c7e1118add3aa16707914ada8adca09bf1b.tar.xz
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>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/fw_base.ldS4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/fw_base.ldS b/firmware/fw_base.ldS
index 84d3758..0ac75f2 100644
--- a/firmware/fw_base.ldS
+++ b/firmware/fw_base.ldS
@@ -50,6 +50,8 @@
{
PROVIDE(_data_start = .);
+ *(.sdata)
+ *(.sdata.*)
*(.data)
*(.data.*)
*(.readmostly.data)
@@ -64,6 +66,8 @@
.bss :
{
PROVIDE(_bss_start = .);
+ *(.sbss)
+ *(.sbss.*)
*(.bss)
*(.bss.*)
. = ALIGN(8);