summaryrefslogtreecommitdiff
path: root/src/arch/i386/conf/e0.ld
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-13 14:53:43 -0400
committerIan Moffett <ian@osmora.org>2025-09-13 14:53:43 -0400
commite698061ebaf0cf1a10c11c51a6c6cd46a331959c (patch)
tree19faff0de74be4661e55478ee7d31a8427c067c6 /src/arch/i386/conf/e0.ld
initial commit
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/arch/i386/conf/e0.ld')
-rw-r--r--src/arch/i386/conf/e0.ld46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/arch/i386/conf/e0.ld b/src/arch/i386/conf/e0.ld
new file mode 100644
index 0000000..5b7c7fc
--- /dev/null
+++ b/src/arch/i386/conf/e0.ld
@@ -0,0 +1,46 @@
+OUTPUT_FORMAT(elf64-x86-64)
+OUTPUT_ARCH(i386:x86-64)
+ENTRY(__bsp_entry)
+
+PHDRS
+{
+ text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ;
+ rodata PT_LOAD FLAGS((1 << 2)) ;
+ data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ;
+}
+
+SECTIONS
+{
+ . = 0xFFFFFFFF80000000;
+
+ .text : {
+ *(.text .text.*)
+ } :text
+
+ . += CONSTANT(MAXPAGESIZE);
+
+ .rodata : {
+ *(.rodata .rodata.*)
+ } :rodata
+
+ . += CONSTANT(MAXPAGESIZE);
+
+ .data : {
+ *(.data)
+ } :data
+
+ .bss : {
+ *(COMMON)
+ *(.bss .bss.*)
+ } :data
+
+ . = ALIGN(64);
+ .data.cacheline_aligned : {
+ *(.data.cacheline_aligned)
+ }
+
+ /DISCARD/ : {
+ *(.eh_frame .eh_frame.*)
+ *(.note .note.*)
+ }
+}