This is the mail archive of the cygwin-apps 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: [patch/rebase] rebaseall: Set default offset to 0


On Jun 28 13:37, Charles Wilson wrote:
> On 6/28/2011 12:29 PM, Corinna Vinschen wrote:
> 
> > Index: rebaseall.in
> > ===================================================================
> > RCS file: /sourceware/projects/cygwin-apps-home/cvsfiles/rebase/rebaseall.in,v
> > retrieving revision 1.2
> > diff -u -p -r1.2 rebaseall.in
> > --- rebaseall.in	21 Jun 2011 15:40:10 -0000	1.2
> > +++ rebaseall.in	28 Jun 2011 16:29:06 -0000
> 
> > -DefaultOffset=0x10000
> > +DefaultOffset=0
> >  DefaultVerbose=
> >  DefaultFileList=
> >  DefaultSuffixes='dll|so'
> 
> I'd prefer that this be set via a configure replacement.  On MSYS and
> MinGW (really, MSYS) we need to stick with the old default offset, since
> on that system we still have to worry about the extra allocated space.
> ('sokay, tho, 'cause we have FAR fewer dlls to worry about, and can
> afford the space).
> 
> e.g.
> 
> configure.ad
> 
> case $host in
> *mingw* | *msys* ) DEFAULT_OFFSET_VALUE=0x10000
> *) DEFAULT_OFFSET_VALUE = 0x0
> esac
> AC_SUBST(DEFAULT_OFFSET_VALUE)
> 
> and then
> 
> -DefaultOffset=0x10000
> +DefaultOffset=@DEFAULT_OFFSET_VALUE@

Like this?

Index: configure.ac
===================================================================
RCS file: /sourceware/projects/cygwin-apps-home/cvsfiles/rebase/configure.ac,v
retrieving revision 1.2
diff -u -p -r1.2 configure.ac
--- configure.ac	21 Jun 2011 08:02:59 -0000	1.2
+++ configure.ac	28 Jun 2011 19:18:04 -0000
@@ -38,6 +38,12 @@ case "$host" in
 esac
 AC_SUBST([LIBOBJS])
 
+case "$host" in
+ *mingw* | *msys* )	DEFAULT_OFFSET_VALUE=0x10000 ;;
+ *)			DEFAULT_OFFSET_VALUE=0 ;;
+esac
+AC_SUBST(DEFAULT_OFFSET_VALUE)
+
 AC_CONFIG_FILES([Makefile
                  imagehelper/Makefile])
 
Index: Makefile.in
===================================================================
RCS file: /sourceware/projects/cygwin-apps-home/cvsfiles/rebase/Makefile.in,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile.in
--- Makefile.in	21 Jun 2011 15:32:37 -0000	1.3
+++ Makefile.in	28 Jun 2011 19:18:04 -0000
@@ -42,6 +42,7 @@ CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
 CXXFLAGS = @CXXFLAGS@
+DEFAULT_OFFSET_VALUE = @DEFAULT_OFFSET_VALUE@
 LDFLAGS = @LDFLAGS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -111,7 +112,8 @@ edit = sed \
 	-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
 	-e 's|@prefix[@]|$(prefix)|g' \
 	-e 's|@exec_prefix[@]|$(exec_prefix)|g' \
-	-e 's|@ASH[@]|$(ASH)|g'
+	-e 's|@ASH[@]|$(ASH)|g' \
+	-e 's|@DEFAULT_OFFSET_VALUE[@]|$(DEFAULT_OFFSET_VALUE)|g'
 
 rebaseall peflagsall: Makefile
 	rm -f $@ $@.tmp
Index: rebaseall.in
===================================================================
RCS file: /sourceware/projects/cygwin-apps-home/cvsfiles/rebase/rebaseall.in,v
retrieving revision 1.2
diff -u -p -r1.2 rebaseall.in
--- rebaseall.in	21 Jun 2011 15:40:10 -0000	1.2
+++ rebaseall.in	28 Jun 2011 19:18:04 -0000
@@ -1,7 +1,7 @@
 #!/bin/@ASH@
 
 #
-# Copyright (c) 2003, 2005, 2006, 2008 Jason Tishler
+# Copyright (c) 2003, 2005, 2006, 2008, 2011 Jason Tishler
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ PATH=$(cd $tp2 && pwd):@bindir@:/bin
 ProgramName=${0##*/}
 ProgramOptions='b:o:s:T:v'
 DefaultBaseAddress=0x70000000
-DefaultOffset=0x10000
+DefaultOffset=@DEFAULT_OFFSET_VALUE@
 DefaultVerbose=
 DefaultFileList=
 DefaultSuffixes='dll|so'


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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