summaryrefslogtreecommitdiff
path: root/gcc/config/i386/predicates.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/i386/predicates.md')
-rw-r--r--gcc/config/i386/predicates.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 93dda7bb0e7..e6e8638e165 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -159,6 +159,10 @@
/* TLS symbols are not constant. */
if (SYMBOL_REF_TLS_MODEL (op))
return false;
+ /* Load the external function address via the GOT slot to avoid
+ PLT. */
+ if (ix86_force_load_from_GOT_p (op))
+ return false;
return (ix86_cmodel == CM_SMALL || ix86_cmodel == CM_KERNEL
|| (ix86_cmodel == CM_MEDIUM && !SYMBOL_REF_FAR_ADDR_P (op)));