From 4ab9c5092cb1fa7d8a0ead655c02d74b81e54011 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 15 Oct 2017 15:08:48 -0400 Subject: ldso preparation: added crtidata.c for exe's not using the framework loader. --- crt/nt32/Scrt1.c | 9 +++++++++ crt/nt32/crtidata.c | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 crt/nt32/crtidata.c (limited to 'crt/nt32') diff --git a/crt/nt32/Scrt1.c b/crt/nt32/Scrt1.c index ff5789f..c635211 100644 --- a/crt/nt32/Scrt1.c +++ b/crt/nt32/Scrt1.c @@ -1,2 +1,11 @@ +#include "psxglue.h" + +__psx_init_routine __psx_init; + +__psx_init_routine * __psx_init_fn(void) +{ + return __psx_init; +} + #define LIBC_STATIC #include "crt1.c" diff --git a/crt/nt32/crtidata.c b/crt/nt32/crtidata.c new file mode 100644 index 0000000..6037c25 --- /dev/null +++ b/crt/nt32/crtidata.c @@ -0,0 +1,16 @@ +/****************************************/ +/* dynamically linked applications only */ +/* see also: Scrt1.c */ +/****************************************/ + +#include "psxglue.h" + +#define __external_routine __attribute__((dllimport)) + +__external_routine +__psx_init_routine __psx_init; + +__psx_init_routine * __psx_init_fn(void) +{ + return __psx_init; +} -- cgit v1.2.3