Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-07-26 12:32:28 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-07-26 12:32:28 +0400
commite643b202e656c0598b61266c89bef0e17931d1b5 (patch)
tree08b074664941613022ac6fb29540037c81eb62cd /winsup/cygwin
parentb73c0b890e63b6bade99aa3e70daf9fd976fb739 (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/ChangeLog5
-rw-r--r--winsup/cygwin/dcrt0.cc10
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,