Mail Archives: cygwin/2000/07/18/23:35:55
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 -