Began rewrite

This commit is contained in:
2025-02-16 16:27:46 +01:00
parent 295e3d9c18
commit 7d41cf45ed
82 changed files with 99 additions and 3028 deletions
+13 -34
View File
@@ -1,52 +1,31 @@
OUTPUT_FORMAT(binary)
ENTRY(start)
OUTPUT_FORMAT("elf32-i386")
ENTRY(_start)
SECTIONS {
. = 0x00100000;
kernel_start = .;
/* 1MB is a conventional place for kernels */
. = 1M;
/* Multiboot Header */
.multiboot ALIGN(4K) : {
/* We need the multiboot header in the first 8192 bytes */
.text BLOCK(4K) : ALIGN(4K) {
*(.multiboot)
}
.boot ALIGN(4K) : {
*(.boot)
}
. += 0xC000000;
/* Kernel Code */
.text ALIGN(4) : AT(ADDR(.text) - 0xC000000) {
*(.text)
*(.text.*)
}
/* Read-Only Data */
.rodata ALIGN(4) : AT(ADDR(.rodata) - 0xC000000) {
/* Read-only data */
.rodata BLOCK(4K) : ALIGN(4K) {
*(.rodata)
*(.rodata.*)
}
/* Read/Write Data */
.data ALIGN(4) : AT(ADDR(.data) - 0xC000000) {
/* Initalized r/w data */
.data BLOCK(4K) : ALIGN(4K) {
*(.data)
*(.data.*)
}
/* BSS Section */
.bss ALIGN(4) : AT(ADDR(.bss) - 0xC000000) {
/* Uninitialized r/w data and stack */
.bss BLOCK(4K) : ALIGN(4K) {
*(COMMON)
*(.bss)
*(.bss.*)
}
/* Discarded Sections */
/DISCARD/ : {
*(.note)
*(.note.*)
*(.comment)
}
kernel_end = .;
. = 4M;
}