This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49950] GOT relocation for -fPIE is excessive
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 3 Aug 2011 16:30:04 +0000
- Subject: [Bug target/49950] GOT relocation for -fPIE is excessive
- Auto-submitted: auto-generated
- References: <bug-49950-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49950
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-03 16:29:48 UTC ---
default_binds_local_p_1 has:
/* Uninitialized COMMON variable may be unified with symbols
resolved from other modules. */
else if (DECL_COMMON (exp)
&& !resolved_locally
&& (DECL_INITIAL (exp) == NULL
|| DECL_INITIAL (exp) == error_mark_node))
local_p = false;
Now, it depends on what the callers expect. If they want to figure out if the
decl can't be interposed by other library etc., then the above lines are
unnecessary, but if it wants to find out e.g. if it can trust DECL_INITIAL or
lack thereof of the DECL etc., then the above is needed. E.g. we use
targetm.binds_local_p to find out if anchoring should be used, for commons it
certainly shouldn't be.