aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2015-02-05 23:57:06 +0000
committerSriraman Tallam <tmsriram@google.com>2015-02-05 23:57:06 +0000
commit4ce3735cf2bd455efa66f4b638e014783be972a7 (patch)
treed06be7cdc1acba4df2b4de7d43da45428282f5c8
parent964a16593761558874df1b9cd1c88380d045d2af (diff)
Weak defined symbols need not use GOT access in PIE mode. Helps improve
performance of PIE. This is only a temporary fix and must be reverted after the fix being worked here is checked in: https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00366.html git-svn-id: https://gcc.gnu.org/svn/gcc/branches/google/gcc-4_9@220464 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/config/i386/i386.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 2c917e6cd44..da7abc9628c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -13007,7 +13007,11 @@ legitimate_pic_address_disp_p (rtx disp)
&& (SYMBOL_REF_LOCAL_P (op0)
|| (HAVE_LD_PIE_COPYRELOC
&& flag_pie
- && !SYMBOL_REF_WEAK (op0)
+ && !(SYMBOL_REF_WEAK (op0)
+ /* TODO:Temporary fix for weak defined symbols.
+ Revert after fix is checked in here:
+ https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00366.html*/
+ && SYMBOL_REF_EXTERNAL_P (op0))
&& !SYMBOL_REF_FUNCTION_P (op0)))
&& ix86_cmodel != CM_LARGE_PIC)
return true;