[Patch] Add --identify-strict option to dlltool; Handle ms-style implibs [Was: --identify-ms]

Charles Wilson cygwin@cwilson.fastmail.fm
Sat Jan 10 06:34:00 GMT 2009


This is an improved implementation. According to Danny Smith, ld can, in
fact, link against import libraries generated by the MS toolchain.
Therefore, it is a useful thing if dlltool's --identify option can be
made to work with those import libraries, as well as those created by
ld.  However, the only way I could get that to work properly (and
automatically, without the need for a special command-line switch) was
to search the symbol list of the implib for the DLL-structure symbol
that MS (but not ld) inserts: __NULL_IMPORT_DESCRIPTOR.

Once dlltool "knows" whether it is dealing with an ms-style or
binutils-style import library, it can search for the dllname in the
proper section for that style.

I also added the capability to accumulate -- and report -- multiple
dllnames, for those import libs that specify more than one. I did find
one example of this "in the wild": Vfw32.Lib from the Windows SDK
imports symbols directly from three different DLLs.

To preserve the (quite useful, for libtool) behavior where dlltool exits
with error when there are multiple imported DLLs, I added the
--identify-strict option.

--
Chuck

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dlltool-identify-strict-implibs.changelog
URL: <https://sourceware.org/pipermail/binutils/attachments/20090110/f56ed5a7/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dlltool-identify-strict-implibs.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20090110/f56ed5a7/attachment-0001.ksh>


More information about the Binutils mailing list