Implemented project structure

This commit is contained in:
Fabio Scotto di Santolo
2025-11-29 18:39:57 +01:00
commit c59b4004e5
6024 changed files with 1100108 additions and 0 deletions

42
kernel.ld Normal file
View File

@@ -0,0 +1,42 @@
ENTRY(boot)
SECTIONS {
/* base address */
. = 0x80200000;
/* contains the instructions */
.text :{
/* .text.boot always placed at the beginning */
/* KEEP to not discard section */
KEEP(*(.text.boot));
/* match all input files with all .text and all .text.* section */
,*(.text .text.);
}
/* contains read-only data */
.rodata : ALIGN(4) {
,*(.rodata .rodata.*);
}
/* contains read/write data */
/* adjust current address to a 4-byte boundary */
.data : ALIGN(4) {
,*(.data .data.*);
}
/* contains read/write data with an initial value of zero */
/* adjust current address to a 4-byte boundary */
.bss : ALIGN(4) {
/* assign current address to the symbol '__bss' */
/* you can access this symbol in C using 'extern char __bss;' */
__bss = .;
,*(.bss .bss.* .sbss .sbss.*);
__bss_end = .;
}
/* kernel stack right after .bss and with size 128KB */
/* adjust current address to a 4-byte boundary */
. = ALIGN(4);
. += 128 * 1024; /* 128KB */
__stack_top = .;
}