forked from Mirrors/opensbi
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user