binutils/binutils-rh1312151.patch

23 lines
629 B
Diff
Raw Normal View History

--- binutils-2.26.orig/bfd/elflink.c 2016-02-26 13:21:54.134859610 +0000
+++ binutils-2.26/bfd/elflink.c 2016-02-26 13:22:49.083168157 +0000
@@ -555,6 +555,19 @@ bfd_elf_record_link_assignment (bfd *out
if (h == NULL)
return provide;
+ if (h->versioned == unknown)
+ {
+ /* Set versioned if symbol version is unknown. */
+ char *version = strrchr (name, ELF_VER_CHR);
+ if (version)
+ {
+ if (version > name && version[-1] != ELF_VER_CHR)
+ h->versioned = versioned_hidden;
+ else
+ h->versioned = versioned;
+ }
+ }
+
switch (h->root.type)
{
case bfd_link_hash_defined: