* elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using

elf_backend_copy_indirect_symbol so that backend has a chance to
	copy other necessary fields.
	* elf-bfd.h (struct elf_backend_data): Update description of
	elf_backend_copy_indirect_symbol.
	* elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
	copying flags if this is a weakdef.
	* elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
	(elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
	than bfd_link_hash_lookup.
	* elf32-i386 (elf_i386_adjust_dynamic_symbol): Don't do copy
	reloc processing for weakdefs.
	* elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
This commit is contained in:
Alan Modra
2001-10-03 08:33:18 +00:00
parent 7997c6eaf4
commit 0a991dfe0d
8 changed files with 40 additions and 9 deletions

View File

@@ -986,7 +986,7 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
}
/* Copy data from an indirect symbol to its direct symbol, hiding the
old indirect symbol. */
old indirect symbol. Also used for copying flags to a weakdef. */
void
_bfd_elf_link_hash_copy_indirect (dir, ind)
@@ -1004,6 +1004,9 @@ _bfd_elf_link_hash_copy_indirect (dir, ind)
| ELF_LINK_HASH_REF_REGULAR_NONWEAK
| ELF_LINK_NON_GOT_REF));
if (dir == ind->weakdef)
return;
/* Copy over the global and procedure linkage table refcount entries.
These may have been already set up by a check_relocs routine. */
tmp = dir->got.refcount;