aboutsummaryrefslogtreecommitdiff
path: root/src/ps1/playstation.x
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-07-06 22:09:19 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2025-09-08 21:10:27 +0200
commitc8f9dbd494732c43d5b3626ba7010bf27d1f7664 (patch)
tree3799e318528e04b1a614a8b921cdc0f48d69edbf /src/ps1/playstation.x
parenta0672be24d53ec78d1a2567cf60d9f774b0d158a (diff)
downloadwnix-c8f9dbd494732c43d5b3626ba7010bf27d1f7664.tar.gz
Move PS1-specific files to subdirectory
Diffstat (limited to 'src/ps1/playstation.x')
-rw-r--r--src/ps1/playstation.x72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/ps1/playstation.x b/src/ps1/playstation.x
new file mode 100644
index 0000000..00a1a74
--- /dev/null
+++ b/src/ps1/playstation.x
@@ -0,0 +1,72 @@
+/*
+ * Linker script to generate an ELF file
+ * that has to be converted to PS-X EXE.
+ */
+
+TARGET("elf32-littlemips")
+OUTPUT_ARCH("mips")
+ENTRY(_start)
+INPUT(-lgcc)
+
+SECTIONS
+{
+ . = 0x80010000;
+
+ .text ALIGN(4) :
+ {
+ *(.text.startup)
+ *(.text*)
+ }
+
+ .rodata ALIGN(4) :
+ {
+ *(.rodata)
+ }
+
+ .data ALIGN(4) :
+ {
+ *(.data)
+ }
+
+ .ctors ALIGN(4) :
+ {
+ *(.ctors)
+ }
+
+ .dtors ALIGN(4) :
+ {
+ *(.dtors)
+ }
+
+ .bss ALIGN(4) :
+ {
+ *(.bss)
+ *(.bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ *(.sbss)
+ *(.sbss.*)
+ *(.gnu.linkonce.sb.*)
+ *(.scommon)
+ }
+
+ __text_start = ADDR(.text);
+ __text_end = ADDR(.text) + SIZEOF(.text);
+
+ __rodata_start = ADDR(.rodata);
+ __rodata_end = ADDR(.rodata) + SIZEOF(.rodata);
+
+ __data_start = ADDR(.data);
+ __data_end = ADDR(.data) + SIZEOF(.data);
+
+ __ctor_list = ADDR(.ctors);
+ __ctor_end = ADDR(.ctors) + SIZEOF(.ctors);
+
+ __dtor_list = ADDR(.dtors);
+ __dtor_end = ADDR(.dtors) + SIZEOF(.dtors);
+
+ __bss_start = ADDR(.bss);
+ __bss_end = ADDR(.bss) + SIZEOF(.bss);
+
+ __scratchpad = 0x1f800000;
+}