https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65780
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35326|0 |1 is obsolete| | --- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> --- Created attachment 35327 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35327&action=edit A different patch On x86, this issue only shows up with PIE. Here is a different patch to treat common symbol defined locally only if the backend passes true common_maybe_local. For x86-64, it is true only if HAVE_LD_PIE_COPYRELOC is 1. For i386, it is always false. If we aren't building PIE, common_maybe_local is true or false doesn't make a difference for x86 since the common symbol is always referenced normally with copy reloc. For PIE on x86-64, common symbol is local only if HAVE_LD_PIE_COPYRELOC is 1.