aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-ifunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf-ifunc.c')
-rw-r--r--bfd/elf-ifunc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c
index 81429b8..3ba96c7 100644
--- a/bfd/elf-ifunc.c
+++ b/bfd/elf-ifunc.c
@@ -299,9 +299,10 @@ keep:
5. Otherwise use .got so that it can be shared among different
objects at run-time.
We only need to relocate .got entry in shared object. */
- if ((info->shared
- && (h->dynindx == -1
- || h->forced_local))
+ if (h->got.refcount <= 0
+ || (info->shared
+ && (h->dynindx == -1
+ || h->forced_local))
|| (!info->shared
&& !h->pointer_equality_needed)
|| (info->executable && info->shared)