diff options
author | midipix <writeonce@midipix.org> | 2017-01-15 02:16:58 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-01-15 02:44:23 -0500 |
commit | 21510613e08a41ac3ca3ef499d0020539fc7a8d2 (patch) | |
tree | 37add185f86cb422d9e7c30916eba2b4f002af60 /arch | |
parent | 81fff6855390447bbc26bad6823eb26b3b7a22a5 (diff) | |
download | mmglue-21510613e08a41ac3ca3ef499d0020539fc7a8d2.tar.bz2 mmglue-21510613e08a41ac3ca3ef499d0020539fc7a8d2.tar.xz |
integrated first-thread SEH support.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/nt32/src/crt_glue.c | 6 | ||||
-rw-r--r-- | arch/nt32/src/vtbl.c | 10 | ||||
-rw-r--r-- | arch/nt64/src/crt_glue.c | 6 | ||||
-rw-r--r-- | arch/nt64/src/vtbl.c | 10 |
4 files changed, 16 insertions, 16 deletions
diff --git a/arch/nt32/src/crt_glue.c b/arch/nt32/src/crt_glue.c index 7c7d8b2..08928c1 100644 --- a/arch/nt32/src/crt_glue.c +++ b/arch/nt32/src/crt_glue.c @@ -5,8 +5,8 @@ #include "psxglue.h" #include "pthread_impl.h" -extern struct __ldso_vtbl * __ldso_vtbl; -extern struct __psx_vtbl * __psx_vtbl; +extern const struct __ldso_vtbl * __ldso_vtbl; +extern const struct __psx_vtbl * __psx_vtbl; typedef int __app_main(); typedef int __pthread_surrogate_routine(struct pthread *); @@ -86,7 +86,7 @@ void __libc_entry_routine( __global_dtors_fn = ctx.do_global_dtors_fn; /* enter libc */ - __libc_start_main(__main,argc,argv); + __psx_vtbl->start_main(__main,argc,argv,__libc_start_main); /* guard */ a_crash(); diff --git a/arch/nt32/src/vtbl.c b/arch/nt32/src/vtbl.c index 25225a6..aabd633 100644 --- a/arch/nt32/src/vtbl.c +++ b/arch/nt32/src/vtbl.c @@ -1,11 +1,11 @@ #include "psxglue.h" #include "errno.h" -unsigned long ** __syscall_vtbl = 0; -struct __ldso_vtbl * __ldso_vtbl = 0; -struct __psx_vtbl * __psx_vtbl = 0; -unsigned long __teb_sys_idx = 0; -unsigned long __teb_libc_idx = 0; +const struct __ldso_vtbl * __ldso_vtbl = 0; +const struct __psx_vtbl * __psx_vtbl = 0; +unsigned long ** __syscall_vtbl = 0; +unsigned long __teb_sys_idx = 0; +unsigned long __teb_libc_idx = 0; long __syscall_alert(long n) { diff --git a/arch/nt64/src/crt_glue.c b/arch/nt64/src/crt_glue.c index 7c7d8b2..08928c1 100644 --- a/arch/nt64/src/crt_glue.c +++ b/arch/nt64/src/crt_glue.c @@ -5,8 +5,8 @@ #include "psxglue.h" #include "pthread_impl.h" -extern struct __ldso_vtbl * __ldso_vtbl; -extern struct __psx_vtbl * __psx_vtbl; +extern const struct __ldso_vtbl * __ldso_vtbl; +extern const struct __psx_vtbl * __psx_vtbl; typedef int __app_main(); typedef int __pthread_surrogate_routine(struct pthread *); @@ -86,7 +86,7 @@ void __libc_entry_routine( __global_dtors_fn = ctx.do_global_dtors_fn; /* enter libc */ - __libc_start_main(__main,argc,argv); + __psx_vtbl->start_main(__main,argc,argv,__libc_start_main); /* guard */ a_crash(); diff --git a/arch/nt64/src/vtbl.c b/arch/nt64/src/vtbl.c index 25225a6..aabd633 100644 --- a/arch/nt64/src/vtbl.c +++ b/arch/nt64/src/vtbl.c @@ -1,11 +1,11 @@ #include "psxglue.h" #include "errno.h" -unsigned long ** __syscall_vtbl = 0; -struct __ldso_vtbl * __ldso_vtbl = 0; -struct __psx_vtbl * __psx_vtbl = 0; -unsigned long __teb_sys_idx = 0; -unsigned long __teb_libc_idx = 0; +const struct __ldso_vtbl * __ldso_vtbl = 0; +const struct __psx_vtbl * __psx_vtbl = 0; +unsigned long ** __syscall_vtbl = 0; +unsigned long __teb_sys_idx = 0; +unsigned long __teb_libc_idx = 0; long __syscall_alert(long n) { |