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.
This commit is contained in:
Timon Kruiper 2022-05-02 23:04:10 +02:00 committed by Andreas Kling
parent 9f76b16124
commit 0d6d4508df
Notes: sideshowbarker 2024-07-17 11:21:47 +09:00

View File

@ -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 = .;