summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--stub.S (renamed from stub.s)8
2 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6c0f91a..14a1a7b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
all:
- $(TARGET)-gcc -shared -nostdlib -mout-implib -olibpsxscl.so stub.s
- $(TARGET)-as -o stub.o stub.s
+ $(TARGET)-gcc -shared -nostdlib -mout-implib -olibpsxscl.so stub.S
+ $(TARGET)-gcc -c -o stub.o stub.S
$(TARGET)-ar rc libpsxscl.a stub.o
$(TARGET)-ranlib libpsxscl.a
diff --git a/stub.s b/stub.S
index 7c50c8e..1d6e11a 100644
--- a/stub.s
+++ b/stub.S
@@ -17,8 +17,16 @@ __so_entry_point:
.section .got$stub
.global __imp___psx_init
.global __imp____psx_init
+
+#ifdef __NT64
__imp___psx_init:
+__imp____psx_init:
.quad __psx_init
+#endif
+
+#ifdef __NT32
+__imp___psx_init:
__imp____psx_init:
.long ___psx_init
+#endif