[llvm-bugs] [Bug 37657] New: clang with -gdwarf-2 produces seemingly spurious warnings on assembly file

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 1 14:34:41 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37657

            Bug ID: 37657
           Summary: clang with -gdwarf-2 produces seemingly spurious
                    warnings on assembly file
           Product: libraries
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: waltl at google.com
                CC: llvm-bugs at lists.llvm.org

> cat sec.S
.section ".foo", "ax", @progbits
> clang -c -gdwarf-2 sec.S
sec.S:1:1: warning: DWARF2 only supports one section per compilation unit
.section ".foo", "ax", @progbits
^
> clang --target=sparc-myriad-rtems-elf -mcpu=ma2450 -integrated-as -g -c sec.S
/usr/local/google/home/waltl/sec.S:1:1: warning: DWARF2 only supports one
section per compilation unit
.section ".foo", "ax", @progbits
^

It's not clear why the assembler is complaining even though there is only one
section in the input file.  According to https://reviews.llvm.org/D6379, at
least some of these warnings are spurious.

Myriad uses dwarf-2, so it gets all these warnings, which we are working around
by passing -g0 for assembly files.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180601/73ef5c33/attachment.html>


More information about the llvm-bugs mailing list