summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 9a4c193e2e7..3f816babdb1 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -6787,8 +6787,13 @@ default_binds_local_p_1 (const_tree exp, int shlib)
{
bool local_p;
+ /* IFUNC DECLs are always global since it has to go through PLT even
+ for local definitions. */
+ if (TREE_CODE (exp) == FUNCTION_DECL
+ && DECL_IS_IFUNC (exp))
+ local_p = false;
/* A non-decl is an entry in the constant pool. */
- if (!DECL_P (exp))
+ else if (!DECL_P (exp))
local_p = true;
/* Weakrefs may not bind locally, even though the weakref itself is
always static and therefore local. */