Better docs and structure

This commit is contained in:
2026-02-26 21:33:16 +00:00
parent d449150169
commit 13a281fa4f
18 changed files with 892 additions and 387 deletions

View File

@@ -1,25 +1,33 @@
/*
* 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;
. = 0x100000; /* load address: 1 MB */
.text : ALIGN(0x1000)
.text : ALIGN(0x1000) /* executable code */
{
*(.text*)
}
.rodata : ALIGN(0x1000)
.rodata : ALIGN(0x1000) /* read-only data / string literals */
{
*(.rodata*)
}
.data : ALIGN(0x1000)
.data : ALIGN(0x1000) /* initialised read-write data */
{
*(.data*)
}
.bss : ALIGN(0x1000)
.bss : ALIGN(0x1000) /* zero-initialised data */
{
*(COMMON)
*(.bss*)