From d72a3b5959bba2a5150e4e975f097a312b66cab7 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sat, 17 Sep 2022 13:36:24 +0200 Subject: [PATCH] Kernel: Do not mark `.ro_after_init` as `NOLOAD` There is no particular reason why this section should be marked as `NOBITS` (as it might very well include initialized values), and it resolves 90% of the mismatches between the input and output sections, which LLD now warns about when linking. --- Kernel/Arch/x86/linker.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Arch/x86/linker.ld b/Kernel/Arch/x86/linker.ld index 703fda2235..e11648fe13 100644 --- a/Kernel/Arch/x86/linker.ld +++ b/Kernel/Arch/x86/linker.ld @@ -71,7 +71,7 @@ SECTIONS end_of_kernel_data = .; } :data - .ro_after_init ALIGN(4K) (NOLOAD) : AT(ADDR(.ro_after_init)) + .ro_after_init ALIGN(4K) : AT(ADDR(.ro_after_init)) { start_of_ro_after_init = .; *(.ro_after_init);