From 86062740f1e8eeb4c554055cf304dc1e0e87ea43 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 8 Mar 2015 13:23:20 -0400 Subject: initial commit of core port files. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- src/ldso/nt64/dl_iterate_phdr.c | 10 +++++++ src/ldso/nt64/dynlink.c | 58 +++++++++++++++++++++++++++++++++++++++++ src/ldso/nt64/start.s | 2 ++ src/ldso/nt64/tlsdesc.c | 8 ++++++ 4 files changed, 78 insertions(+) create mode 100644 src/ldso/nt64/dl_iterate_phdr.c create mode 100644 src/ldso/nt64/dynlink.c create mode 100644 src/ldso/nt64/start.s create mode 100644 src/ldso/nt64/tlsdesc.c (limited to 'src/ldso/nt64') diff --git a/src/ldso/nt64/dl_iterate_phdr.c b/src/ldso/nt64/dl_iterate_phdr.c new file mode 100644 index 0000000..f98a509 --- /dev/null +++ b/src/ldso/nt64/dl_iterate_phdr.c @@ -0,0 +1,10 @@ +#include +#include +#include + +typedef int __ldso_phdr_callback(struct dl_phdr_info * info, size_t size, void * data); + +int dl_iterate_phdr(__ldso_phdr_callback * callback, void * data) +{ + return -1; +} diff --git a/src/ldso/nt64/dynlink.c b/src/ldso/nt64/dynlink.c new file mode 100644 index 0000000..e5329e6 --- /dev/null +++ b/src/ldso/nt64/dynlink.c @@ -0,0 +1,58 @@ +#define _BSD_SOURCE + +#include +#include "pthread_impl.h" + +int __dladdr(const void * addr, Dl_info * info) +{ + return 0; +} + +int __dlinfo(void * dso, int req, void * res) +{ + return 0; +} + +void *__dlsym(void * restrict p, const char * restrict s, void * restrict ra) +{ + return 0; +} + +void * dlopen(const char * file, int mode) +{ + return 0; +} + +int dlclose(void *p) +{ + return 0; +} + +char * dlerror(void) +{ + return 0; +} + +void __reset_tls(void) +{ +} + +void *__copy_tls(unsigned char * mem) +{ + /** + * this is always the simple case, since: + * emutls is based on PE named sections; and + * tls allocation and initialization are handled by clone(2) + **/ + + pthread_t td; + void ** dtv; + + dtv = (void **)mem; + dtv[0] = 0; + + td = (void *)(dtv + 1); + td->dtv = dtv; + + return td; +} diff --git a/src/ldso/nt64/start.s b/src/ldso/nt64/start.s new file mode 100644 index 0000000..32dc52f --- /dev/null +++ b/src/ldso/nt64/start.s @@ -0,0 +1,2 @@ +# standard dynamic loader is not required +# optional dynamic loader [to be] provided by libldso/libpsxscl diff --git a/src/ldso/nt64/tlsdesc.c b/src/ldso/nt64/tlsdesc.c new file mode 100644 index 0000000..7015e30 --- /dev/null +++ b/src/ldso/nt64/tlsdesc.c @@ -0,0 +1,8 @@ +#include + +ptrdiff_t __tlsdesc_static(void) +{ + return 0; +} + +ptrdiff_t __tlsdesc_dynamic(void) __attribute__((alias("__tlsdesc_static"))); -- cgit v1.2.3