1
0
Fork 0
emk/kernel/linker.ld
2025-05-14 13:14:37 +02:00

58 lines
No EOL
945 B
Text

OUTPUT_FORMAT(elf64-x86-64)
ENTRY(emk_entry)
PHDRS
{
limine_requests PT_LOAD;
text PT_LOAD;
rodata PT_LOAD;
data PT_LOAD;
}
SECTIONS
{
. = 0xffffffff80000000;
.limine_requests : {
__limine_requests_start = .;
KEEP(*(.limine_requests_start))
KEEP(*(.limine_requests))
KEEP(*(.limine_requests_end))
__limine_requests_end = .;
} :limine_requests
. = ALIGN(0x1000);
.text : {
__text_start = .;
*(.text .text.*)
__text_end = .;
} :text
. = ALIGN(0x1000);
.rodata : {
__rodata_start = .;
*(.rodata .rodata.*)
__rodata_end = .;
} :rodata
. = ALIGN(0x1000);
.data : {
__data_start = .;
*(.data .data.*)
} :data
.bss : {
*(.bss .bss.*)
*(COMMON)
__data_end = .;
} :data
/DISCARD/ : {
*(.eh_frame*)
*(.note .note.*)
}
}