Blame SOURCES/binutils-common-sym-versioning.patch

5affbb
--- binutils.orig/bfd/elflink.c	2020-12-08 17:45:26.487260908 +0000
5affbb
+++ binutils-2.30/bfd/elflink.c	2020-12-08 17:48:06.650728413 +0000
5affbb
@@ -1895,7 +1895,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
5affbb
   if (skip)
5affbb
     goto nondefault;
5affbb
 
5affbb
-  if (hi->def_regular)
5affbb
+  if (hi->def_regular || ELF_COMMON_DEF_P (hi))
5affbb
     {
5affbb
       /* If the undecorated symbol will have a version added by a
5affbb
 	 script different to H, then don't indirect to/from the
5affbb
@@ -2236,7 +2236,7 @@ _bfd_elf_link_assign_sym_version (struct
5affbb
 
5affbb
   /* We only need version numbers for symbols defined in regular
5affbb
      objects.  */
5affbb
-  if (!h->def_regular)
5affbb
+  if (!h->def_regular && !ELF_COMMON_DEF_P (h))
5affbb
     return TRUE;
5affbb
 
5affbb
   bed = get_elf_backend_data (info->output_bfd);
5affbb
@@ -9957,7 +9957,7 @@ elf_link_output_extsym (struct bfd_hash_
5affbb
 	  Elf_Internal_Versym iversym;
5affbb
 	  Elf_External_Versym *eversym;
5affbb
 
5affbb
-	  if (!h->def_regular)
5affbb
+	  if (!h->def_regular && !ELF_COMMON_DEF_P (h))
5affbb
 	    {
5affbb
 	      if (h->verinfo.verdef == NULL
5affbb
 		  || (elf_dyn_lib_class (h->verinfo.verdef->vd_bfd)