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.
This commit is contained in:
Alan Modra
2005-10-25 16:19:08 +00:00
parent 50afb01e1a
commit fcfa13d2b2
20 changed files with 319 additions and 345 deletions

View File

@ -1004,7 +1004,7 @@ elf32_hppa_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
elf32_hppa_copy_indirect_symbol (const struct elf_backend_data *bed,
elf32_hppa_copy_indirect_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *eh_dir,
struct elf_link_hash_entry *eh_ind)
{
@ -1020,16 +1020,15 @@ elf32_hppa_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf32_hppa_dyn_reloc_entry **hdh_pp;
struct elf32_hppa_dyn_reloc_entry *hdh_p;
if (eh_ind->root.type == bfd_link_hash_indirect)
abort ();
/* Add reloc counts against the weak sym to the strong sym
/* Add reloc counts against the indirect sym to the direct sym
list. Merge any entries against the same section. */
for (hdh_pp = &hh_ind->dyn_relocs; (hdh_p = *hdh_pp) != NULL; )
{
struct elf32_hppa_dyn_reloc_entry *hdh_q;
for (hdh_q = hh_dir->dyn_relocs; hdh_q != NULL; hdh_q = hdh_q->hdh_next)
for (hdh_q = hh_dir->dyn_relocs;
hdh_q != NULL;
hdh_q = hdh_q->hdh_next)
if (hdh_q->sec == hdh_p->sec)
{
#if RELATIVE_DYNRELOCS
@ -1062,7 +1061,7 @@ elf32_hppa_copy_indirect_symbol (const struct elf_backend_data *bed,
eh_dir->needs_plt |= eh_ind->needs_plt;
}
else
_bfd_elf_link_hash_copy_indirect (bed, eh_dir, eh_ind);
_bfd_elf_link_hash_copy_indirect (info, eh_dir, eh_ind);
}
/* Look through the relocs for a section during the first phase, and