diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-12-23 09:57:38 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-12-23 09:57:38 +0000 |
commit | 8a6c653b19a19b08bf442a1bde8cccd9274d82c9 (patch) | |
tree | 9f4834e4a65d646c0119dff445271df307829a01 /bfd/elf64-ppc.c | |
parent | 583eafb7662ba0b2b35e051235eed7829ac57a99 (diff) | |
download | gdb-8a6c653b19a19b08bf442a1bde8cccd9274d82c9.tar.gz |
* elf-bfd.h (struct elf_backend_data): Add as_needed_cleanup hook.
* elfxx-target.h (elf_backend_as_needed_cleanup): Define.
(elfNN_bed): Add as_needed_cleanup hook.
* elflink.c (elf_link_add_object_symbols): Call it when reverting
hash table changes for unneeded --as-needed input.
* elf64-ppc64.c (elf_backend_as_needed_cleanup): Define.
(ppc64_elf_as_needed_cleanup): New function.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 6658b5b4b30..35f7cdf6348 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -88,6 +88,7 @@ static bfd_vma opd_entry_value #define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol #define elf_backend_add_symbol_hook ppc64_elf_add_symbol_hook #define elf_backend_check_directives ppc64_elf_check_directives +#define elf_backend_as_needed_cleanup ppc64_elf_as_needed_cleanup #define elf_backend_archive_symbol_lookup ppc64_elf_archive_symbol_lookup #define elf_backend_check_relocs ppc64_elf_check_relocs #define elf_backend_gc_mark_dynamic_ref ppc64_elf_gc_mark_dynamic_ref @@ -4247,6 +4248,17 @@ ppc64_elf_check_directives (bfd *ibfd, struct bfd_link_info *info) return TRUE; } +/* Undo hash table changes when an --as-needed input file is determined + not to be needed. */ + +static bfd_boolean +ppc64_elf_as_needed_cleanup (bfd *ibfd ATTRIBUTE_UNUSED, + struct bfd_link_info *info) +{ + ppc_hash_table (info)->dot_syms = NULL; + return TRUE; +} + static bfd_boolean update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, unsigned long r_symndx, bfd_vma r_addend, int tls_type) |