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