[PATCH] [ELF] Refactor File.h.

Shankar Easwaran shankare at codeaurora.org
Thu Jun 6 07:17:18 PDT 2013



On 6/5/2013 11:18 PM, Rui Ueyama wrote:
> Thank you for the clarification. That's very helpful. Comments inline.
> I see. So, because all atoms in the same section (except weak symbols) are
> reachable from each other, if there's a reference from a live atom to one
> of them, all the other atoms in the same section (again, except weak ones)
> become alive and will be emitted to the output binary. Is this
> understanding correct?
Yes
> Let me double check if I understand what you said by drawing a graph. 
> Normal arrow denotes Layout-After edge, and empty arrow denotes 
> Layout-Before edge. If a section has symbol A, W and C in this order, 
> and W is a weak symbol, then the resulting graph will look like this 
> (Not sure pasting a image will really work on this mailing list but 
> let me try...): [image: Inline image 1] where W' is an anonymous atom 
> having the content of W. If W is overridden by a non-weak symbol, W 
> will be GC'ed (dead-stripped) away, but its contents will still be 
> emitted to the resulting binary as W' is alive (assuming A or C are 
> alive), although there are no atoms that really refer W's content. Is 
> this correct? 
Yes, as the symbol lived within a section.
> And if there are two weak symbols, W1 and W2, between symbol A and C, then
> the graph should become like this, right?
Yes.


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




More information about the llvm-commits mailing list