From 1e370bd243d55d65b5a6f5653ac932d0be6c9434 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 15 Oct 2001 09:45:48 +0000 Subject: [PATCH] * 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. --- bfd/ChangeLog | 10 ++++++++++ bfd/elf.c | 2 +- bfd/elf32-hppa.c | 2 +- bfd/elf32-i386.c | 2 +- bfd/elf32-mips.c | 2 +- bfd/elf64-ppc.c | 2 +- bfd/elfxx-ia64.c | 2 +- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cd8dfa7..8abfc90 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,4 +1,14 @@ 2001-10-15 Alan Modra + + * 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 H.J. Lu * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc diff --git a/bfd/elf.c b/bfd/elf.c index cd2d169..feffd7c 100644 --- 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. diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 6531575..1417023 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -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 diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index f5e6455..fe702b5 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -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 diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 09f7758..0bd473d 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -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; diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 1bbd253..59ae522 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -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 diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index e651b5f..5fa95b4 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -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 -- 2.7.4