[Bug target/65780] [5 Regression] Uninitialized common handling in executables

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 16 04:32:00 GMT 2015


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.

More information about the Gcc-bugs mailing list