From 019ed9331edee956a720484bfe13d80eb56b5df3 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Tue, 7 Jan 2025 05:29:33 -0500 Subject: kernel: linker: Create a section for each label instead of a generic one --- kernel/boot/linker.ld | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'kernel') 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 = .; } -- cgit v1.2.3