refactor(kernel.ld): adjust comments

This commit is contained in:
2026-01-26 01:38:41 +01:00
parent 10a38cf572
commit 6db84bf318

View File

@@ -1,29 +1,35 @@
/*
/**
* This is the entry point
* `boot` should be a defined label
*/
ENTRY(boot)
/* SECTIONS tells to linker how to arrange sections inside the memory */
/**
* SECTIONS tells to linker how to arrange sections inside the memory
*/
SECTIONS {
/*
/**
* This is the base address (start address of the kernel)
* OpenSBI takes little ram
*/
. = 0x80200000;
/* This section contains the code of the program */
/**
* This section contains the code of the program
*/
.text :{
/*
/**
* Take the .text.boot before everything
* KEEP() prevents the linker to mark it as "unused"
*/
KEEP(*(.text.boot));
/* Include everything else inside the .text section */
/**
* Include everything else inside the .text section
*/
*(.text .text.*);
}
/*
/**
* Contains constant read-only data
* Align the start of the section at 4 byte
*/
@@ -31,12 +37,16 @@ SECTIONS {
*(.rodata .rodata.*);
}
/* Contains read/write data */
/**
* Contains read/write data
*/
.data : ALIGN(4) {
*(.data .data.*);
}
/* Contains read/data with an initial value of zero */
/**
* Contains read/data with an initial value of zero
*/
.bss : ALIGN(4) {
__bss = .;
*(.bss .bss.* .sbss .sbss.*);