mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
firmware: Fix compile error for FW_PAYLOAD with latest GCC binutils
We get following compile error for FW_PAYLOAD with latest GCC binutils: fw_payload.o(.text+0x1961): 15 bytes required for alignment to 16-byte boundary, but only 14 present Further investigating, it turn-out to be a known issue with RISC-V GCC binutils. (Refer, https://github.com/riscv/riscv-gnu-toolchain/issues/298) As a work-around, we disable relaxation when including DTB and PAYLOAD binary in fw_payload.S. Reported-by: David Abdurachmanov <david.abdurachmanov@sifive.com> Signed-off-by: Anup Patel <anup.patel@wdc.com> Tested-by: David Abdurachmanov <david.abdurachmanov@sifive.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -85,6 +85,14 @@ fw_options:
|
|||||||
add a0, zero, zero
|
add a0, zero, zero
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We disable relaxation because use of ".align"
|
||||||
|
* and ".balign" can potentially generate compile
|
||||||
|
* errors with latest RISC-V GCC Binutils.
|
||||||
|
*/
|
||||||
|
.option push
|
||||||
|
.option norelax
|
||||||
|
|
||||||
#ifdef FW_PAYLOAD_FDT_PATH
|
#ifdef FW_PAYLOAD_FDT_PATH
|
||||||
.align 4
|
.align 4
|
||||||
.section .text, "ax", %progbits
|
.section .text, "ax", %progbits
|
||||||
@@ -103,3 +111,5 @@ payload_bin:
|
|||||||
#else
|
#else
|
||||||
.incbin FW_PAYLOAD_PATH
|
.incbin FW_PAYLOAD_PATH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
.option pop
|
||||||
|
Reference in New Issue
Block a user