binutils-20000625 ld.exe --shared broken

Charles Wilson cwilson@ece.gatech.edu
Fri Jul 7 08:55:00 GMT 2000


[Just a little context on this thread, for the binutils folks who didn't
catch its beginning on the cygwin mailing list]


> I reported this previously, but in a different thread 

[on the cygwin list]

> I figure this
> bug deserves its own thread. Somewhere between Mumit's custom 19990818
> version of binutils as distributed in

[the 'latest' cygwin distribution directory]

> and the more recent cygwin
> binutils (20000625) which is more-or-less direct from binutils-CVS, the
> --shared option broke. 
> 
> I'm getting the following error, using the ==stock== cygwin
> binutils-20000625 ld.exe:
> 
> ------
> ld --shared -Bdynamic -e __cygwin_dll_entry@12 -o libz.dll
> -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2
> -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/../../../../i686-pc-cygwin/lib 
> --out-implib=libz.dll.a libz.def adler32.o compress.o crc32.o gzio.o
> uncompr.o deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o
> infcodes.o infutil.o inffast.o -lgcc -lcygwin -luser32 -lkernel32
> -ladvapi32 -lshell32 -lgcc 
> 
> Creating library file: libz.dll.a
> bfd_close libz.dll.a: Invalid operation
> ------
> 
> This command works fine if I simply replace ld.exe with the one from the
> 19990818 cygwin tarball.
> 
> Can anybody recommend *where* in the code I should start looking for
> this problem? (Yeah, 'bfd_close' is pretty obvious, but I saw nothing
> enlightening there. The binutils code with its cross-platform-ness is
> really a tangled confusing mess...)

--------------

DJ responded:
> Try searching for BFD_IN_MEMORY.  It's notoriously buggy, and used to
> build the import libraries.

--------------

And that brings us up to the message that DJ crossposted here on
binutils.

--Chuck


More information about the Binutils mailing list