From 0d6d4508dffa763edf2a8bef4195c003b28308e4 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Mon, 2 May 2022 23:04:10 +0200 Subject: [PATCH] Kernel: Add the .ksyms section to the aarch64 Kernel binary Previously the embedmap.sh script generated a warning, since there was no section defined where the actual kernel.map could be stored. This is necesarry for generating kernel backtraces. --- Kernel/Arch/aarch64/linker.ld | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Kernel/Arch/aarch64/linker.ld b/Kernel/Arch/aarch64/linker.ld index 6407869d9d..5a78882ca9 100644 --- a/Kernel/Arch/aarch64/linker.ld +++ b/Kernel/Arch/aarch64/linker.ld @@ -5,6 +5,7 @@ PHDRS text PT_LOAD ; data PT_LOAD ; bss PT_LOAD ; + ksyms PT_LOAD FLAGS(PF_R) ; } SECTIONS @@ -34,14 +35,19 @@ SECTIONS end_of_bss = .; } :bss + .ksyms ALIGN(4K) : AT (ADDR(.ksyms)) + { + start_of_kernel_ksyms = .; + *(.kernel_symbols) + end_of_kernel_ksyms = .; + } :ksyms + /* FIXME: 8MB is enough space for all of the tables required to identity map physical memory. 8M is wasteful, so this should be properly calculated. */ /* FIXME: Placeholder to satisfy linker */ - start_of_kernel_ksyms = .; - end_of_kernel_ksyms = .; start_of_kernel_text = .; end_of_kernel_text = .; start_of_kernel_image = .;