as discussed in the gcc bugzilla, linking a recent version of cp2k with trunk gcc produces an number of unexpected errors: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40332 this happens with older and more recent (2.19.1) ld. http://www.pci.uzh.ch/vandevondele/tmp/PR40332.tgz contains the relevant object files and libraries, plus a README that provides the exact command line I use
Created attachment 3988 [details] z2.s.bz2 This looks like a gas bug to me. At least from brief look at .cfi_* directives in the assembly they look ok, but after assembling we see: 00000044 0000002c 00000048 FDE cie=00000000 pc=0000339f..00016d6a DW_CFA_advance_loc: 1 to 000033a0 DW_CFA_def_cfa_offset: 16 DW_CFA_advance_loc: 3 to 000033a3 DW_CFA_offset: r6 (rbp) at cfa-16 DW_CFA_def_cfa_register: r6 (rbp) DW_CFA_advance_loc2: 332 to 000034ef DW_CFA_offset: r3 (rbx) at cfa-56 DW_CFA_offset: r12 (r12) at cfa-48 DW_CFA_offset: r13 (r13) at cfa-40 DW_CFA_offset: r14 (r14) at cfa-32 DW_CFA_offset: r15 (r15) at cfa-24 DW_CFA_nop DW_CFA_advance_loc: 58 to 00003529 DW_CFA_??? (User defined call frame op: 0x38) in the second FDE. I guess gas just doesn't handle the huge location advance well (from 34ef to 16d69). Looking into it...
Small testcase: .text .cfi_startproc .skip 16 .cfi_def_cfa 0, 16 .skip 75031 .cfi_def_cfa 0, 64 .cfi_endproc
I just hit this as well: corrupt .eh_frame in one of my object files with a huge location advance. Verified that this change to binutils/gas 2009-06-09 Jakub Jelinek <jakub@redhat.com> PR gas/10255 * dw2gencfi.c (output_cfi_insn): Initialize fragment before rs_cfa to DW_CFA_advance_loc4. fixes it for me.
Fixed.
The new test case is failing for me on ppc64 like: /home/bergner/binutils/build/binutils-pr10255/gas/testsuite/../../binutils/readelf -wf dump.o Executing on host: sh -c {/home/bergner/binutils/build/binutils-pr10255/gas/testsuite/../../binutils/readelf -wf dump.o >dump.out 2>gas.stderr} /dev/null (timeout = 300) regexp_diff match failure regexp "^00000014 000000(1c|20) 00000018 FDE cie=00000000 pc=.*$" line "00000014 00000018 00000018 FDE cie=00000000 pc=00000000..00012527" regexp_diff match failure regexp "^ DW_CFA_advance_loc4: 75031 to .*$" line " DW_CFA_advance_loc2: 75028 to 00012524" FAIL: CFI common 7 Configure options used were: --target=powerpc-linux --host=powerpc-linux --build=powerpc-linux --enable-targets=powerpc64-linux
Testcase fixed.
Hello, Similar issue Igetting with cr16-elf tools? Is this patch taget specific? Thanks for any input. Thanks Swami