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

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 05:38:47 PDT 2016


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.

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

>
> On 15 September 2016 at 13:43, Eugene Leviant <evgeny.leviant at gmail.com>
> wrote:
>
>> evgeny777 created this revision.
>> evgeny777 added reviewers: ruiu, rafael.
>> evgeny777 added subscribers: grimar, llvm-commits.
>> evgeny777 set the repository for this revision to rL LLVM.
>> evgeny777 added a project: lld.
>>
>> This patch fixes two things
>>
>> 1) If any section within comdat group is marked Live an entire group is
>> marked live.
>>
>
>
>
> I don't think we should do this. That is not what gold does and I think it
> is an important feature to be able to gc part of a comdat.
>
> The abi implemented by gcc/clang will put multiple destructors in the same
> comdat (D0/D1/D2) and the linker should be able to remove unused ones.
>
> Cheers,
> Rafael
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160916/2dde80ee/attachment.html>


More information about the llvm-commits mailing list