summaryrefslogtreecommitdiffhomepage
path: root/arch/nt64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/nt64')
-rw-r--r--arch/nt64/psxglue.h4
-rw-r--r--arch/nt64/src/crt_glue.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/nt64/psxglue.h b/arch/nt64/psxglue.h
index 2bcf329..0e4a440 100644
--- a/arch/nt64/psxglue.h
+++ b/arch/nt64/psxglue.h
@@ -31,6 +31,8 @@ struct __ldso_vtbl {
};
struct __psx_vtbl {
+ void (*do_global_ctors_fn)();
+ void (*do_global_dtors_fn)();
__psx_start_main * start_main;
__psx_convert_thread * convert_thread;
__psx_unmapself * unmapself;
@@ -47,8 +49,6 @@ struct __psx_context {
unsigned int teb_libc_idx;
void * pthread_surrogate_fn;
void * pthread_create_fn;
- void * do_global_ctors_fn;
- void * do_global_dtors_fn;
};
struct __tlca_abi {
diff --git a/arch/nt64/src/crt_glue.c b/arch/nt64/src/crt_glue.c
index 08928c1..2967ad6 100644
--- a/arch/nt64/src/crt_glue.c
+++ b/arch/nt64/src/crt_glue.c
@@ -82,8 +82,8 @@ void __libc_entry_routine(
__teb_libc_idx = ctx.teb_libc_idx;
/* surrogate init/fini arrays */
- __global_ctors_fn = ctx.do_global_ctors_fn;
- __global_dtors_fn = ctx.do_global_dtors_fn;
+ __global_ctors_fn = __psx_vtbl->do_global_ctors_fn;
+ __global_dtors_fn = __psx_vtbl->do_global_dtors_fn;
/* enter libc */
__psx_vtbl->start_main(__main,argc,argv,__libc_start_main);