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

Shankar Easwaran shankare at codeaurora.org
Fri Nov 22 16:45:22 PST 2013


On 11/22/2013 5:51 PM, Rui Ueyama wrote:
> Thanks. I don't know if it's exactly the same, but it looks like it's
> pretty similar. So the ideas to support that (non-Unix) semantics are
> basically the same as Nick's.
>
> 1. Implement a new Resolver behavior for Darwin/COFF. The behavior would be
> like this: Make Resolver to add all symbols from library files to the
> symbol table as it processes new files, constructing a gigantic symbol
> table that contains all the symbols that is already resolved or *could* be
> resolved in a library file that Resolver has seen. For a new object file,
> Resolver looks up the symbol table for each undefined symbol in an object
> file, and if it can be resolved in an (unparsed) library file, parse the
> library file, and add the symbols from the file to the symbol table.
This should be controlled from the context. Its just like treating all 
the library files like --whole-archive.
Just set the flag (--whole-archive from library files), and you should 
be done.
> 2. Create a group for all library files and add it at the end of the input
> graph, as Nick suggested in that thread.
We already have a GroupNode which exactly does the same behavior.

I am sure I would have mixed some corner cases but I think 
LinkingContext::getNextFile could have the intelligence to handle it, 
right ?

Thanks

Shankar Easwaran

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-commits mailing list