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 | |
parent | 43a8278ee9e14776343b7b3692650b130c301363 (diff) | |
download | fsf-binutils-gdb-24f58f47de96a6c061fc6eeb37a699c03dde970a.zip fsf-binutils-gdb-24f58f47de96a6c061fc6eeb37a699c03dde970a.tar.gz fsf-binutils-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')
-rw-r--r-- | include/ChangeLog | 13 | ||||
-rw-r--r-- | include/bfdlink.h | 24 |
2 files changed, 18 insertions, 19 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 7c18850..bf7128f 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,10 @@ +2011-04-20 Alan Modra <amodra@gmail.com> + + PR ld/12365 + * 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. + 2011-03-31 Tristan Gingold <gingold@adacore.com> * dwarf2.h (dwarf_line_number_hp_sfc_ops): New enum. @@ -64,19 +71,19 @@ * simple-object.h: New file. -2010-10-15 Dave Korn <dave.korn.cygwin@gmail.com> +2010-10-15 Dave Korn <dave.korn.cygwin@gmail.com> Sync LD plugin patch series (part 1/6) with src/include/. * plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member. -2010-10-14 Dave Korn <dave.korn.cygwin@gmail.com> +2010-10-14 Dave Korn <dave.korn.cygwin@gmail.com> Apply LD plugin patch series (part 6/6). * bfdlink.h (struct_bfd_link_callbacks): Document new argument to add_archive_element callback used to return a replacement bfd which is to be added to the hash table in place of the original element. -2010-10-14 Dave Korn <dave.korn.cygwin@gmail.com> +2010-10-14 Dave Korn <dave.korn.cygwin@gmail.com> Apply LD plugin patch series (part 1/6). * plugin-api.h (LDPT_GNU_LD_VERSION): New ld_plugin_tag enum member. 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., |