https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87698
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-10-24 CC| |hjl at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. The linker resolution fed to the WPA stage is the same. The issue goes away when not using -g or when using gold as the linker. HJ, this looks like a BFD linker issue to me - not sure where that .dynsym for 'f' comes from. It looks like being a left-over from the fat object part but it's weird that it only happens with -g (maybe the fat debug somehow keeps it live). There is a .rela.text relocation in test2.o (fat) to f. But a ABS dynsym is weird in any case.