[PATCH] Do not use layout-before to layout atoms.
shankare at codeaurora.org
Thu Mar 27 15:00:18 PDT 2014
Wow, I was unaware of this change that deadStrip was always enabled for
PE/COFF with lld.
LGTM then, Can we put a note in the code that kindLayoutBefore will be
removed and used only by Dead stripping code to prevent atoms from being
On 3/27/2014 4:40 PM, Rui Ueyama wrote:
> Dead-stripping is enabled by default for PE/COFF because MSVC link.exe
> does it by default.
> On Thu, Mar 27, 2014 at 2:38 PM, Shankar Easwaran
> <shankare at codeaurora.org <mailto:shankare at codeaurora.org>> wrote:
> I understand your usecase, but what I meant is, dead-strip is only
> a option available in core.
> Removing kindLayoutBefore completely should not affect anything
> because we dont dead strip in flavors [link, gnu, ld64]
> Shankar Easwaran
> On 3/27/2014 4:31 PM, Rui Ueyama wrote:
>> Can you elaborate a bit? I don't understand what you mean.
>> Removing kindLayoutBefore will affect dead stripping because it
>> would lost back references for kindLayoutAfter, so it would
>> collect live atoms.
>> I'm not removing kindLayoutBefore in this patch. This patch is
>> just to stop using kindLayoutBefore in the layout pass. The dead
>> stripping pass is still using it. Removing kindLayoutBefore
>> entirety is the last step, after modifying the dead stripping
>> pass so that the pass works without kindLayoutBefore (only with
>> kindLayoutAfter and kindInGroup).
>> On Thu, Mar 27, 2014 at 12:45 PM, Shankar Easwaran
>> <shankare at codeaurora.org <mailto:shankare at codeaurora.org>> wrote:
>> On 3/27/2014 2:33 PM, Rui Ueyama wrote:
>>> (I accidentally hit "reply" instead of "reply all", so
>>> sending it again.)
>>> I'll add "alias" references if no objections from other
>>> reviewers. I'll probably add ELF symbol aliasing support
>>> with it, so hold on.
>>> We cannot remove kindLayoutBefore because doing it would
>>> break dead stripping pass. We still need it for GC as GC
>>> needs backward references.
>>> To remove kindLayoutBefore, we have to modify dead striping
>>> pass so that it creates back references internally from
>>> forward references and use it while collecting dead objects.
>>> I think I'm going to make such change, but it's going a bit
>>> Submitting this change first and then doing the next step in
>>> a following patch would be better than merging the two
>>> together. Incremental change is easier to bisect in case it
>>> would breaks omething, and it's easy to understand for
>>> reviewers, too.
>> Do we have a flag to garbage collect atoms with lld in the
>> current implementation ? If not removing kindLayoutBefore
>> wouldnot affect anything right ?
>> Shankar Easwaran
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits