<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 16 September 2016 at 09:04, Eugene Leviant <span dir="ltr"><<a href="mailto:evgeny.leviant@gmail.com" target="_blank">evgeny.leviant@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The artificial test case is in this revision (comdat-gc.s). It will crash lld in GC mode.<div>To get real world example just compile any source file using clang with "-ffunction-sections -fdata-sections -g".</div><div>Then just look at .rela.debug_line section contents.</div></div><br></blockquote><div><br><br></div><div>Sigh, looks like it is a special case like .eh_frame. Both MC and gas create these relocations :-(<br><br></div><div>Good news is that like .eh_frame a reference from .debug_line should not keep a section alive.Unlike .eh_frame we don't have to parse and split .debug_line, looks like we can just resolve the relocations to discarded sections to 0.<br></div><div><br></div><div>Cheers,<br></div><div>Rafael<br> <br></div></div></div></div>