summaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 16229b39dc..970379dea3 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2254,6 +2254,8 @@ elf_x86_64_scan_relocs (bfd *abfd, struct bfd_link_info *info,
if (h->pointer_equality_needed
&& h->type == STT_FUNC
&& eh->def_protected
+ && !SYMBOL_DEFINED_NON_SHARED_P (h)
+ && h->def_dynamic
&& elf_has_indirect_extern_access (h->root.u.def.section->owner))
{
/* Disallow non-canonical reference to canonical