Files
Operator-system/kernel.ld

36 lines
730 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 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*)
}
}