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 new file mode 100644 index 0000000..1d6e11a --- /dev/null +++ b/stub.S @@ -0,0 +1,32 @@ +.text +.globl __psx_init +.globl ___psx_init +.globl _so_entry_point +.globl __so_entry_point + +.def __psx_init; .scl 2; .type 32; .endef +.def ___psx_init; .scl 2; .type 32; .endef + +__psx_init: +___psx_init: +_so_entry_point: +__so_entry_point: + mov $1, %eax + ret + + .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 diff --git a/stub.s b/stub.s deleted file mode 100644 index 7c50c8e..0000000 --- a/stub.s +++ /dev/null @@ -1,24 +0,0 @@ -.text -.globl __psx_init -.globl ___psx_init -.globl _so_entry_point -.globl __so_entry_point - -.def __psx_init; .scl 2; .type 32; .endef -.def ___psx_init; .scl 2; .type 32; .endef - -__psx_init: -___psx_init: -_so_entry_point: -__so_entry_point: - mov $1, %eax - ret - - .section .got$stub - .global __imp___psx_init - .global __imp____psx_init -__imp___psx_init: - .quad __psx_init -__imp____psx_init: - .long ___psx_init -