diff options
author | Alan Modra <amodra@gmail.com> | 2011-04-20 00:11:33 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-04-20 00:11:33 +0000 |
commit | 24f58f47de96a6c061fc6eeb37a699c03dde970a (patch) | |
tree | 6d218f4096841f46c906ecab5f7090df8723161e /include/bfdlink.h | |
parent | 43a8278ee9e14776343b7b3692650b130c301363 (diff) | |
download | gdb-24f58f47de96a6c061fc6eeb37a699c03dde970a.zip gdb-24f58f47de96a6c061fc6eeb37a699c03dde970a.tar.gz gdb-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 'include/bfdlink.h')
-rw-r--r-- | include/bfdlink.h | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/include/bfdlink.h b/include/bfdlink.h index 0d6e9f8..7cfaea0 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -1,6 +1,7 @@ /* bfdlink.h -- header file for BFD link routines Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + Free Software Foundation, Inc. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -487,29 +488,20 @@ struct bfd_link_callbacks bfd_boolean (*add_archive_element) (struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd); /* A function which is called when a symbol is found with multiple - definitions. NAME is the symbol which is defined multiple times. - OBFD is the old BFD, OSEC is the old section, OVAL is the old - value, NBFD is the new BFD, NSEC is the new section, and NVAL is - the new value. OBFD may be NULL. OSEC and NSEC may be - bfd_com_section or bfd_ind_section. */ + definitions. H is the symbol which is defined multiple times. + NBFD is the new BFD, NSEC is the new section, and NVAL is the new + value. NSEC may be bfd_com_section or bfd_ind_section. */ bfd_boolean (*multiple_definition) - (struct bfd_link_info *, const char *name, - bfd *obfd, asection *osec, bfd_vma oval, + (struct bfd_link_info *, struct bfd_link_hash_entry *h, bfd *nbfd, asection *nsec, bfd_vma nval); /* A function which is called when a common symbol is defined - multiple times. NAME is the symbol appearing multiple times. - OBFD is the BFD of the existing symbol; it may be NULL if this is - not known. OTYPE is the type of the existing symbol, which may - be bfd_link_hash_defined, bfd_link_hash_defweak, - bfd_link_hash_common, or bfd_link_hash_indirect. If OTYPE is - bfd_link_hash_common, OSIZE is the size of the existing symbol. + multiple times. H is the symbol appearing multiple times. NBFD is the BFD of the new symbol. NTYPE is the type of the new symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE is the size of the new symbol. */ bfd_boolean (*multiple_common) - (struct bfd_link_info *, const char *name, - bfd *obfd, enum bfd_link_hash_type otype, bfd_vma osize, + (struct bfd_link_info *, struct bfd_link_hash_entry *h, bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize); /* A function which is called to add a symbol to a set. ENTRY is the link hash table entry for the set itself (e.g., |