1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

Kernel: Merge split function and data sections into one during linking

Also add an assertion to make sure the safemem sections are never
discarded by the linker.
This commit is contained in:
Owen Smith 2021-02-09 22:49:02 +00:00 committed by Andreas Kling
parent 9e68752264
commit c2de22a635
2 changed files with 14 additions and 6 deletions

View file

@ -11,16 +11,15 @@ SECTIONS
$<TARGET_OBJECTS:boot>
*(.multiboot)
start_of_kernel_text = .;
*(.text)
*(.text.startup)
start_of_safemem_text = .;
*(.text.safemem)
KEEP(*(.text.safemem))
end_of_safemem_text = .;
start_of_safemem_atomic_text = .;
*(.text.safemem.atomic)
KEEP(*(.text.safemem.atomic))
end_of_safemem_atomic_text = .;
*(.text*)
end_of_kernel_text = .;
}
@ -34,13 +33,13 @@ SECTIONS
*(.ctors)
end_ctors = .;
*(.rodata)
*(.rodata*)
}
.data ALIGN(4K) : AT (ADDR(.data) - 0xc0000000)
{
start_of_kernel_data = .;
*(.data)
*(.data*)
end_of_kernel_data = .;
}