[llvm-bugs] [Bug 29017] New: .cfi_sections directives should go before CFI generation start

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 17 09:22:37 PDT 2016


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

            Bug ID: 29017
           Summary: .cfi_sections directives should go before CFI
                    generation start
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: artemiyv at acm.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Currently, the DwarfCFIException class writes the sections that the CFI emits
(via a .cfi_sections directive) within its endModule() method, after all the
other CFI info has already been output. This renders the resulting .s files
impossible for gnu as to process, since by the rules gnu as uses for the .cfi*
directives the last .cfi_sections directive must precede the first
.cfi_startproc directive (see 7.10.1 @
https://sourceware.org/binutils/docs/as/CFI-directives.html). This rule has
been enforced in gas since Feb 2016 (commit
bd5608dcc6a76876db06b1af1852252a4282aa2f), after the 2.26 release, and I've
been able to reproduce it for aarch64 and sparc, like this:

> cd binutils-build
> ../binutils-x86/configure --target=aarch64-linux && make
> cd ../t
> cat t.c
int main()
{
}
> ../clang-build/bin/clang 1.c -S -O0 -ggdb -target aarch64
> ../binutils-build/gas/as-new 1.s
t.s: Assembler messages:
t.s:142: Error: inconsistent uses of .cfi_sections

This problem has also been reported at
http://lists.llvm.org/pipermail/llvm-dev/2016-August/103519.html.

-- 
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/20160817/8050edd9/attachment.html>


More information about the llvm-bugs mailing list