From 0a991dfe0d54a980dba9b2d031818d33474f84a0 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 3 Oct 2001 08:33:18 +0000 Subject: * 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. --- bfd/elf-bfd.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bfd/elf-bfd.h') diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 42f8f29..8ab13b7 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -648,8 +648,11 @@ struct elf_backend_data PARAMS ((bfd *, struct bfd_link_info *, PTR, boolean (*) (PTR, const char *, Elf_Internal_Sym *, asection *))); - /* Copy any information related to dynamic linking from a pre-existing - symbol IND to a newly created symbol DIR. */ + /* Copy any information related to dynamic linking from a pre-existing + symbol to a newly created symbol. Also called to copy flags and + other back-end info to a weakdef, in which case the symbol is not + newly created and plt/got refcounts and dynamic indices should not + be copied. */ void (*elf_backend_copy_indirect_symbol) PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); -- cgit v1.1