diff options
author | midipix <writeonce@midipix.org> | 2015-04-05 17:05:57 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-04-05 17:05:57 -0400 |
commit | 296178913c5dfbc2b35842fc16ed680ef51fd402 (patch) | |
tree | 6720928dbc03c3d656229d2509eda38f6eb0628b /crt/nt32/crt1.c | |
parent | 20a5ca45ef2f5716e8f2dea42c7e8a6b3367619f (diff) | |
download | mmglue-296178913c5dfbc2b35842fc16ed680ef51fd402.tar.bz2 mmglue-296178913c5dfbc2b35842fc16ed680ef51fd402.tar.xz |
nt32: initial commit of core port files.
signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information.
Diffstat (limited to 'crt/nt32/crt1.c')
-rw-r--r-- | crt/nt32/crt1.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/crt/nt32/crt1.c b/crt/nt32/crt1.c new file mode 100644 index 0000000..6d22669 --- /dev/null +++ b/crt/nt32/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); +} + |