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

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 06:04:09 PDT 2016


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.

2016-09-16 16:00 GMT+03:00 Rafael EspĂ­ndola <rafael.espindola at gmail.com>:

> On 16 September 2016 at 08:38, Eugene Leviant <evgeny.leviant at gmail.com>
> wrote:
>
>> 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.
>>
>>
> Do you have a testcase?
>
> From the spec I would expect that to be legal within the comdat, but
> illegal from the outside.
>
> Cheers,
> Rafael
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160916/08b0b27d/attachment.html>


More information about the llvm-commits mailing list