https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96385
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to H.J. Lu from comment #10) > (In reply to H.J. Lu from comment #8) > > The original pr26324a.o debug info contains reference to xxx. But reference > > to xxx has been removed by LTO. simple_object_copy_lto_debug_sections fails > > to remove the un-referenced symbol, xxx, from symbol table. > > The alternative is to ask linker to handle it: > > https://sourceware.org/pipermail/binutils/2020-July/112673.html The bug is we create the reference in the first place.