Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Tue, 18 Sep 2001 22:53:36 -0400
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: [BUG] cygwin-1.3.3-2 -- making auto-import dlls
Message-ID: <20010918225336.G8924@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <EA18B9FA0FE4194AA2B4CDB91F73C0EF08F199@itdomain002.itdomain.net.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <EA18B9FA0FE4194AA2B4CDB91F73C0EF08F199@itdomain002.itdomain.net.au>
User-Agent: Mutt/1.3.21i

On Wed, Sep 19, 2001 at 12:47:32PM +1000, Robert Collins wrote:
>
>
>> -----Original Message-----
>> From: Charles Wilson [mailto:cwilson@ece.gatech.edu]
>> > Solution: don't use auto-image-base. The overhead from relocation is
>> > quite low, why not let windows just do its thing.
>> 
>> 
>> Okay, suppose I have 5 dll's that are all based at the default, 
>> 0x10000000. I start an exe that depends on those 5,  so at 
>> startup time 
>> they all get relocated to (random) address in my exe's address space. 
>> Then cygwin1.dll is loaded. But the random addresses chosen for the 
>> relocation for the first 5 dlls MAY or may NOT conflict with 
>> cygwin1.dll's *fixed* location.
>> 
>> Boom (sometimes).
>> 
>> How is this better than the current "boom (sometimes)" 
>> behavior?  What 
>> am I missing?
>
>AFAIK Relocated .dll's will never push a .dll with a different base
>address out of the way. I.E. For that set of .dll's
>
>the program will get it's address 0x10000000, cygwin1.dll get's its base
>address, and the 5 .dll's get 5 other random address's.
>
>How is it better? With a .dll that conflicts with cygwin1.dll, it's boom
>(everytime) :].

Just in case anyone knows how to do this:

If I could *reserve* but not allocate a fixed amount of memory for the
cygwin heap on DLL load, this would fix the problem.  I could
conceivably add another 512K of allocated memory to the end of every
cygwin DLL load but that just didn't seem right.

I played around with a lot of ld script file settings trying to achieve
this effect but I could never do it.  I wouldn't be surprised that
Windows doesn't allow actually it because the concept requires a
sophisticated run time loader.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

