mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +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:
parent
9e68752264
commit
c2de22a635
Notes:
sideshowbarker
2024-07-18 22:24:52 +09:00
Author: https://github.com/yeetari 🔰
Commit: c2de22a635
Pull-request: https://github.com/SerenityOS/serenity/pull/5284
Reviewed-by: https://github.com/tomuta
2 changed files with 14 additions and 6 deletions
|
@ -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 = .;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue