From 6db84bf318d720065ab34704aff071ee99559d98 Mon Sep 17 00:00:00 2001 From: Francesco Date: Mon, 26 Jan 2026 01:38:41 +0100 Subject: [PATCH] refactor(kernel.ld): adjust comments --- kernel.ld | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/kernel.ld b/kernel.ld index 8bd2f25..cfe720f 100644 --- a/kernel.ld +++ b/kernel.ld @@ -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.*);