Files
OS/linker.ld
2025-03-21 19:55:17 -07:00

24 lines
486 B
Plaintext

ENTRY(_start)
PHDRS {
header PT_LOAD FILEHDR PHDRS ALIGN(4)
kernel PT_LOAD FLAGS(5)
}
SECTIONS
{
/* Place the multiboot header at file offset 0 */
. = 0;
.multiboot : {
KEEP(*(.multiboot))
} AT(0) : header
/* Place the remaining kernel sections starting at 1MB */
. = 0x100000;
.text : {
*(.text*)
} : kernel
.rodata : { *(.rodata*) } : kernel
.data : { *(.data*) } : kernel
.bss : { *(.bss*) } : kernel
}