summaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-02-01 01:11:22 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-02-01 01:11:22 +0000
commit6b89c4f74677952c593a3cf2a9690028f2466e0d (patch)
tree4161974df3c7c6e3ea6205ed3f167177660c9bca /bfd/elf64-ppc.c
parent6a61b272de056ec7453a347f35c443c773bf81d7 (diff)
downloadgdb-6b89c4f74677952c593a3cf2a9690028f2466e0d.tar.gz
include/
* bfdlink.h (bfd_link_repair_undef_list): Declare. bfd/ * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup.. * linker.c (bfd_link_repair_undef_list): ..to new function, but don't remove anything but new and undefweak. * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any existing _DYNAMIC. (_bfd_elf_create_dynamic_sections): Formatting. (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list. (_bfd_elf_merge_symbol): Don't handle as-needed syms here. (struct elf_smash_data): New. (elf_smash_syms): New function. (elf_link_add_object_symbols): Call elf_smash_syms. Don't add unneeded dynamic objects to loaded list. (elf_link_output_extsym): Don't handle as-needed here. Strip bfd_link_hash_new symbols. * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't delref when dynindx is already -1. * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new symbols. * elfxx-mips.c (mips_elf_output_extsym): Likewise. ld/ * ld.texinfo: Clarify --as-needed operation.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 2f30dd53d5f..c75c34a7136 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -4066,34 +4066,7 @@ ppc64_elf_check_directives (bfd *abfd ATTRIBUTE_UNUSED,
undef_weak. */
if (htab->twiddled_syms)
{
- struct bfd_link_hash_entry **pun;
-
- pun = &htab->elf.root.undefs;
- while (*pun != NULL)
- {
- struct bfd_link_hash_entry *h = *pun;
-
- if (h->type != bfd_link_hash_undefined
- && h->type != bfd_link_hash_common)
- {
- *pun = h->u.undef.next;
- h->u.undef.next = NULL;
- if (h == htab->elf.root.undefs_tail)
- {
- if (pun == &htab->elf.root.undefs)
- htab->elf.root.undefs_tail = NULL;
- else
- /* pun points at an u.undef.next field. Go back to
- the start of the link_hash_entry. */
- htab->elf.root.undefs_tail = (struct bfd_link_hash_entry *)
- ((char *) pun - ((char *) &h->u.undef.next - (char *) h));
- break;
- }
- }
- else
- pun = &h->u.undef.next;
- }
-
+ bfd_link_repair_undef_list (&htab->elf.root);
htab->twiddled_syms = 0;
}
return TRUE;