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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 16 14:29:56 PDT 2017


On Sun, Apr 16, 2017 at 6:29 AM Dimitry Andric via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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?
>

What I meant was - do we need these sections in this Sections map if they
aren't progbits? Looking at the code I guess we do need them there for
other things? Presumably those "other things" also include needing the
labels that're being created there for other things too?

So maybe this is the best spot for this handling.

That said: I don't really understand how this correctly diagnoses only the
case of more than one section & why this coed doesn't run for the first
section...


>
> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170416/96f3f6bf/attachment.html>


More information about the llvm-commits mailing list