diff options
Diffstat (limited to 'crt/nt64/crt1.c')
-rw-r--r-- | crt/nt64/crt1.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/crt/nt64/crt1.c b/crt/nt64/crt1.c new file mode 100644 index 0000000..6d22669 --- /dev/null +++ b/crt/nt64/crt1.c @@ -0,0 +1,33 @@ +#ifdef LIBC_STATIC +#define __external_routine +#else +#define __external_routine __attribute__((dllimport)) +#endif + +#include "psxglue.h" + +/** + * options: posix session, fallback terminal emulator + * x86_64-nt64-midipix-gcc --target-help | grep -A2 posix +**/ + +static const int __disabled = 0; +extern const int __crtopt_posix __attribute((weak,alias("__disabled"))); +extern const int __crtopt_ttydbg __attribute((weak,alias("__disabled"))); + +int main(); + +__external_routine +__psx_init_routine __psx_init; + +__external_routine +void __libc_entry_routine(void *,void *,int); + +void _start(void) +{ + __libc_entry_routine( + main, + __psx_init, + __crtopt_posix | __crtopt_ttydbg); +} + |