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

Oliver Stannard (Linaro) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 04:53:40 PDT 2020


ostannard added a comment.

It looks like the issues this is warning about isn't the `.debug_line` section, but the `DW_AT_low/high_pc` attributes of the compilation unit DIE. With DWARF3 we can emit a DW_AT_ranges attribute instead, but that didn't exist in DWARF2.

Since this range should only cover PC values corresponding to this compilation unit, maybe we could also limit this warning to sections with `SHF_EXECINSTR`? Does linux tend to split code across multiple sections, or are the extra sections just used for data?

If that doesn't work, maybe we'll have to add a proper way to suppress individual categories of assembly warnings, like we have for compiler warnings.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D6379/new/

https://reviews.llvm.org/D6379





More information about the llvm-commits mailing list