[PATCH] D24616: [ELF] Improve section GC for comdat groups

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 06:21:51 PDT 2016


On 16 September 2016 at 09:04, Eugene Leviant <evgeny.leviant at gmail.com>
wrote:

> The artificial test case is in this revision (comdat-gc.s). It will crash
> lld in GC mode.
> To get real world example just compile any source file using clang with
> "-ffunction-sections -fdata-sections -g".
> Then just look at .rela.debug_line section contents.
>
>

Sigh, looks like it is a special case like .eh_frame. Both MC and gas
create these relocations :-(

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.

Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160916/5f86526e/attachment.html>


More information about the llvm-commits mailing list