* elflink.h (elf_link_add_object_symbols): When a version
authorIan Lance Taylor <ian@airs.com>
Thu, 26 Jun 1997 16:06:03 +0000 (16:06 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 26 Jun 1997 16:06:03 +0000 (16:06 +0000)
indirection symbol is overridden, make the original symbol point
at the real overriding symbol.

bfd/ChangeLog
bfd/elflink.h

index 272c89d9f1631eedd815dbb1293aa853c4233b7a..aa5b95689b23000076b1ef636871e8ca4998bba1 100644 (file)
@@ -1,5 +1,9 @@
 Thu Jun 26 01:26:31 1997  Ian Lance Taylor  <ian@cygnus.com>
 
+       * elflink.h (elf_link_add_object_symbols): When a version
+       indirection symbol is overridden, make the original symbol point
+       at the real overriding symbol.
+
        * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
        string index.
 
index 82e10d214f4ba698ee01e11ff22f31d3dbbd6b7d..a40e1d40cba930fe2cd29be32dadef48d63e383c 100644 (file)
@@ -1411,6 +1411,10 @@ elf_link_add_object_symbols (abfd, info)
                         mapped to the definition in the regular
                         object.  */
 
+                     while (hi->root.type == bfd_link_hash_indirect
+                            || hi->root.type == bfd_link_hash_warning)
+                       hi = (struct elf_link_hash_entry *) hi->root.u.i.link;
+
                      h->root.type = bfd_link_hash_indirect;
                      h->root.u.i.link = (struct bfd_link_hash_entry *) hi;
                      if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)