X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Date: Sun, 21 Aug 2011 21:44:09 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: 1.7.9: static const std::string initialization lost in child process when using fork, dlopen Message-ID: <20110822014409.GA7051@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1558100995 DOT 357508 DOT 1313927301638 DOT JavaMail DOT fmail AT mwmweb008> <20110821165001 DOT GA19565 AT ednor DOT casa DOT cgf DOT cx> <4E513BF4 DOT 90308 AT hones DOT org DOT uk> <20110821183857 DOT GC19565 AT ednor DOT casa DOT cgf DOT cx> <1313961316 DOT 31093 DOT 28 DOT camel AT asus> <20110821221923 DOT GA30284 AT ednor DOT casa DOT cgf DOT cx> <1313970991 DOT 31093 DOT 46 DOT camel AT asus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1313970991.31093.46.camel@asus> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Sun, Aug 21, 2011 at 04:56:31PM -0700, Thomas D. Dean wrote: >On Sun, 2011-08-21 at 18:19 -0400, Christopher Faylor wrote: >> 're reporting. >> >> If you don't want to try a snapshot for some reason then you could also >> try setting the base address of the DLL by using the --auto-image-base >> option when linking the DLL. > >I used > >g++ -Wall -I. -shared -g -c dll.cpp -o dll.o >g++ -Wall -shared -o libdll.dll dll.o >g++ -Wall -I. -g -c dlltest.cpp -o dlltest.o >g++ -Wall -o dlltest dlltest.o -L. -ldll -Wl,--enable-auto-image-base > >I still have the stackdump problem. > >I used hd to look at the files I created with emacs and there are no >strange characters. I certainly understand that you didn't mean to include strange characters. The web archives show strange characters. Lets move on. Please read what I said above: "when linking the DLL", not when linking *with*. So put the -Wl,--enable-auto-image-base on the line which produces the dll. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple