/* * kernel.ld – Linker script for the ELF64 kernel. * * The kernel is loaded at physical address 0x100000 (1 MB) by the * UEFI loader. Each section is page-aligned (4 KB) so that page- * level permissions can be applied later if desired. */ ENTRY(kmain) SECTIONS { . = 0x100000; /* load address: 1 MB */ .text : ALIGN(0x1000) /* executable code */ { *(.text*) } .rodata : ALIGN(0x1000) /* read-only data / string literals */ { *(.rodata*) } .data : ALIGN(0x1000) /* initialised read-write data */ { *(.data*) } .bss : ALIGN(0x1000) /* zero-initialised data */ { *(COMMON) *(.bss*) } }