Integrating Ralf's rebase into setup.exe

Jason Tishler jason@tishler.net
Wed Jan 29 20:07:00 GMT 2003


Ralf,

On Tue, Jan 21, 2003 at 10:37:03PM +0100, Ralf Habacker wrote:
> > The attached patch enables libimagehelper.a to be usable by C source
> > too.
> > 
> Applied. Thanks for fixing this. 

The attached fixes the following:

    1. merge problem when you applied (by hand?) the following patch:

       http://cygwin.com/ml/cygwin/2002-12/msg00138.html

    2. bug I introduced in the above patch when I attempted but did
       not successfully fix rebasing up

#1 causes the base address to be an extra DLL size amount lower and #2
causes the base address to be an extra DLL size amount higher.

Thanks,
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
-------------- next part --------------
Index: rebaseimage.cc
===================================================================
RCS file: /cvsroot/kde-cygwin/tools/rebase/rebaseimage.cc,v
retrieving revision 1.5
diff -u -p -r1.5 rebaseimage.cc
--- rebaseimage.cc	21 Jan 2003 21:33:27 -0000	1.5
+++ rebaseimage.cc	29 Jan 2003 19:42:33 -0000
@@ -75,11 +75,6 @@ BOOL ReBaseImage(
 
   if (fGoingDown)
     *NewImageBase -= *NewImageSize;
-  else
-    *NewImageBase += *NewImageSize;
-
-  if (fGoingDown)
-    *NewImageBase -= *NewImageSize;
 
   // already rebased
   if (ntheader->OptionalHeader.ImageBase == *NewImageBase)
@@ -103,6 +98,8 @@ BOOL ReBaseImage(
       return false;
     }
 
+  if (!fGoingDown)
+    *NewImageBase += *NewImageSize;
 
   SetLastError(NO_ERROR);
   return true;


More information about the Cygwin-apps mailing list