aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-ia64.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-10-25 16:19:08 +0000
committerAlan Modra <amodra@gmail.com>2005-10-25 16:19:08 +0000
commitfcfa13d2b2b18f83382c2a0cb82c9c7d21be10cb (patch)
treeec64c0d7e60df6c1bd711a63b76fbe71bff79d69 /bfd/elfxx-ia64.c
parent50afb01e1a80ee200521e4e3990a80df7ed3526c (diff)
downloadfsf-binutils-gdb-fcfa13d2b2b18f83382c2a0cb82c9c7d21be10cb.zip
fsf-binutils-gdb-fcfa13d2b2b18f83382c2a0cb82c9c7d21be10cb.tar.gz
fsf-binutils-gdb-fcfa13d2b2b18f83382c2a0cb82c9c7d21be10cb.tar.bz2
PR ld/1540
* elf-bfd.h (elf_backend_copy_indirect_symbol): Replace pointer to elf_backend_data with pointer to bfd_link_info. (_bfd_elf_link_hash_copy_indirect): Likewise. * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Handle direct and indirect symbols both having dynamic link info. * elf32-arm.c (elf32_arm_copy_indirect_symbol): Likewise. * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise. * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise. * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Likewise. * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise. * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise. * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise. * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise. * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise. * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise. * elflink.c: Adjust all calls to bed->elf_backend_copy_indirect_symbol. * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Update prototype. * elfxx-sparc.h (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
Diffstat (limited to 'bfd/elfxx-ia64.c')
-rw-r--r--bfd/elfxx-ia64.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index dc2c2e15a..5dfdaaa 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -216,7 +216,7 @@ static struct bfd_hash_entry *elfNN_ia64_new_elf_hash_entry
PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
const char *string));
static void elfNN_ia64_hash_copy_indirect
- PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static void elfNN_ia64_hash_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
@@ -1798,8 +1798,8 @@ elfNN_ia64_new_elf_hash_entry (entry, table, string)
}
static void
-elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
- const struct elf_backend_data *bed ATTRIBUTE_UNUSED;
+elfNN_ia64_hash_copy_indirect (info, xdir, xind)
+ struct bfd_link_info *info;
struct elf_link_hash_entry *xdir, *xind;
{
struct elfNN_ia64_link_hash_entry *dir, *ind;
@@ -1821,29 +1821,34 @@ elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
/* Copy over the got and plt data. This would have been done
by check_relocs. */
- if (dir->info == NULL)
+ if (ind->info != NULL)
{
struct elfNN_ia64_dyn_sym_info *dyn_i;
+ struct elfNN_ia64_dyn_sym_info **pdyn;
- dir->info = dyn_i = ind->info;
+ pdyn = &dir->info;
+ while ((dyn_i = *pdyn) != NULL)
+ pdyn = &dyn_i->next;
+ *pdyn = dyn_i = ind->info;
ind->info = NULL;
/* Fix up the dyn_sym_info pointers to the global symbol. */
for (; dyn_i; dyn_i = dyn_i->next)
dyn_i->h = &dir->root;
}
- BFD_ASSERT (ind->info == NULL);
/* Copy over the dynindx. */
- if (dir->root.dynindx == -1)
+ if (ind->root.dynindx != -1)
{
+ if (dir->root.dynindx != -1)
+ _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+ dir->root.dynstr_index);
dir->root.dynindx = ind->root.dynindx;
dir->root.dynstr_index = ind->root.dynstr_index;
ind->root.dynindx = -1;
ind->root.dynstr_index = 0;
}
- BFD_ASSERT (ind->root.dynindx == -1);
}
static void