delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/07/18/23:35:55

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <397522A2.A7E093ED@ece.gatech.edu>
Date: Tue, 18 Jul 2000 23:38:10 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
X-Mailer: Mozilla 4.73 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT sources DOT redhat DOT com
Subject: Re: binutils prerelease available for testing (feedback needed)
References: <20000718234903 DOT 20211 DOT qmail AT web4605 DOT mail DOT yahoo DOT com> <200007190001 DOT UAA26173 AT envy DOT delorie DOT com> <20000718210045 DOT B14753 AT cygnus DOT com>

Chris --
  I haven't tested *your* version, 'cause I was in the process of
building binutils from CVS at the same time. So, mine *should* be the
same as yours -- and I get a strange failure. I'll verify with your
version soon:

building libpng, BUT after I explicitly set some #defines so that the
library exported 'png_libpng_ver' as a DATA item, instead of the normal
behavior where it gets #defined into a macro that calls
'png_get_header_ver()'. I built both a dll+import lib, and a static lib.

CASE 1:
Then, I built pngtest-stat.exe (which linked to libpng.a, the static
lib). Worked fine. Accesses the static array 'png_libpng_ver':

nm pngtest-stat.exe | grep png_libpng_ver
0082f044 D _png_libpng_ver

CASE 2:
Next, I built pngtest.exe, (linked to libpng.dll.a, the import lib).
Stackdump

      0 [main] pngtest 6828 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
   5393 [main] pngtest 6828 stackdump: Dumping stack trace to
pngtest.exe.stackdump

nm pngtest.exe | grep png_libpng_ver
0080620c I __imp__png_libpng_ver

CASE 3:
Finally, I rebuilt pngtest.exe, but after renaming libpng.dll.a and
libpng.a so that they wouldn't be used in the link process -- that is, I
forced ld to link directly to the dll. It worked.

nm pngtest.exe | grep png_libpng_ver
0080627c I __imp__png_libpng_ver
00803630 T _png_libpng_ver

It seems that somehow, somewhere, import libraries with DATA items
became broken. (Counterintuitively, though, you can successfully link
directly to the dll containing DATA items -- so the 'virtual' import lib
used in that case is correct!) I tried to debug CASE 2 using gdb, but
when I loaded that pngtest.exe, *gdb* stackdumped.

Behavior is as expected in all cases when the dll does not contain DATA
items. None of the executables contained a 'png_libpng_ver' symbol; they
only contained the png_get_header_ver() symbol. All linked and ran okay.

--Chuck

Chris Faylor wrote:
> 
> On Tue, Jul 18, 2000 at 08:01:09PM -0400, DJ Delorie wrote:
> >> Thanks.  Your patch for ld, fixed the ld -r problem.  Thanks a lot.
> >
> >Great!
> >
> >> Do you plan to update the binutils distribution archive?
> >
> >Chris has been doing that, so I don't know.
> 
> Funny you should ask.  I just built a version of binutils that may
> well be the next version.
> 
> If you want to try out an untested prerelease version, it's at:
> 
> ftp://ftp.cygnus.com/private/cgf/binutils-20000718-1.tar.gz
> ftp://ftp.cygnus.com/private/cgf/binutils-20000718-1-src.tar.gz
> 
> I have done zero testing with this so I would really appreciate
> feedback on whether this solves the various dllwrap and ld problems
> that people have noticed.
> 
> cgf
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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