This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Cygwin Python/PIL TCL/TK fork rebase solution

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.

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]