https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94249
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2020-03-21 --- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- It will be definitely caused by my g:c8429c2aba80f845939ffa6b2cfe8a0be1b50078. The error comes from lto-plugin.c: if (add_symbols_v2) status = add_symbols_v2 (file->handle, lto_file.symtab.nsyms, lto_file.symtab.syms); else status = add_symbols (file->handle, lto_file.symtab.nsyms, lto_file.symtab.syms); check (status == LDPS_OK, LDPL_FATAL, "could not add symbols"); In our case add_symbols_v2 should be NULL, so the old function add_symbols should be called. So is the reason usage of ld.gold? Is the default linker fine?