]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[riscv] Place prefix debug strings in .rodata
authorMichael Brown <mcb30@ipxe.org>
Tue, 6 May 2025 14:48:22 +0000 (15:48 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 6 May 2025 14:51:39 +0000 (15:51 +0100)
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 <mcb30@ipxe.org>
src/arch/riscv/prefix/sbiprefix.S

index f590b324bdb1c892c6fa9ea836d19f6a4300cf0a..c26c1713c7e6380cc712c9137602141939251028 100644 (file)
@@ -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_\@