4e3721
--- binutils.orig/bfd/elflink.c	2022-03-07 14:59:10.275856785 +0000
4e3721
+++ binutils-2.30/bfd/elflink.c	2022-03-07 15:00:19.129562705 +0000
4e3721
@@ -4578,7 +4578,8 @@ error_free_dyn:
4e3721
 		 || h->root.type == bfd_link_hash_warning)
4e3721
 	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
4e3721
 
4e3721
-	  if (elf_tdata (abfd)->verdef != NULL
4e3721
+	  if (h->versioned != unversioned
4e3721
+	      && elf_tdata (abfd)->verdef != NULL
4e3721
 	      && vernum > 1
4e3721
 	      && definition)
4e3721
 	    h->verinfo.verdef = &elf_tdata (abfd)->verdef[vernum - 1];