From: Michael Brown Date: Tue, 6 May 2025 14:48:22 +0000 (+0100) Subject: [riscv] Place prefix debug strings in .rodata X-Git-Tag: rolling/bin~323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3cbdc86fcb7a483bce7d73dae269257cb61002e;p=thirdparty%2Fipxe.git [riscv] Place prefix debug strings in .rodata The GNU assembler does not seem to automatically assume alignment to an instruction boundary for sections containing assembled code. Place the prefix debug strings (if present) in .rodata rather than in .prefix, to avoid potentially creating misaligned code sections. Signed-off-by: Michael Brown --- diff --git a/src/arch/riscv/prefix/sbiprefix.S b/src/arch/riscv/prefix/sbiprefix.S index f590b324b..c26c1713c 100644 --- a/src/arch/riscv/prefix/sbiprefix.S +++ b/src/arch/riscv/prefix/sbiprefix.S @@ -49,7 +49,7 @@ */ .macro progress message #ifndef NDEBUG - .section ".prefix.data", "aw", @progbits + .section ".rodata", "a", @progbits progress_\@: .ascii "\message" .equ progress_\@_len, . - progress_\@