<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 20, 2013 at 9:02 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  The main problem I have here understanding is<br>
<br>
  handleFile is called when looking at kindObject files. If I have an undefined symbol in the object file with a fallback atom, i think its too early to use the fallback atom instead of the undefined atom, when looking at that single object file.<br>


<br>
  For example :<br>
<br>
  Say you have<br>
<br>
  lld -flavor link hello.o libc.a (the link line may not look like this, but only taking this as an example).<br>
<br>
  Currently when the resolver reads in hello.o and say printf has a fallback to puts, its too early to replace undefined atom printf with puts, when you have just read hello.o.<br>
<br>
  Does link.exe have this same behavior ?<br></blockquote><div><br></div><div>Yes. If hello.o contains symbol "printf" with fallback symbol "puts", "puts" will be searched in libc.a. "printf" won't be searched. If libc.a has only "printf" and does not have "puts", it will fail to link.</div>

</div></div></div>