This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: dlclose not calling destructors of static variables.
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