<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><div class="gmail_extra"><br><div class="gmail_quote">2016-09-16 16:00 GMT+03:00 Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On 16 September 2016 at 08:38, 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">Implementation can be simplified than, thanks. Do you know why clang puts comdat section relocs to .rela.debug_line, when one is using -ffunction-sections? It looks like this confronts the specification.</div><div><div><div class="gmail_extra"><br></div></div></div></blockquote><div><br></div></span><div><span style="font-family:arial,sans-serif;font-size:small">Do you have a testcase?</span></div><div><span style="font-family:arial,sans-serif;font-size:small"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:small">From the spec I would expect that to be legal within the comdat, but illegal from the outside.</span></div><div><span style="font-family:arial,sans-serif;font-size:small"><br></span></div><div>Cheers,</div><div>Rafael</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:small"> </span><br></div></div></div></div>
</blockquote></div><br></div>