From a7facd370f58d5511c7ec7e284d29ac16f598ebd Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Mon, 29 Jun 2026 09:50:18 -0400 Subject: [PATCH] lzloader: give .rodata its own output section The decompressor stub's linker script placed .data at a fixed OSV_LZKERNEL_BASE + 0x3000 offset and never emitted an output section for .rodata, so read-only data (string literals, jump tables) emitted by the compressor stub had no defined home and was silently folded into the gap before .data. Emit an explicit .rodata output section between .text and .data so the stub's read-only data is laid out deterministically instead of depending on the 0x3000 fudge factor. --- arch/x64/lzloader.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x64/lzloader.ld b/arch/x64/lzloader.ld index 82d8ddcfd1..40cabf745c 100644 --- a/arch/x64/lzloader.ld +++ b/arch/x64/lzloader.ld @@ -10,7 +10,7 @@ SECTIONS { . = OSV_LZKERNEL_BASE + 0x1000; .text : { *(.text) } - . = OSV_LZKERNEL_BASE + 0x3000; + .rodata : { *(.rodata .rodata.*) } .data : { *(.data) } .bss : { *(.bss) } .edata = .;