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

Kernel: Add some mission sections to the aarch64 linker script

The sections did end up in the ELF file, however they weren't
explicitely mentioned in the linker.ld script. In the future, we can add
the --orphan-handling=error flag to the linker options, which will
enforce that the sections used in the sources files also are mentioned
in the linker script.
This commit is contained in:
Timon Kruiper 2022-05-03 14:01:03 +02:00 committed by Linus Groh
parent 80048c694a
commit a1b352fdc0

View file

@ -1,11 +1,13 @@
ENTRY(start) ENTRY(start)
/* TODO: Add FLAGS to the program headers */
PHDRS PHDRS
{ {
text PT_LOAD ; text PT_LOAD ;
data PT_LOAD ; data PT_LOAD ;
bss PT_LOAD ; bss PT_LOAD ;
ksyms PT_LOAD FLAGS(PF_R) ; super_pages PT_LOAD ;
ksyms PT_LOAD ;
} }
SECTIONS SECTIONS
@ -20,6 +22,10 @@ SECTIONS
.rodata ALIGN(4K) : AT (ADDR(.rodata)) .rodata ALIGN(4K) : AT (ADDR(.rodata))
{ {
start_ctors = .;
*(.init_array)
end_ctors = .;
*(.rodata*) *(.rodata*)
} :data } :data
@ -33,8 +39,16 @@ SECTIONS
start_of_bss = .; start_of_bss = .;
*(.bss) *(.bss)
end_of_bss = .; end_of_bss = .;
. = ALIGN(4K);
*(.heap)
} :bss } :bss
.super_pages ALIGN(4K) (NOLOAD) : AT (ADDR(.super_pages))
{
*(.super_pages)
} :super_pages
.ksyms ALIGN(4K) : AT (ADDR(.ksyms)) .ksyms ALIGN(4K) : AT (ADDR(.ksyms))
{ {
start_of_kernel_ksyms = .; start_of_kernel_ksyms = .;