* elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
authorAlan Modra <amodra@gmail.com>
Mon, 15 Oct 2001 09:45:48 +0000 (09:45 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 15 Oct 2001 09:45:48 +0000 (09:45 +0000)
rather than ind->weakdef.
* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
* elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
* elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
* elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.

bfd/ChangeLog
bfd/elf.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-mips.c
bfd/elf64-ppc.c
bfd/elfxx-ia64.c

index cd8dfa7..8abfc90 100644 (file)
@@ -1,4 +1,14 @@
 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
+       rather than ind->weakdef.
+       * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
+       * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
+       * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
+       * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+       * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
+
+2001-10-15  Alan Modra  <amodra@bigpond.net.au>
            H.J. Lu  <hjl@gnu.org>
 
        * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
index cd2d169..feffd7c 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1193,7 +1193,7 @@ _bfd_elf_link_hash_copy_indirect (dir, ind)
        | ELF_LINK_HASH_REF_REGULAR_NONWEAK
        | ELF_LINK_NON_GOT_REF));
 
-  if (dir == ind->weakdef)
+  if (ind->root.type != bfd_link_hash_indirect)
     return;
 
   /* Copy over the global and procedure linkage table refcount entries.
index 6531575..1417023 100644 (file)
@@ -1149,7 +1149,7 @@ elf32_hppa_copy_indirect_symbol (dir, ind)
          struct elf32_hppa_dyn_reloc_entry **pp;
          struct elf32_hppa_dyn_reloc_entry *p;
 
-         if (dir != ind->weakdef)
+         if (ind->root.type == bfd_link_hash_indirect)
            abort ();
 
          /* Add reloc counts against the weak sym to the strong sym
index f5e6455..fe702b5 100644 (file)
@@ -644,7 +644,7 @@ elf_i386_copy_indirect_symbol (dir, ind)
          struct elf_i386_dyn_relocs **pp;
          struct elf_i386_dyn_relocs *p;
 
-         if (dir != ind->weakdef)
+         if (ind->root.type == bfd_link_hash_indirect)
            abort ();
 
          /* Add reloc counts against the weak sym to the strong sym
index 09f7758..0bd473d 100644 (file)
@@ -8085,7 +8085,7 @@ _bfd_mips_elf_copy_indirect_symbol (dir, ind)
 
   _bfd_elf_link_hash_copy_indirect (dir, ind);
 
-  if (dir == ind->weakdef)
+  if (ind->root.type != bfd_link_hash_indirect)
     return;
 
   dirmips = (struct mips_elf_link_hash_entry *) dir;
index 1bbd253..59ae522 100644 (file)
@@ -1801,7 +1801,7 @@ ppc64_elf_copy_indirect_symbol (dir, ind)
          struct ppc_dyn_relocs **pp;
          struct ppc_dyn_relocs *p;
 
-         if (dir != ind->weakdef)
+         if (ind->root.type == bfd_link_hash_indirect)
            abort ();
 
          /* Add reloc counts against the weak sym to the strong sym
index e651b5f..5fa95b4 100644 (file)
@@ -1524,7 +1524,7 @@ elfNN_ia64_hash_copy_indirect (xdir, xind)
         | ELF_LINK_HASH_REF_REGULAR
         | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
 
-  if (xdir == xind->weakdef)
+  if (ind->root.root.type != bfd_link_hash_indirect)
     return;
 
   /* Copy over the got and plt data.  This would have been done