summaryrefslogtreecommitdiffhomepage
path: root/Linker
diff options
context:
space:
mode:
Diffstat (limited to 'Linker')
-rw-r--r--Linker/AMD64.ld44
-rw-r--r--Linker/PowerPC.ld21
2 files changed, 44 insertions, 21 deletions
diff --git a/Linker/AMD64.ld b/Linker/AMD64.ld
new file mode 100644
index 00000000..0b083ca0
--- /dev/null
+++ b/Linker/AMD64.ld
@@ -0,0 +1,44 @@
+OUTPUT_FORMAT("elf64-x86-64")
+
+ENTRY(Main)
+
+PHDRS {
+ null PT_NULL FLAGS(0) ;
+ text PT_LOAD FLAGS((1 << 0) | (1 << 2) | (1 << 3));
+ rodata PT_LOAD FLAGS((1 << 2)) ;
+ data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ;
+}
+
+SECTIONS {
+ . = 0x00080000;
+
+ .text : {
+ KEEP(*(.multiboot))
+ *(.text .text.*)
+ } :text
+
+ . += CONSTANT(MAXPAGESIZE);
+
+ .init : {
+ *(.initl)
+ }
+
+ . += CONSTANT(MAXPAGESIZE);
+
+ .rodata : {
+ *(.rodata .rodata.*)
+ } :rodata
+
+ . += CONSTANT(MAXPAGESIZE);
+
+ .data : {
+ *(.data .data.*)
+ } :data
+
+ . += CONSTANT(MAXPAGESIZE);
+
+ .bss : {
+ *(COMMON)
+ *(.bss .bss.*)
+ } :data
+} \ No newline at end of file
diff --git a/Linker/PowerPC.ld b/Linker/PowerPC.ld
deleted file mode 100644
index 722a86b8..00000000
--- a/Linker/PowerPC.ld
+++ /dev/null
@@ -1,21 +0,0 @@
-ENTRY(_start)
-
-SECTIONS
-{
- . = 0x02000000;
- .text BLOCK(4K) : ALIGN(4K)
- {
- *(.text)
- }
- . = 0x02100000;
- .data BLOCK(4K) : ALIGN(4K)
- {
-
- *(.rodata)
- *(.data)
- }
- .bss BLOCK(4K) (NOLOAD) : ALIGN(4K)
- {
- *(.bss)
- }
-} \ No newline at end of file