test: Update linker script to match limine-c-template

This commit is contained in:
mintsuki 2024-07-05 12:02:09 +02:00
parent a9cf7e0057
commit 8c9e08eab0
1 changed files with 15 additions and 23 deletions

View File

@ -1,29 +1,17 @@
PHDRS
{
text PT_LOAD FLAGS(0x05); /* Execute + Read */
rodata PT_LOAD FLAGS(0x04); /* Read only */
data PT_LOAD FLAGS(0x06); /* Write + Read */
dynamic PT_DYNAMIC FLAGS(0x06); /* Dynamic segment needed for PIE */
}
SECTIONS
{
. = 0;
. = SIZEOF_HEADERS;
kernel_start = .;
.text : {
*(.text .text.*)
} :text
. += 0x1000;
.rodata : {
.rodata ALIGN(CONSTANT(MAXPAGESIZE)) : {
*(.rodata .rodata.*)
} :rodata
}
. += 0x1000;
.text ALIGN(CONSTANT(MAXPAGESIZE)) : {
*(.text .text.*)
}
.data : {
.data ALIGN(CONSTANT(MAXPAGESIZE)) : {
*(.data .data.*)
*(.limine_requests_start_marker)
@ -31,15 +19,19 @@ SECTIONS
*(.limine_requests_end_marker)
*(.sdata .sdata.*)
} :data
}
.dynamic : {
*(.dynamic)
} :data :dynamic
}
.bss : {
.bss ALIGN(CONSTANT(MAXPAGESIZE)) : {
*(.sbss .sbss.*)
*(.bss .bss.*)
*(COMMON)
} :data
}
/DISCARD/ : {
*(.interp)
}
}