https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86548
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jonny Grant from comment #0) > It's pretty hard to work out which file this o file comes from. Could it > include the first file name in the tmp path to make it clearer where it came > from? > > Currently: > /tmp/ccDxn2Yd.ltrans0.ltrans.o > > Expected: > /tmp/main.cpp.ccDxn2Yd.ltrans0.ltrans.o > > Example below of what I see > > jonny@asus:~/domains$ make > g++-8 -std=c++11 -g -ggdb -pthread -O0 -Werror -Wextra -Wshadow > -Wformat-nonliteral -Wall -Wnonnull -Wpedantic -fstack-protector-strong > -Wdiv-by-zero -Wsign-conversion -Wnull-dereference -flto > -Wno-nonnull-compare -o proc main.cpp test_whois.cpp <snip file list> > /usr/bin/x86_64-linux-gnu-ld: Dwarf Error: Offset (1678049557) greater than > or equal to .debug_str size (5846). ^^^ oh, and as for this DWARF section sizes are limited to 2GB as offsets are 32bits only. The above offset is 0x64050115 which _may_ indicate an overflow (and .debug_str is unlikely to be just 5846 bytes in size). If you do not use LTO how large are your .debug_* sections in the final executable?