vmm: Use the kernel's ELF file to map the sections (and now works!)

This commit is contained in:
RaphProductions 2025-05-18 21:45:14 +02:00
parent 875dc2685b
commit c658f738e4
9 changed files with 250 additions and 59 deletions

View file

@ -25,36 +25,29 @@ SECTIONS
/* Define a section to contain the Limine requests and assign it to its own PHDR */
.limine_requests : {
reqs_start_ld = .;
KEEP(*(.limine_requests_start))
KEEP(*(.limine_requests))
KEEP(*(.limine_requests_end))
reqs_end_ld = .;
} :limine_requests
/* Move to the next memory page for .text */
. = ALIGN(CONSTANT(MAXPAGESIZE));
.text : {
text_start_ld = .;
*(.text .text.*)
text_end_ld = .;
} :text
/* Move to the next memory page for .rodata */
. = ALIGN(CONSTANT(MAXPAGESIZE));
.rodata : {
rodata_start_ld = .;
*(.rodata .rodata.*)
rodata_end_ld = .;
} :rodata
/* Move to the next memory page for .data */
. = ALIGN(CONSTANT(MAXPAGESIZE));
.data : {
data_start_ld = .;
*(.data .data.*)
} :data
@ -65,7 +58,6 @@ SECTIONS
.bss : {
*(.bss .bss.*)
*(COMMON)
data_end_ld = .;
} :data
/* Discard .note.* and .eh_frame* since they may cause issues on some hosts. */