https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96385
Bug ID: 96385 Summary: GCC generates separate debug info with undefined symbols without relocations Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 48956 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48956&action=edit LTO debug output GCC may generate separate debug info files which contain undefined symbols without relocations. Here is the lto output from binutils LTO build: [hjl@gnu-cfl-2 binutils-cross-run]$ readelf -rsW /tmp/gcc.lto.debug.o | grep lreal 96: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND lrealpath [hjl@gnu-cfl-2 binutils-cross-run]$ It triggered a linker bug: https://sourceware.org/bugzilla/show_bug.cgi?id=26314