delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/02/02/09:17:56

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4B683809.5090705@gmail.com>
Date: Tue, 02 Feb 2010 14:34:49 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: dlclose not calling destructors of static variables.
References: <4B61732F DOT 4030804 AT gmail DOT com> <4B62DDE6 DOT 5070106 AT gmail DOT com> <4B62F118 DOT 8010305 AT gmail DOT com> <20100129184514 DOT GA9550 AT ednor DOT casa DOT cgf DOT cx> <4B66BF2F DOT 4060802 AT gmail DOT com> <20100201162603 DOT GB25374 AT ednor DOT casa DOT cgf DOT cx> <4B6710CE DOT 40300 AT gmail DOT com> <4B675932 DOT 9040908 AT gmail DOT com> <4B67E3C8 DOT 1050500 AT gmail DOT com>
In-Reply-To: <4B67E3C8.1050500@gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 02/02/2010 08:35, Andrew West wrote:

>>> Looking at one of the libraries in my code that fails I get ( with the
>>> atexit at 0x78351c9 )
>>>
>>> remove_dll_atexit;
>>> m.AllocationBase = 0x7820000
>>> m.AllocationBase + m.RegionSize = 0x7824000

> I've attached the objdump -h output. Looks like the library was
> relocated in memory, but if I do;
> 
> 0x63940000 + (  0x78351c9 - 0x7820000 ) = 0x639551c9


>   0 .text         00061380  63941000  63941000  00000600  2**4
>                   CONTENTS, ALLOC, LOAD, CODE, DATA

  Thanks, that confirms what I wanted to find out: it's possible for the .text
section to be broken into multiple regions.  I was going to go on to speculate
about whether it was a reloc or pseudo-reloc causing it in some way (maybe the
region stops when it hits an altered COW page or somesuch), but cgf found a
solution using only the AllocationBase.

    cheers,
      DaveK

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019