[PATCH] D24733: [ELF] Add .debug* and .comment sections to the list of sections ignored by GC.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 08:53:07 PDT 2016


rafael added a comment.

Sorry, this had dropped out of my inbox.

This patch would require updating the comment

// Sections listed below are special because they are used by the loader
// just by being in an ELF file. They should not be garbage-collected.

since it adds another reason for not gcing.

But I think we can make it far more general and avoid yet another section name check: Just GC SHF_ALLOC sections.

In practice most non SHF_ALLOC sections are debug info. I remember some time back Cary Coutant had a proposal for how to gc them, but it will be a long time before we get there.


https://reviews.llvm.org/D24733





More information about the llvm-commits mailing list