* elflink.c (elf_gc_mark): Follow indirect and warning syms.
authorAlan Modra <amodra@gmail.com>
Fri, 30 Apr 2004 08:48:55 +0000 (08:48 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 30 Apr 2004 08:48:55 +0000 (08:48 +0000)
bfd/ChangeLog
bfd/elflink.c

index 72da8013b53962f410f489e8dc19ef5ae36bf5a9..1221ebd41ed547150579cc41c5c11b3aad4b2544 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-30  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.c (elf_gc_mark): Follow indirect and warning syms.
+
 2004-04-30  Hans-Peter Nilsson  <hp@axis.com>
 
        * configure.in: Update version to 2.15.91.
index 38a89fd6fe1158424955a625a45004c2c69ba245..a4adaf52f21989036a54760a62f732b220955098 100644 (file)
@@ -8173,6 +8173,9 @@ elf_gc_mark (struct bfd_link_info *info,
              || ELF_ST_BIND (isym[r_symndx].st_info) != STB_LOCAL)
            {
              h = sym_hashes[r_symndx - extsymoff];
+             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;
              rsec = (*gc_mark_hook) (sec, info, rel, h, NULL);
            }
          else