https://sourceware.org/bugzilla/show_bug.cgi?id=26520
Bug ID: 26520 Summary: "objdump: DWARF error: could not find variable specification at offset ..." when generating assembly listing of .elf file containing symbols from libstdc++.a Product: binutils Version: 2.35 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: freddie_chopin at op dot pl Target Milestone: --- Created attachment 12787 --> https://sourceware.org/bugzilla/attachment.cgi?id=12787&action=edit Problematic .elf file I have multiple embedded C++ projects that - as part of the compilation process - produce also assembly listing with command similar to this one: $ arm-none-eabi-objdump -S --demangle distortosTest.elf > distortosTest.lss This worked flawlessly up to (and including) previous release of binutils. In 2.35 something changed. The assembly listing is still generated and it seems to be correct (I did not check it very thoroughly), the command ends with no fatal errors (it returns "0" to the shell), however I see multiple errors like these: arm-none-eabi-objdump: DWARF error: could not find variable specification at offset 2f9 arm-none-eabi-objdump: DWARF error: could not find variable specification at offset 305 arm-none-eabi-objdump: DWARF error: could not find variable specification at offset 311 ... If I take the .elf file produced by the "new" toolchain (it also includes GCC 10.2) and do the command above but with objdump from the "old" toolchain (binutils 2.34), then there is no error. In a reversed scenario (.elf produced by "old" toolchain, passed to "new" objdump) I see 10x more errors like the ones above. I attach the problematic .elf file for ARM Cortex-M4 which produces such errors. After further inspection it turns out that none of "my" .o object files or .a archives produce such error. When examining toolchain libraries, such errors are produced by only ONE library there - libstdc++.a. arm-none-eabi-objdump -S --demangle libstdc++.a > libstdc++.lss arm-none-eabi-objdump: DWARF error: could not find variable specification at offset 76c arm-none-eabi-objdump: DWARF error: could not find variable specification at offset 1733 arm-none-eabi-objdump: DWARF error: could not find variable specification at offset 1740 ... (a lot...) No other toolchain libraries or toolchain object files produce such error, only libstdc++.a. At this moment I cannot confirm whether or not this is arm-none-eabi specific or not, as Arch Linux still has binutils 2.34 in the repos. -- You are receiving this mail because: You are on the CC list for the bug.