https://sourceware.org/bugzilla/show_bug.cgi?id=19073
--- Comment #9 from Andreas Krebbel <krebbel at linux dot vnet.ibm.com> ---
The problem is that when processing "getcontext" in elf_link_add_object_symbols
it is matched by the hash entry for "getcontext@@GLIBC_2.2" here:
/* We need to make sure that indirect symbol dynamic flags are
updated. */
hi = h;
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
While the name stays "getcontext" the new `h' has the `versioned' flag set.
That's what confuses _bfd_elf_add_default_symbol.
This hack mimics the old behavior of exiting for all symbols not having @ in
their name and fixes the problem for me:
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 94bb710..2a56fd6 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -4374,8 +4374,9 @@ error_free_dyn:
/* Check to see if we need to add an indirect symbol for
the default name. */
- if (definition
- || (!override && h->root.type == bfd_link_hash_common))
+ if (strchr (name, ELF_VER_CHR) != NULL
+ && (definition
+ || (!override && h->root.type == bfd_link_hash_common)))
if (!_bfd_elf_add_default_symbol (abfd, info, h, name, isym,
sec, value, &old_bfd, &dynsym))
goto error_free_vers;
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils