aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-04-20 00:11:33 +0000
committerAlan Modra <amodra@gmail.com>2011-04-20 00:11:33 +0000
commit24f58f47de96a6c061fc6eeb37a699c03dde970a (patch)
tree6d218f4096841f46c906ecab5f7090df8723161e /bfd/xcofflink.c
parent43a8278ee9e14776343b7b3692650b130c301363 (diff)
downloadbinutils-24f58f47de96a6c061fc6eeb37a699c03dde970a.zip
binutils-24f58f47de96a6c061fc6eeb37a699c03dde970a.tar.gz
binutils-24f58f47de96a6c061fc6eeb37a699c03dde970a.tar.bz2
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.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r--bfd/xcofflink.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 7ff920a..47e094e 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -1,6 +1,6 @@
/* POWER/PowerPC XCOFF linker support.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -1996,11 +1996,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
handle them, and that would only be a warning,
not an error. */
if (! ((*info->callbacks->multiple_definition)
- (info, (*sym_hash)->root.root.string,
- NULL, NULL, (bfd_vma) 0,
- (*sym_hash)->root.u.def.section->owner,
- (*sym_hash)->root.u.def.section,
- (*sym_hash)->root.u.def.value)))
+ (info, &(*sym_hash)->root, NULL, NULL, (bfd_vma) 0)))
goto error_return;
/* Try not to give this error too many times. */
(*sym_hash)->flags &= ~XCOFF_MULTIPLY_DEFINED;
@@ -3119,9 +3115,7 @@ bfd_xcoff_import_symbol (bfd *output_bfd,
|| h->root.u.def.value != val))
{
if (! ((*info->callbacks->multiple_definition)
- (info, h->root.root.string, h->root.u.def.section->owner,
- h->root.u.def.section, h->root.u.def.value,
- output_bfd, bfd_abs_section_ptr, val)))
+ (info, &h->root, output_bfd, bfd_abs_section_ptr, val)))
return FALSE;
}