<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 28, 2014 at 9:53 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="">On Fri, Mar 28, 2014 at 9:42 AM, Shankar Kalpathi Easwaran <span dir="ltr"><<a href="mailto:shankarke@gmail.com" target="_blank">shankarke@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
  Ok, I agree about that its more complex to have the complete --defsym option.<br>
<br>
  Once the above comment is fixed, this patch LGTM.<br>
<br>
<br>
================<br>
Comment at: lib/Core/LinkingContext.cpp:59-61<br>
@@ -58,5 +58,5 @@<br>
<br>
-std::unique_ptr<File> LinkingContext::createUndefinedSymbolFile() const {<br>
-  return createUndefinedSymbolFile("command line option -u");<br>
+std::unique_ptr<File> LinkingContext::createCommandLineFile() const {<br>
+  return createCommandLineFile("<command line option -u or --defsym>");<br>
 }<br>
<br>
----------------<br>
Can we use a separate string for -u and --defsym. We could have a createCommandLineFile with a StringRef like how PECOFF does, so that we can support more command line defined by various options.</blockquote><div><br></div>


</div><div>It's actually pretty odd that we have a piece of code in LinkingContext that creates what seems ELF-specific thing ("<command line option -u or --defsym>"). Need to be refactored. Anyways I'll create a separate file for --defsym.</div>

</div></div></div></blockquote><div><br></div><div>It turned out that it's not that easy -- each <i>Flavor</i>LinkingContext is expected to create at most one file for its internal use. If it doesn't need one, createCommandLIneFile return a nullptr, or a file instance otherwise. That's working well, so we should keep it. Let's go with a single file here.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div><div>
<br>
<a href="http://llvm-reviews.chandlerc.com/D3208" target="_blank">http://llvm-reviews.chandlerc.com/D3208</a><br>
<br>
BRANCH<br>
  defsym<br>
<br>
ARCANIST PROJECT<br>
  lld<br>
</div></div></blockquote></div></div><br></div></div>
</blockquote></div><br></div></div>