* dcrt0.cc (dll_crt0_1): Call malloc_init and user_shared_initialize_1

only in non-dynamically loaded case.
This commit is contained in:
Corinna Vinschen 2008-07-26 08:32:28 +00:00
parent b73c0b890e
commit e643b202e6
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-07-25 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (dll_crt0_1): Call malloc_init and user_shared_initialize_1
only in non-dynamically loaded case.
2008-07-25 Corinna Vinschen <corinna@vinschen.de> 2008-07-25 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (dll_crt0_0): Call malloc_init and user_shared_initialize_1 * dcrt0.cc (dll_crt0_0): Call malloc_init and user_shared_initialize_1

View File

@ -777,7 +777,13 @@ void
dll_crt0_1 (void *) dll_crt0_1 (void *)
{ {
check_sanity_and_sync (user_data); check_sanity_and_sync (user_data);
if (!dynamically_loaded)
{
malloc_init (); malloc_init ();
user_shared_initialize_1 ();
}
#ifdef CGF #ifdef CGF
int i = 0; int i = 0;
const int n = 2 * 1024 * 1024; const int n = 2 * 1024 * 1024;
@ -788,8 +794,6 @@ dll_crt0_1 (void *)
ProtectHandle (hMainProc); ProtectHandle (hMainProc);
ProtectHandle (hMainThread); ProtectHandle (hMainThread);
user_shared_initialize_1 ();
cygheap->cwd.init (); cygheap->cwd.init ();
/* Initialize pthread mainthread when not forked and it is safe to call new, /* Initialize pthread mainthread when not forked and it is safe to call new,