[PATCH] Fix Weak External symbol handling.

Shankar Easwaran shankare at codeaurora.org
Wed Nov 20 10:02:05 PST 2013


Really strange, Your patch LGTM.

PS: looks like all the comments thats replied to reviews, doesnot go in 
the phabricator page. I think we should just use the review page to 
reply, so that we have it in the page.

Thanks

Shankar Easwaran

On 11/20/2013 11:36 AM, Rui Ueyama wrote:
> On Wed, Nov 20, 2013 at 9:02 AM, Shankar Kalpathi Easwaran <
> shankarke at gmail.com> wrote:
>
>>    The main problem I have here understanding is
>>
>>    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.
>>
>>    For example :
>>
>>    Say you have
>>
>>    lld -flavor link hello.o libc.a (the link line may not look like this,
>> but only taking this as an example).
>>
>>    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.
>>
>>    Does link.exe have this same behavior ?
>>
> 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.
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131120/d1870f5a/attachment.html>


More information about the llvm-commits mailing list