diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 20aa4f3c874..a62a8546029 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2018-08-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23499
+	* elflink.c (bfd_elf_record_link_assignment): Always clear
+	h->verinfo.verdef when overriding a dynamic definition.
+
 2018-08-10  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR binutils/23494
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b24fb95848d..02618bed8fe 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -686,13 +686,11 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
       && !h->def_regular)
     h->root.type = bfd_link_hash_undefined;
 
-  /* If this symbol is not being provided by the linker script, and it is
-     currently defined by a dynamic object, but not by a regular object,
-     then clear out any version information because the symbol will not be
-     associated with the dynamic object any more.  */
-  if (!provide
-      && h->def_dynamic
-      && !h->def_regular)
+  /* If this symbol is currently defined by a dynamic object, but not
+     by a regular object, then clear out any version information because
+     the symbol will not be associated with the dynamic object any
+     more.  */
+  if (h->def_dynamic && !h->def_regular)
     h->verinfo.verdef = NULL;
 
   /* Make sure this symbol is not garbage collected.  */