delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/06/02/13:11:32

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
References: <6910a60806020741t7ff86d8bgbb7866e62acf1c09 AT mail DOT gmail DOT com> <484411AA DOT AF8A9011 AT dessent DOT net>
Subject: RE: rebase not compilable
Date: Mon, 2 Jun 2008 18:11:05 +0100
Message-ID: <026f01c8c4d3$a4309510$2708a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <484411AA.AF8A9011@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

Brian Dessent wrote on 02 June 2008 16:29:

> Is this really a good direction to move in?  The long term plan, as I
> understood it, was to simply build everything with
> --enable-auto-image-base and avoid forever the problem of having to
> manually rebase ever.  

  --enable-auto-image-base isn't magic.  We'll still get collisions.  There
are only so many <handwave> possible image bases to choose from.  Hang on a
mo, ...

static unsigned long
compute_dll_image_base (const char *ofile)
{
  unsigned long hash = strhash (ofile);
  return 0x61300000 + ((hash << 16) & 0x0FFC0000);
}
#endif

  There are only 1024 possible image bases to choose from, and any DLL >=
256kB in size will span several of them.  Collisions are an inevitability,
no?   I think we'll probably still have a need for rebase until the whole
world goes 64bit and we've got room for a few more hash buckets[*].

>> g++ -O2     -c -o sections.o sections.cc
>> sections.cc: In member function `bool Relocations::check()':
>> sections.cc:288: error: ISO C++ forbids cast to non-reference type
>> used as lvalue
>> sections.cc: In member function `bool Relocations::fix()':
>> sections.cc:331: error: ISO C++ forbids cast to non-reference type
>> used as lvalue
>> sections.cc: In member function `bool Relocations::relocate(int)':
>> sections.cc:366: error: ISO C++ forbids cast to non-reference type
>> used as lvalue
>> make: *** [sections.o] Error 1
> 
> The cast-as-lvalue was a nonstandard gcc extension that was disabled in
> C++ mode (and deprecated for C mode) starting with gcc 3.4.x.  Likely
> this package is so old that it was last built with gcc 3.3.x which still
> allowed the construct.  So, one workaround is to temporarily install the
> [prev] version of gcc-g++ and gcc-core which are the 3.3 versions.

  Sounds like a fairly horrible bodge to me, the better way would be to fix
the code, which was of dubious legality even in K'n'R days.


    cheers,
      DaveK

[*] - Noooo they be hashin' my bukket!
-- 
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