X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 2 Feb 2010 11:21:54 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: dlclose not calling destructors of static variables. Message-ID: <20100202162154.GA8953@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20100201162603 DOT GB25374 AT ednor DOT casa DOT cgf DOT cx> <4B6710CE DOT 40300 AT gmail DOT com> <20100201174611 DOT GA26080 AT ednor DOT casa DOT cgf DOT cx> <20100201175123 DOT GB26080 AT ednor DOT casa DOT cgf DOT cx> <4B672B74 DOT 4090808 AT gmail DOT com> <4B673D5F DOT 4050104 AT gmail DOT com> <4B6746A5 DOT 3090203 AT gmail DOT com> <4B67F236 DOT 6020307 AT gmail DOT com> <20100202151612 DOT GA8308 AT ednor DOT casa DOT cgf DOT cx> <4B684502 DOT 4070702 AT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B684502.4070702@gmail.com> 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 Tue, Feb 02, 2010 at 03:30:10PM +0000, Andrew West wrote: >On 02/02/2010 15:16, Christopher Faylor wrote: >> On Tue, Feb 02, 2010 at 09:36:54AM +0000, Andrew West wrote: >> >>> O.k. I've changed remove_dll_atexit to; >>> >>> remove_dll_atexit (const dll *d) >>> { >>> >>> unsigned char *dll_beg = (unsigned char *) d->handle + 0x1000; >>> unsigned char *dll_end = (unsigned char *) d->p.data_start; >>> >> According to gdb, setting dll_end to this is functionally equivalent to >> using AllocationBase + RegionSize. I thought you tried that already. >> >> But, anyway... > >I think Dave Korn mentioned that it's possible for the .text to be >broken into multiple regions, so perhaps RegionSize >only shows the size of one of those multiple regions. There's another >message on the list with more detail, either way >for me AllocationBase + RegionSize didn't match p.data_start for me. Sorry. Even after carefully checking my work I got it wrong. I meant BaseAddress + RegionSize. It is barely possible that the data segment is getting relocated but I don't see how the text segment could be broken up. If the data segment is getting put elsewhere then it isn't a reliable indicator of the end of the text segment. 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