aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-01-07 05:29:33 -0500
committerRaghuram Subramani <raghus2247@gmail.com>2025-01-07 05:29:33 -0500
commit019ed9331edee956a720484bfe13d80eb56b5df3 (patch)
treee5fd955b8c569243e03439c8e38a0ea8fc484da5
parent420c790ef4accce6da00936252e607b9c1b52a0a (diff)
kernel: linker: Create a section for each label instead of a generic one
-rw-r--r--kernel/boot/linker.ld26
1 files changed, 11 insertions, 15 deletions
diff --git a/kernel/boot/linker.ld b/kernel/boot/linker.ld
index 5406ff4..1ea6694 100644
--- a/kernel/boot/linker.ld
+++ b/kernel/boot/linker.ld
@@ -20,16 +20,6 @@
designated as the entry point. */
ENTRY(_start)
-PHDRS
-{
- /* Flags: Read/Execute
- * EXECUTABLE (1 << 0)
- * WRITABLE (1 << 1)
- * READABLE (1 << 2)
- */
- OTHERS PT_LOAD FLAGS (0x5);
-}
-
/* Tell where the various sections of the object files will be put in the final
kernel image. */
SECTIONS
@@ -66,13 +56,13 @@ SECTIONS
/* Read-only data. */
.rodata : ALIGN(4K)
{
- *(.rodata)
+ *(.rodata*)
}
/* Read-write data (initialized) */
.data : ALIGN(4K)
{
- *(.data)
+ *(.data*)
}
/* Read-write data (uninitialized) and stack */
@@ -82,10 +72,16 @@ SECTIONS
*(.bss)
}
- .other : ALIGN(4K)
+ .debug : ALIGN(4K)
{
- *(*)
- } : OTHERS
+ *(.comment)
+ *(.debug*)
+ }
+
+ .eh_frame : ALIGN(4K)
+ {
+ *(.eh_frame)
+ }
kernel_end = .;
}