[PATCH] D28481: Respect section groups in GC

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 11:19:56 PST 2017


Rui Ueyama via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:

> ruiu added a comment.
>
> Hm, now I recall why we did that for C identifier sections. Sections with C identifier names can be garbage collected if no one is referring them, but that cannot be determined until we create output sections, and when we create output sections, it is usually too late to do GC. We could do something tricky to handle that, but it's probably not worth it.

That would still be an issue with this patch, no?

If a section is named asan_metadata, and there is a use of the symbol
_start_asan_metadata then we cannot GC any section named
asan_metadata. The desired result, if I understand correctly, is to gc
*some* sections name asan_metadata: The ones that correspond to gced
variables.

Cheers,
Rafael


More information about the llvm-commits mailing list