Undo a bad change. Applying part of upstream git e5034e59 isn't a
good idea.
diff -urp binutils-aldy/bfd/elf64-ppc.c binutils-alan1/bfd/elf64-ppc.c
--- binutils-aldy/bfd/elf64-ppc.c 2014-07-31 12:21:34.755773236 +0930
+++ binutils-alan1/bfd/elf64-ppc.c 2014-07-31 13:59:20.083643016 +0930
@@ -97,7 +97,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_notice_as_needed ppc64_elf_notice_as_needed
+#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_keep ppc64_elf_gc_keep
@@ -4974,22 +4974,17 @@ ppc64_elf_process_dot_syms (bfd *ibfd, s
/* Undo hash table changes when an --as-needed input file is determined
not to be needed. */
-__attribute__((unused))
static bfd_boolean
-ppc64_elf_notice_as_needed (bfd *ibfd,
- struct bfd_link_info *info,
- enum notice_asneeded_action act)
+ppc64_elf_as_needed_cleanup (bfd *ibfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
- if (act == notice_not_needed)
- {
- struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ 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 _bfd_elf_notice_as_needed (ibfd, info, act);
+ htab->dot_syms = NULL;
+ return TRUE;
}
/* If --just-symbols against a final linked binary, then assume we need
diff -urp binutils-aldy/bfd/elf-bfd.h binutils-alan1/bfd/elf-bfd.h
--- binutils-aldy/bfd/elf-bfd.h 2014-07-31 10:57:17.934601544 +0930
+++ binutils-alan1/bfd/elf-bfd.h 2014-07-31 13:58:00.966838188 +0930
@@ -2158,8 +2158,6 @@ extern bfd_boolean _bfd_elf_default_relo
extern bfd_boolean _bfd_elf_relocs_compatible
(const bfd_target *, const bfd_target *);
-extern bfd_boolean _bfd_elf_notice_as_needed
-(bfd *, struct bfd_link_info *, enum notice_asneeded_action);
extern struct elf_link_hash_entry *_bfd_elf_archive_symbol_lookup
(bfd *, struct bfd_link_info *, const char *);
diff -urp binutils-aldy/bfd/elfxx-target.h binutils-alan1/bfd/elfxx-target.h
--- binutils-aldy/bfd/elfxx-target.h 2014-07-31 10:57:23.822364217 +0930
+++ binutils-alan1/bfd/elfxx-target.h 2014-07-31 13:57:41.651618265 +0930
@@ -424,9 +424,6 @@
#ifndef elf_backend_check_directives
#define elf_backend_check_directives 0
#endif
-#ifndef elf_backend_notice_as_needed
-#define elf_backend_notice_as_needed _bfd_elf_notice_as_needed
-#endif
#ifndef elf_backend_as_needed_cleanup
#define elf_backend_as_needed_cleanup 0
#endif