aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8ad7d0d..9e2534e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/20306
+ * elflink.c (elf_link_check_versioned_symbol): Return false
+ for unreferenced undefined symbol.
+
2016-06-28 Nick Clifton <nickc@redhat.com>
* elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc
diff --git a/bfd/elflink.c b/bfd/elflink.c
index ad8493b..3e24940 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -9053,7 +9053,8 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info,
case bfd_link_hash_undefined:
case bfd_link_hash_undefweak:
abfd = h->root.u.undef.abfd;
- if ((abfd->flags & DYNAMIC) == 0
+ if (abfd == NULL
+ || (abfd->flags & DYNAMIC) == 0
|| (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) == 0)
return FALSE;
break;