aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-08-27 01:06:43 +0000
committerAlan Modra <amodra@gmail.com>2013-08-27 01:06:43 +0000
commite5034e59e04c90d3a0b6c78af0cbfd3f73eb7809 (patch)
treeb251a82e4ee092ebf1bf38a0cf2eb2a28ae98fe4 /bfd/elf64-ppc.c
parentce4ea2bb179312d14090f190dd0d974a65d64536 (diff)
downloadgdb-e5034e59e04c90d3a0b6c78af0cbfd3f73eb7809.zip
gdb-e5034e59e04c90d3a0b6c78af0cbfd3f73eb7809.tar.gz
gdb-e5034e59e04c90d3a0b6c78af0cbfd3f73eb7809.tar.bz2
* elf-bfd.h (struct elf_backend_data): Remove as_needed_cleanup.
Add notice_as_needed. * elf64-ppc.c (elf_backend_as_needed_cleanup): Don't define. (elf_backend_notice_as_needed): Define. (ppc64_elf_as_needed_cleanup): Rename and adjust.. (ppc64_elf_notice_as_needed): ..to this. * elflink.c (_bfd_elf_notice_as_needed): New function, extracted.. (elf_link_add_object_symbols): ..from here. * elfxx-target.h (elf_backend_as_needed_cleanup): Don't define. (elf_backend_notice_as_needed): Define.. (elfNN_bed): ..and use here.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 349f9b3..3df01f6 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -96,7 +96,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_process_dot_syms
-#define elf_backend_as_needed_cleanup ppc64_elf_as_needed_cleanup
+#define elf_backend_notice_as_needed ppc64_elf_notice_as_needed
#define elf_backend_archive_symbol_lookup ppc64_elf_archive_symbol_lookup
#define elf_backend_check_relocs ppc64_elf_check_relocs
#define elf_backend_gc_keep ppc64_elf_gc_keep
@@ -4806,16 +4806,20 @@ ppc64_elf_process_dot_syms (bfd *ibfd, struct bfd_link_info *info)
not to be needed. */
static bfd_boolean
-ppc64_elf_as_needed_cleanup (bfd *ibfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info)
+ppc64_elf_notice_as_needed (bfd *ibfd,
+ struct bfd_link_info *info,
+ enum notice_asneeded_action act)
{
- struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ if (act == notice_not_needed)
+ {
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
- if (htab == NULL)
- return FALSE;
+ if (htab == NULL)
+ return FALSE;
- htab->dot_syms = NULL;
- return TRUE;
+ htab->dot_syms = NULL;
+ }
+ return _bfd_elf_notice_as_needed (ibfd, info, act);
}
/* If --just-symbols against a final linked binary, then assume we need