summaryrefslogtreecommitdiff
path: root/gcc/config/ia64/ia64.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-05 17:57:05 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-05 17:57:05 +0000
commitafe82e5b25dda439d84a99d95b3767d6cced79c8 (patch)
treea68c987f368170593f89e4702fe5083696175be2 /gcc/config/ia64/ia64.c
parent1e9147dd7b41b6e32c25501b50df73e74b75387f (diff)
downloadgcc-afe82e5b25dda439d84a99d95b3767d6cced79c8.tar.gz
[PATCH v2] ia64: don't use dynamic relocations for local symbols
PR other/60465 * config/ia64/ia64.c (ia64_expand_load_address): Use gprel64 for local symbolic operands. * config/ia64/predicates.md (local_symbolic_operand64): New predicate. PR other/60465 * gcc.target/ia64/pr60465-gprel64.c: New test. * gcc.target/ia64/pr60465-gprel64-c37.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232080 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ia64/ia64.c')
-rw-r--r--gcc/config/ia64/ia64.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index e0059f8b306..33ec7a74bee 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -1105,6 +1105,15 @@ ia64_expand_load_address (rtx dest, rtx src)
emit_insn (gen_load_fptr (dest, src));
else if (sdata_symbolic_operand (src, VOIDmode))
emit_insn (gen_load_gprel (dest, src));
+ else if (local_symbolic_operand64 (src, VOIDmode))
+ {
+ /* We want to use @gprel rather than @ltoff relocations for local
+ symbols:
+ - @gprel does not require dynamic linker
+ - and does not use .sdata section
+ https://gcc.gnu.org/bugzilla/60465 */
+ emit_insn (gen_load_gprel64 (dest, src));
+ }
else
{
HOST_WIDE_INT addend = 0;