diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-01-07 05:29:33 -0500 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-01-07 05:29:33 -0500 |
commit | 019ed9331edee956a720484bfe13d80eb56b5df3 (patch) | |
tree | e5fd955b8c569243e03439c8e38a0ea8fc484da5 | |
parent | 420c790ef4accce6da00936252e607b9c1b52a0a (diff) |
kernel: linker: Create a section for each label instead of a generic one
-rw-r--r-- | kernel/boot/linker.ld | 26 |
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 = .; } |