diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-07-26 12:32:28 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-07-26 12:32:28 +0400 |
commit | e643b202e656c0598b61266c89bef0e17931d1b5 (patch) | |
tree | 08b074664941613022ac6fb29540037c81eb62cd /winsup/cygwin | |
parent | b73c0b890e63b6bade99aa3e70daf9fd976fb739 (diff) |
* dcrt0.cc (dll_crt0_1): Call malloc_init and user_shared_initialize_1
only in non-dynamically loaded case.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ce3554ef6..244da549e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 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> + * dcrt0.cc (dll_crt0_0): Call malloc_init and user_shared_initialize_1 here in case we're dynamically loaded. Explain why. (dll_crt0_1): Call user_shared_initialize_1 from here. 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, |