From 35ed3f940bd08e98211807604672cccbf2741d8f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sun, 24 Apr 2011 10:02:14 +0000 Subject: PR ld/12365 PR ld/12696 include/ * bfdlink.h (ENUM_BITFIELD): Define. (struct bfd_link_hash_entry): Make "type" a bitfield. Add "non_ir_ref". (struct bfd_link_callbacks ): Pass bfd_link_hash_entry pointer rather than "name". bfd/ * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call. * linker.c (_bfd_link_hash_newfunc): Clear bitfields. (_bfd_generic_link_add_one_symbol): Update "notice" call. * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when it is a redef of an IR symbol in a real BFD. ld/ * ldmain.c (notice): Delete "name" param, add "h". * plugin.c (plugin_notice): Likewise. Set non_ir_ref. Handle redefinitions of IR symbols in real BFDs. (plugin_multiple_definition, plugin_multiple_common): Delete. (non_ironly_hash, init_non_ironly_hash): Delete. (is_visible_from_outside): Traverse entry_symbol chain. (get_symbols): Use non_ir_ref flag rather than hash lookup. --- ld/ldmain.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ld/ldmain.c') diff --git a/ld/ldmain.c b/ld/ldmain.c index 0de7890..bfa6066 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -150,7 +150,8 @@ static bfd_boolean reloc_dangerous static bfd_boolean unattached_reloc (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma); static bfd_boolean notice - (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma); + (struct bfd_link_info *, struct bfd_link_hash_entry *, + bfd *, asection *, bfd_vma); static struct bfd_link_callbacks link_callbacks = { @@ -1479,18 +1480,21 @@ unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED, static bfd_boolean notice (struct bfd_link_info *info, - const char *name, + struct bfd_link_hash_entry *h, bfd *abfd, asection *section, bfd_vma value) { - if (name == NULL) + const char *name; + + if (h == NULL) { if (command_line.cref || nocrossref_list != NULL) return handle_asneeded_cref (abfd, (enum notice_asneeded_action) value); return TRUE; } + name = h->root.string; if (info->notice_hash != NULL && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL) { -- cgit v1.1