test: Update linker script to match limine-c-template
diff --git a/test/linker.ld b/test/linker.ld
index 7ccf4a4c..23b5aa41 100644
--- a/test/linker.ld
+++ b/test/linker.ld
@@ -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)
+ }
}
