[lld] r195289 - [PECOFF] Do not check if library is already added.

Rui Ueyama ruiu at google.com
Wed Nov 20 17:03:27 PST 2013


For some reason, the reason of this change was omitted from the commit
message. Here's the description I meant to include in the commit log.
Pasting it for the record.

Currently the LLD checks if a library specified with /defaultlib is already
added to the input graph and do not add if it's already there. It causes
some undefined symbols remain unresolved.

For example, oldnames.lib depends on kernel32.lib. What happens if
/defaultlib:kernel32.lib is given from the command line? The LLD reads
.drectve
section of oldnames.lib, finding that it contains
"/defaultlib:kernel32.lib".
However, the LLD won't add the kernel32.lib to the input file list because
it's
already added.

The resolve order in the above case is kernel32.lib and oldnames.lib. So,
undefined symbols in oldnames.lib, which need to be resolved by
kernel32.lib,
remains undefined. It's a wrong behavior.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131120/bf05fde5/attachment.html>


More information about the llvm-commits mailing list