delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/24/16:13:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Tue, 24 Feb 2004 16:11:12 -0500
From: Jason Tishler <jason AT tishler DOT net>
To: "Peter A. Castro" <doctor AT fruitbat DOT org>
Cc: cygwin AT cygwin DOT com
Subject: Re: when to rebase?
Message-ID: <20040224211112.GB2092@tishler.net>
Mail-Followup-To: "Peter A. Castro" <doctor AT fruitbat DOT org>, cygwin AT cygwin DOT com
References: <OF09D54DAA DOT 700A514F-ON85256E40 DOT 0064FCA7-85256E40 DOT 00651189 AT us DOT ibm DOT com> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040220132713 DOT 0391c768 AT 127 DOT 0 DOT 0 DOT 1> <20040220203215 DOT GC2296 AT tishler DOT net> <Pine DOT LNX DOT 4 DOT 53 DOT 0402201247440 DOT 30590 AT gremlin DOT fruitbat DOT org> <20040221003701 DOT GD2296 AT tishler DOT net> <Pine DOT LNX DOT 4 DOT 53 DOT 0402202212000 DOT 30590 AT gremlin DOT fruitbat DOT org>
Mime-Version: 1.0
In-Reply-To: <Pine.LNX.4.53.0402202212000.30590@gremlin.fruitbat.org>
User-Agent: Mutt/1.4i
X-IsSubscribed: yes

--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Peter,

On Fri, Feb 20, 2004 at 10:19:09PM -0800, Peter A. Castro wrote:
> On Fri, 20 Feb 2004, Jason Tishler wrote:
> > FWIW, I just tried the above with Microsoft's rebase and observed
> > the same behavior.  Note this is not a "ruling" just another data
> > point.
> 
> Well, considering what the root problem is, I wouldn't expect MS's
> rebase to work any better than the cygwin version.

Understood.  However, one of my design goals for rebase was to behave as
similar to Microsoft's as possible.  This became especially true when I
replaced Microsoft's ReBaseImage() with the one from Ralf Habacker's
libimagehelper.

> However, I would like to see some cooperation on how to resolve it.

See below for one possible solution...

> This problem is not specific to zsh.

Understood.

> It has more to do with how exported symbols are treated/managed.

Or built...

> I'd almost propose that rebase change such symbols' value, being
> rebase is the one changing the image base of the dll in the first
> place.

Do others agree?  If so, does anyone know how hard it would be to enhance
libimagehelper to handle this case?

> However, I would really like to understand why this symbol exists and
> if there is some way to eliminate it and use the dll's real image base
> instead.

It appears that dllwrap *may* be the culprit.  If I replace dllwrap with
gcc -shared in your testscript, then the problem is avoided.  See
attached patch for the details.

Can you use gcc -shared instead of dllwrap when you build zsh?

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

--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="testscript.sh.diff"

--- testscript.sh.orig	2004-02-24 15:52:50.398697600 -0500
+++ testscript.sh	2004-02-24 15:53:52.097416000 -0500
@@ -34,7 +34,7 @@
 echodo "gcc -g -c testdll.c"

 

 echo "## Creating testdll.dll"

-echodo "dllwrap -g --export-all-symbols -o testdll.dll testdll.o -lc"

+echodo "gcc -shared -g -o testdll.dll testdll.o -lc"

 

 echo "## Compiling testmain.c -> testmain.o"

 echodo "gcc -g -c testmain.c"



--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii

--
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/
--XsQoSWH+UP9D9v3l--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019