https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hjl.tools at gmail dot com --- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> --- It has nothing to do with LTO. You get the same behavior without LTO. This is how weak symbol works.