summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2021-07-11 05:28:20 +0300
committerAnup Patel <anup@brainfault.org>2021-07-11 15:03:30 +0300
commit397afe5ba1e9abeb48b801c864a56bda415441ce (patch)
tree66ca4e756d8ae51e28c710d644b410582b1f3b21 /firmware
parent7f1be8a624aca4805020588894d96c3617860c89 (diff)
downloadopensbi-397afe5ba1e9abeb48b801c864a56bda415441ce.tar.xz
fw_base: Put data in .data rather than .text
The -N linker option is supposed to make .text writable, but GNU ld and LLD differ in interpreting what that means. GNU ld will happily let you have relocations in it, but LLD will see that the input section is read-only (even though the output section is writable) and give an error. It's unclear if either of them intend to have that behaviour in this edge case, but regardless there's no reason not to just put the data in a writable .data section. Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/fw_base.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/fw_base.S b/firmware/fw_base.S
index a1213e3..928ca91 100644
--- a/firmware/fw_base.S
+++ b/firmware/fw_base.S
@@ -506,6 +506,7 @@ _skip_trap_exit_rv32_hyp:
/* We don't expect to reach here hence just hang */
j _start_hang
+ .data
.align 3
#ifdef FW_PIC
_runtime_offset: