[llvm-dev] CFI error with binutils 2.27

Martin J. O'Riordan via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 9 14:07:30 PDT 2016

Was there any determination as to whether this is an LLVM bug or a Binutils bug?

I am using Binutils v2.26 plus some subsequent custom mods, and hoping to update to v2.27 soon so that I can ditch the mods and it would be good to know what I should expect.



-----Original Message-----
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Richard Pennington via llvm-dev
Sent: 06 August 2016 17:40
To: llvm-dev at lists.llvm.org
Subject: [llvm-dev] CFI error with binutils 2.27


:If I compile this file with debugging enabled (clang/LLVM TOT)

int main()

I get the error

Error: inconsistent uses of .cfi_sections

 From the 2.27 binutils assemblers. It seems that 2.27 doesn't like the

.cfi_sections .debug_frame

directive following previous .cfi directives. The assemblers seem to be happy if the .cfi_sections directive precedes any other .cfi directive. 
Is this a bug in binutils or LLVM? It looks as if a fix might be to move the generation of the .cfi_sections directive from endModule() to somewhere else (maybe a non-existant beginModule()?).

Could someone give me some hints about what the right approach might be? 
It looks as if the ARM code generator might need special handling also since it appears to emit the .cfi_sections directive itself.

Thanks for any suggestions.


LLVM Developers mailing list
llvm-dev at lists.llvm.org

More information about the llvm-dev mailing list