From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29973 invoked by alias); 3 Dec 2002 21:25:48 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 29966 invoked from network); 3 Dec 2002 21:25:47 -0000 Received: from unknown (HELO smtp.comcast.net) (24.153.64.2) by sources.redhat.com with SMTP; 3 Dec 2002 21:25:47 -0000 Received: from althea (pcp03112364pcs.eatntn01.nj.comcast.net [68.85.55.169]) by mtaout06.icomcast.net (iPlanet Messaging Server 5.2 HotFix 1.05 (built Nov 6 2002)) with ESMTP id <0H6K00GM6BCN5X@mtaout06.icomcast.net> for cygwin@cygwin.com; Tue, 03 Dec 2002 16:21:59 -0500 (EST) Received: from [127.0.0.1] (helo=althea.tishler.net) by althea with smtp (Exim 4.10) id H6KBMP-0001B4-00; Tue, 03 Dec 2002 16:28:01 -0500 Received: by althea.tishler.net (sSMTP sendmail emulation); Tue, 03 Dec 2002 16:28:01 -0500 Date: Tue, 03 Dec 2002 13:25:00 -0000 From: Jason Tishler Subject: rebase-0.4 patch To: Ralf Habacker Cc: Cygwin Mail-followup-to: Ralf Habacker , Cygwin Message-id: <20021203212800.GB884@tishler.net> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_4ZswFN3GLYjfAzTQc5JMCg)" User-Agent: Mutt/1.4i X-SW-Source: 2002-12/txt/msg00138.txt.bz2 --Boundary_(ID_4ZswFN3GLYjfAzTQc5JMCg) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline Content-length: 1135 Ralf, The attached patch changes your version of rebase as follows: 1. Round NewImageSize (to the nearest 0x10000) to be consistent with MS's rebase. 2. Fix bug when rebasing up. Are you willing to accept these changes -- in particular, #2? If so, then I would like to offer the following too: 1. gcc 3.2 patches (completed) 2. conversion to librebase.a patch (to be completed) My plan is as follows: 1. Convert your rebase into a library, librebase.a. 2. Merge librebase.a with my stand-alone, non-persistent rebase. 3. Release this rebase so there is one version that supports all users (including Me) and all DLLs (including ones that need fix-up due to stripping). 4. Merge the above into my stand-alone, persistent rebase. 5. Submit a setup.exe patch with the above functionality. 6. When setup.exe patch is accepted, release stand-alone, persistent rebase that can be used for DLLs not installed by setup.exe. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 --Boundary_(ID_4ZswFN3GLYjfAzTQc5JMCg) Content-type: text/plain; charset=us-ascii; NAME=rebase.cc.diff Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=rebase.cc.diff Content-length: 717 --- ../rebase-ralf-0.4.orig/rebase.cc 2002-08-10 17:41:40.000000000 -0400 +++ rebase.cc 2002-12-03 15:35:24.000000000 -0500 @@ -113,8 +113,16 @@ BOOL ReBaseImage( *OldImageSize = ntheader->OptionalHeader.SizeOfImage; *NewImageSize = ntheader->OptionalHeader.SizeOfImage; + // Round NewImageSize to be consistent with MS's rebase. + const ULONG imageSizeGranularity = 0x10000; + ULONG remainder = *NewImageSize % imageSizeGranularity; + if (remainder) + *NewImageSize = (*NewImageSize - remainder) + imageSizeGranularity; + if (fGoingDown) *NewImageBase -= *NewImageSize; + else + *NewImageBase += *NewImageSize; // already rebased if (ntheader->OptionalHeader.ImageBase == *NewImageBase) { --Boundary_(ID_4ZswFN3GLYjfAzTQc5JMCg) Content-Type: text/plain; charset=us-ascii Content-length: 214 -- 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/ --Boundary_(ID_4ZswFN3GLYjfAzTQc5JMCg)--