diff options
Diffstat (limited to 'crt/nt32')
-rw-r--r-- | crt/nt32/Scrt1.c | 7 | ||||
-rw-r--r-- | crt/nt32/Scrtldso.c | 5 | ||||
-rw-r--r-- | crt/nt32/Scrtvrfs.c | 4 | ||||
-rw-r--r-- | crt/nt32/crtidata.c | 4 | ||||
-rw-r--r-- | crt/nt32/crtldso.c | 16 | ||||
-rw-r--r-- | crt/nt32/crtvrfs.c | 15 |
6 files changed, 41 insertions, 10 deletions
diff --git a/crt/nt32/Scrt1.c b/crt/nt32/Scrt1.c index 81da1b5..0346479 100644 --- a/crt/nt32/Scrt1.c +++ b/crt/nt32/Scrt1.c @@ -3,12 +3,15 @@ /* see also: crtidata.c */ /****************************************/ +static const unsigned char * __inherit = 0; +extern const unsigned char * __ctty __attribute((weak,alias("__inherit"))); + int __attribute__((__visibility__("hidden"))) __psx_init(int *,char ***,char ***,void *); -void __attribute__((__visibility__("hidden"))) __libc_entry_routine(void *,void *,int); +void __attribute__((__visibility__("hidden"))) __libc_entry_routine(void *,void *,const unsigned short *,int); void __libc_loader_init(void * __main, int flags) { - __libc_entry_routine(__main,__psx_init,flags); + __libc_entry_routine(__main,__psx_init,__ctty,flags); } #include "crt1.c" diff --git a/crt/nt32/Scrtldso.c b/crt/nt32/Scrtldso.c index 936a9d2..fbb4572 100644 --- a/crt/nt32/Scrtldso.c +++ b/crt/nt32/Scrtldso.c @@ -3,3 +3,8 @@ #include "psxglue.h" const int __crtopt_ldso = __PSXOPT_LDSO; + +/* pty server root-relative name */ +static const unsigned short __ctty[] = {'b','i','n','\\', + 'n','t','c','t','t','y', + '.','e','x','e',0}; diff --git a/crt/nt32/Scrtvrfs.c b/crt/nt32/Scrtvrfs.c index bef26df..e60f317 100644 --- a/crt/nt32/Scrtvrfs.c +++ b/crt/nt32/Scrtvrfs.c @@ -3,3 +3,7 @@ #include "psxglue.h" const int __crtopt_vrfs = __PSXOPT_VRFS; + +/* pty server root-relative name */ +static const unsigned short __ctty[] = {'n','t','c','t','t','y', + '.','e','x','e',0}; diff --git a/crt/nt32/crtidata.c b/crt/nt32/crtidata.c index 19e146a..12db9d3 100644 --- a/crt/nt32/crtidata.c +++ b/crt/nt32/crtidata.c @@ -6,9 +6,9 @@ #define __external_routine __attribute__((dllimport)) __external_routine int __psx_init(int *,char ***,char ***,void *); -__external_routine void __libc_entry_routine(void *,void *,int); +__external_routine void __libc_entry_routine(void *,void *,const unsigned short *,int); void __libc_loader_init(void * __main, int flags) { - __libc_entry_routine(__main,__psx_init,flags); + __libc_entry_routine(__main,__psx_init,0,flags); } diff --git a/crt/nt32/crtldso.c b/crt/nt32/crtldso.c index 9a79a13..81dec5f 100644 --- a/crt/nt32/crtldso.c +++ b/crt/nt32/crtldso.c @@ -18,6 +18,11 @@ static const unsigned short __rrlibc[] = {'l','i','b','\\', 'l','i','b','c', '.','s','o',0}; +/* pty server root-relative name */ +static const unsigned short __rrctty[] = {'b','i','n','\\', + 'n','t','c','t','t','y', + '.','e','x','e',0}; + static unsigned long __attribute__((section(".dsodata"))) __dsodata[65536/sizeof(unsigned long)]; @@ -29,8 +34,13 @@ void __libc_loader_init(void * __main, int flags) void * hdsodir; void * ldsobase; void * libcbase; - int (*__psx_init)(int *,char ***,char ***,void *); - void (*__libc_entry_routine)(void *,void *,int); + int (*__psx_init)( + int *,char ***,char ***, + void *); + void (*__libc_entry_routine)( + void *,void *, + const unsigned short *, + int); if ((status = __ldso_load_framework_loader_ex( &ldsobase,&hroot,&hdsodir, @@ -55,5 +65,5 @@ void __libc_loader_init(void * __main, int flags) libcbase,"__libc_entry_routine"))) __ldso_terminate_current_process(NT_STATUS_NOINTERFACE); - __libc_entry_routine(__main,__psx_init,flags); + __libc_entry_routine(__main,__psx_init,__rrctty,flags); } diff --git a/crt/nt32/crtvrfs.c b/crt/nt32/crtvrfs.c index 50fffd1..ac8cccb 100644 --- a/crt/nt32/crtvrfs.c +++ b/crt/nt32/crtvrfs.c @@ -16,6 +16,10 @@ static const unsigned short __sdldso[] = {'l','i','b','p','s','x','s','c','l', static const unsigned short __sdlibc[] = {'l','i','b','c', '.','s','o',0}; +/* pty server root-relative name */ +static const unsigned short __sdctty[] = {'n','t','c','t','t','y', + '.','e','x','e',0}; + static unsigned long __attribute__((section(".dsodata"))) __dsodata[65536/sizeof(unsigned long)]; @@ -27,8 +31,13 @@ void __libc_loader_init(void * __main, int flags) void * hdsodir; void * ldsobase; void * libcbase; - int (*__psx_init)(int *,char ***,char ***,void *); - void (*__libc_entry_routine)(void *,void *,int); + int (*__psx_init)( + int *,char ***,char ***, + void *); + void (*__libc_entry_routine)( + void *,void *, + const unsigned short *, + int); if ((status = __ldso_load_framework_loader_ex( &ldsobase,&hroot,&hdsodir, @@ -53,5 +62,5 @@ void __libc_loader_init(void * __main, int flags) libcbase,"__libc_entry_routine"))) __ldso_terminate_current_process(NT_STATUS_NOINTERFACE); - __libc_entry_routine(__main,__psx_init,flags); + __libc_entry_routine(__main,__psx_init,__sdctty,flags); } |