Hi Alex, I'm forwarding this to the gcc-help list which is the appropriate place for this discussion. gcc-bugs is for automated emails from the bug tracker and your mail is likely to get lost in there. Thanks, Kyrill On 05/10/18 13:24, Alexander Fedotov wrote:
Hello I've noticed that for C++ translation unit GCC for aarch64 always emits CFI into eh_frame but never debug_frame even if debug information is enabled. Tried on GCC versions 6 to 8. DWARF for the ARM 64-bit architecture (AArch64) states that it must be debug_frame ((https://static.docs.arm.com/ihi0057/b/IHI0057B_aadwarf64.pdf) GAS supports emitting CFI to both sections by directive: .cfi_sections .debug_frame,.eh_frame At the same time gcc for arm emits CFI in both debug_frame and .ARM.exidx I'm aware about CFI for Exception Handling. But what the reason to not emit both ? Is there any implicit reason for that or it's just a bug ? Steps to reproduce: cat > test.cpp <<EOF int foo() { return 0; } EOF ./aarch64-none-elf-gcc -c -g test.cpp -o test_cpp.o && ./aarch64-none-elf-objdump -g test_cpp.o | grep -B 3 "CIE" | grep "_frame" Contents of the .eh_frame section: While for C code it does: cat > test.c <<EOF int foo() { return 0; } EOF ./aarch64-none-elf-gcc -c -g test.c -o test_c.o && ./aarch64-none-elf-objdump -g test_c.o | grep -B 3 "CIE" | grep "_frame" Contents of the .debug_frame section: Alex