Some unfinished changes + TODO chnages

This commit is contained in:
2025-03-18 20:40:29 +01:00
parent 244b83d370
commit 883cd5c1d4
11 changed files with 333 additions and 205 deletions
+19 -9
View File
@@ -1,31 +1,41 @@
OUTPUT_FORMAT("elf32-i386")
OUTPUT_ARCH("i386");
ENTRY(_start)
/* Define correct program headers */
PHDRS {
text PT_LOAD FLAGS((1 << 0) | (1 << 2)); /* Read, Execute */
rodata PT_LOAD FLAGS((1 << 0)); /* Read */
data PT_LOAD FLAGS((1 << 0) | (1 << 1)); /* Read, Write */
}
/* Define sections */
SECTIONS {
/* 1MB is a conventional place for kernels */
. = 1M;
/* We need the multiboot header in the first 8192 bytes */
__kernel_start = .;
.text BLOCK(4K) : ALIGN(4K) {
*(.multiboot)
*(.text)
}
} : text
/* Read-only data */
.rodata BLOCK(4K) : ALIGN(4K) {
*(.rodata)
}
} : rodata
/* Initalized r/w data */
.data BLOCK(4K) : ALIGN(4K) {
*(.data)
}
} : data
/* Uninitialized r/w data and stack */
.bss BLOCK(4K) : ALIGN(4K) {
*(COMMON)
*(.bss)
}
} : data
__kernel_end = .;
. = 4M;
/DISCARD/ : {
*(.eh_frame)
*(.note*)
}
}