delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/06/10/22:30:01

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Sun, 10 Jun 2001 22:29:39 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: dll base address
Message-ID: <20010610222939.A10025@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <20010610004015 DOT D29231 AT redhat DOT com> <23114413578 DOT 20010610185633 AT logos-m DOT ru> <20010610120846 DOT B5292 AT redhat DOT com> <027801c0f210$d1e7c5c0$0200a8c0 AT lifelesswks> <20010610211823 DOT A9379 AT redhat DOT com> <02ee01c0f214$e27d63f0$0200a8c0 AT lifelesswks> <20010610214736 DOT B9379 AT redhat DOT com> <032101c0f219$b7d04dc0$0200a8c0 AT lifelesswks> <20010610220532 DOT A9806 AT redhat DOT com> <034101c0f21b$8f708a50$0200a8c0 AT lifelesswks>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <034101c0f21b$8f708a50$0200a8c0@lifelesswks>; from robert.collins@itdomain.com.au on Mon, Jun 11, 2001 at 12:09:34PM +1000

On Mon, Jun 11, 2001 at 12:09:34PM +1000, Robert Collins wrote:
>> >The only time that it will work well is when _every_ program run within
>> >that session (following a chain of fork() and spawn() calls) has _no_
>> >conflicting dlls in the same address space.
>>
>> Right, and, I use software on a regular basis which injects a DLL into
>> every executable that runs on the system.  I don't know where that DLL
>> loads now.  If it happens to load in the 0x61* range, I'm potentially
>> out of luck.
>
>Sorry, I was unclear. I meant that the existing behaviour of cygwin is
>such that it will only work when _every_ program .... address space.
>
>I.e. that you are _already_ out of luck with your injecting .dll tool
>because cygwin will be at 0x61*, or you would be observing the problem
>with differing map address's cross process.

I think I understood what you meant.  The software may well be injecting
its DLL into the 0x61* address.  I wouldn't know because every process on
the system uses this DLL.  The cygwin DLL should be automatically and
consistently relocating elsewhere.  I don't do any debugging on this
system so I wouldn't know for sure.

In this case, I guess the only thing we have to worry about is that
the other DLL isn't also marked unrelocatable.  I guess I'm just
reluctant to take this step because I don't know how common this
scenario might be.

I actually changed cygwin's base address to 61000000 back in 1997 or so
because of a similar scenario.  It used to be at the default 1000000 (or
whatever it is) and it was consistently getting relocated.  I thought
that this was probably resulting in a performance hit so I read up on
the algorithm for choosing where it should be loading, based on DLL
name, found that it should be something like 60000000 but that was
already populated by some other popular dll.  So I bumped the base to
61000000.

>> Of course, I'm not aware of any way to do this in ld, so this may all
>> be a moot discussion anyway.
>
>I'll go off and research that, if you are considering allowing it?

I guess I'd consider it if it were an option.  Otherwise, it is not
yet worth discussing in cygwin-developers.  It should be a binutils
mailing list topic.

cgf

- Raw text -


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