<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 22, 2013 at 4:45 PM, Shankar Easwaran <span dir="ltr"><<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 11/22/2013 5:51 PM, Rui Ueyama wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks. I don't know if it's exactly the same, but it looks like it's<br>
pretty similar. So the ideas to support that (non-Unix) semantics are<br>
basically the same as Nick's.<br>
<br>
1. Implement a new Resolver behavior for Darwin/COFF. The behavior would be<br>
like this: Make Resolver to add all symbols from library files to the<br>
symbol table as it processes new files, constructing a gigantic symbol<br>
table that contains all the symbols that is already resolved or *could* be<br>
resolved in a library file that Resolver has seen. For a new object file,<br>
Resolver looks up the symbol table for each undefined symbol in an object<br>
file, and if it can be resolved in an (unparsed) library file, parse the<br>
library file, and add the symbols from the file to the symbol table.<br>
</blockquote></div>
This should be controlled from the context. Its just like treating all the library files like --whole-archive.<br>
Just set the flag (--whole-archive from library files), and you should be done.</blockquote><div><br></div><div>No, --whole-archive wouldn't work. We don't want to add the archive file contents unless it's actually used.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. Create a group for all library files and add it at the end of the input<br>
graph, as Nick suggested in that thread.<br>
</blockquote></div>
We already have a GroupNode which exactly does the same behavior.<br>
<br>
I am sure I would have mixed some corner cases but I think LinkingContext::getNextFile could have the intelligence to handle it, right ?</blockquote><div><br></div><div>If we take (2) approach, yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
Thanks<br>
<br>
Shankar Easwaran<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation<br>
<br>
</div></div></blockquote></div><br></div></div>