mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
Kernel: Make kernel symbols available much earlier in the boot process
This adds a new section .ksyms at the end of the linker map, reserves 5MiB for it (which are after end_of_kernel_image so they get re-used once MemoryManager is initialized) and then embeds the symbol map into the kernel binary with objcopy. This also shrinks the .ksyms section to the real size of the symbol file (around 900KiB at the moment). By doing this we can make the symbol map available much earlier in the boot process, i.e. even before VFS is available.
This commit is contained in:
parent
5a44a0b9f4
commit
7236584132
5 changed files with 28 additions and 18 deletions
|
@ -123,6 +123,8 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init()
|
|||
kmalloc_init();
|
||||
slab_alloc_init();
|
||||
|
||||
load_kernel_symbol_table();
|
||||
|
||||
ConsoleDevice::initialize();
|
||||
s_bsp_processor.initialize(0);
|
||||
|
||||
|
@ -264,8 +266,6 @@ void init_stage2(void*)
|
|||
|
||||
Process::current()->set_root_directory(VirtualFileSystem::the().root_custody());
|
||||
|
||||
load_kernel_symbol_table();
|
||||
|
||||
// Switch out of early boot mode.
|
||||
g_in_early_boot = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue