From 24f58f47de96a6c061fc6eeb37a699c03dde970a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 20 Apr 2011 00:11:33 +0000 Subject: PR ld/12365 include/ * bfdlink.h (struct bfd_link_callbacks): Modify multiple_definition and multiple_common parameters to pass in a bfd_link_hash_entry pointer rather than name,bfd etc. found in the hash entry. bfd/ * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls. * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call multiple_definition regardless of allow_multiple_definition. * simple.c (simple_dummy_multiple_definition): Update. * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition calls. ld/ * ldmain.c (multiple_definition): Take a bfd_link_hash_entry pointer arg rather than "name", "obfd", "osec", "oval". Add code removed from linker.c. Hack around xcofflink.c oddity in passing NULL nbfd. (multiple_common): Similarly. * plugin.c (orig_allow_multiple_defs): Delete. (plugin_call_all_symbols_read): Don't twiddle allow_multiple_definition. (plugin_multiple_definition): Update. --- bfd/elflink.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'bfd/elflink.c') diff --git a/bfd/elflink.c b/bfd/elflink.c index 22755038052..f0ad579876b 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1,6 +1,6 @@ /* ELF linking support for BFD. Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1361,8 +1361,7 @@ _bfd_elf_merge_symbol (bfd *abfd, symbols defined in dynamic objects. */ if (! ((*info->callbacks->multiple_common) - (info, h->root.root.string, oldbfd, bfd_link_hash_common, - h->size, abfd, bfd_link_hash_common, sym->st_size))) + (info, &h->root, abfd, bfd_link_hash_common, sym->st_size))) return FALSE; if (sym->st_size > h->size) @@ -1513,8 +1512,7 @@ _bfd_elf_merge_symbol (bfd *abfd, common symbol, but we don't know what to use for the section or the alignment. */ if (! ((*info->callbacks->multiple_common) - (info, h->root.root.string, oldbfd, bfd_link_hash_common, - h->size, abfd, bfd_link_hash_common, sym->st_size))) + (info, &h->root, abfd, bfd_link_hash_common, sym->st_size))) return FALSE; /* If the presumed common symbol in the dynamic object is -- cgit v1.2.1