[PATCH] D6379: Only warn about DWARF2 supporting one section per compilation unit for code sections

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 16 06:29:47 PDT 2017


dim added a comment.

In https://reviews.llvm.org/D6379#95991, @dblaikie wrote:

> Should we add that filter elsewhere rather than here? (eg: we shouldn't be adding such non-text sections into the Sections map if they're not part of teh DWARF anyway, right?)


I realized this review was still in the system from a long time ago, and the situation still hasn't changed: this warning still pops up regularly.  David, I'm trying to interpret your comment here, how would we prevent inserting such sections?

Note that in FreeBSD, we commonly see this warning due to `.note.GNU-stack` sections being artificially inserted at the end of .S files, for example here: https://github.com/freebsd/freebsd/blob/master/libexec/rtld-elf/amd64/rtld_start.S#L171 .  Since the file starts with a `.text` section, which has progbits type, the last line with `.section .note.GNU-stack,"",%progbits` triggers this warning, which may even be right.  Not sure how you should insert such a section otherwise.

> & this could use a test case as well.

IIRC I had one at some point, maybe I can come up with a new one, otherwise I will just abandon this review.


https://reviews.llvm.org/D6379





More information about the llvm-commits mailing list