https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68881
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #8) > Jakub, why this is refused? Dunno. Weakrefs have been added for undefined weak references, so I fail to see why you'd like to emit a weakref if the symbol is defined in the current file, IMHO you should just then transparently redirect in the assembly all references from callmealias.lto_priv.0 to callmesecond. That said, it might be a gas bug too, if you say that the assembler should do the work for the compiler, but it has been years since I've touched binutils, you want some of the current binutils maintainers to have a look at that instead.