diff options
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 5fbf2df05..5c85eb834 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -777,7 +777,13 @@ void dll_crt0_1 (void *) { check_sanity_and_sync (user_data); - malloc_init (); + + if (!dynamically_loaded) + { + malloc_init (); + user_shared_initialize_1 (); + } + #ifdef CGF int i = 0; const int n = 2 * 1024 * 1024; @@ -788,8 +794,6 @@ dll_crt0_1 (void *) ProtectHandle (hMainProc); ProtectHandle (hMainThread); - user_shared_initialize_1 (); - cygheap->cwd.init (); /* Initialize pthread mainthread when not forked and it is safe to call new, |