<div dir="ltr">A LayoutAfter reference is considered as a doubly-linked reference by the garbage collector. Look for _refereseRef at Resolve.cpp.<div><br></div><div>Thus if one atom is live, all atoms in the LayoutAfter chain are considered live too, regardless whoever the live atom is in the chain.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 10:12 PM, Nick Kledzik <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank">kledzik@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><div>On Jan 26, 2015, at 8:10 PM, Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:</div><blockquote type="cite"><p dir="ltr">I think it's not for garbage collection. Because all atoms in the same section are already connected with LayoutAfter references, they are treated as a group by the garbage collector.</p></blockquote></span><div>Well, the first atom in the section has nothing before it, so it has nothing holding on to it.   </div><div><br></div><div>More generally, if all you have is a after-chain and the only atom referenced from outside the section is the Nth atom, then dead stripping could remove atoms 1 thru N-1.</div><div><br></div><div>-Nick</div><span class=""><div><br></div><div><br></div><br><blockquote type="cite">
<div class="gmail_quote">2015/01/26 19:25 "Shankar Easwaran" <<a href="mailto:shankar.kalpathi.easwaran@gmail.com" target="_blank">shankar.kalpathi.easwaran@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is mainly relevant when you turn on garbage collection as Nick pointed out. You can refer to an atom in a section but to keep the section to be consistent w.r.t ELF you have to keep all the remaining atoms together.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D7189" target="_blank">http://reviews.llvm.org/D7189</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>
</blockquote></span></div><br></div></blockquote></div><br></div>