summaryrefslogtreecommitdiff
path: root/linker.lds
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2025-07-26 16:03:00 +0200
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2025-07-26 16:03:00 +0200
commitf199eae0154f354c37750c8cd3037f94dbfe70db (patch)
tree90938c26bdbe388745a0c3bbd074af92fd49ae13 /linker.lds
Initial commit
Diffstat (limited to 'linker.lds')
-rw-r--r--linker.lds37
1 files changed, 37 insertions, 0 deletions
diff --git a/linker.lds b/linker.lds
new file mode 100644
index 0000000..d01b37a
--- /dev/null
+++ b/linker.lds
@@ -0,0 +1,37 @@
+OUTPUT_FORMAT(elf64-x86-64)
+PHDRS
+{
+ limine_requests PT_LOAD;
+ text PT_LOAD;
+ rodata PT_LOAD;
+ data PT_LOAD;
+}
+SECTIONS
+{
+ . = 0xFFFFFFFF80000000;
+ .limine_requests : {
+ KEEP(*(.limine_requests_start))
+ KEEP(*(.limine_requests))
+ KEEP(*(.limine_requests_end))
+ } :limine_requests
+
+ . = ALIGN(CONSTANT(MAXPAGESIZE));
+ .text : {
+ *(.text .text.*)
+ } :text
+
+ . = ALIGN(CONSTANT(MAXPAGESIZE));
+ .rodata : {
+ *(.rodata .rodata.*)
+ } :rodata
+
+ . = ALIGN(CONSTANT(MAXPAGESIZE));
+ .data : {
+ *(.data .data.*)
+ } :data
+
+ .bss : {
+ *(.bss .bss.*)
+ *(COMMON)
+ } :data
+}