delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/16/13:54:29

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Cygwin Python/PIL TCL/TK fork rebase solution
Date: Tue, 16 Jan 2007 18:54:07 -0000
Message-ID: <03de01c7399f$b32247a0$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <45AD1E15.31F06B43@dessent.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 16 January 2007 18:49, Brian Dessent wrote:


> 
> static unsigned long
> compute_dll_image_base (const char *ofile)
> {
>   unsigned long hash = strhash (ofile);
>   return 0x61300000 + ((hash << 16) & 0x0FFC0000);
> }
> 
> ..which means it will end up somewhere between 0x61300000 and
> 0x712C0000.  This does not guarantee that there are no overlapping DLLs
> since it's only just a simple hash, but it is much more convenient as
> the package creator can do this once when compiling the package and it
> will be set for all users.  I don't know whether ld defaults to
> --enable-auto-image-base being enabled or not, but I do know that if you
> use e.g. libtool it will automatically add this option for you.
> Ideally, if all packages were compiled this way we would not need
> rebase/rebaseall at all.


  We probably still would.  First, the hash might collide and put two dlls in
the same slot, and second, any dll greater than 1Mb overlaps into the next
hash slot.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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