summaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2008-02-15 03:35:53 +0000
committerAlan Modra <amodra@bigpond.net.au>2008-02-15 03:35:53 +0000
commitd7dde66c50543d891eb2dcdde9e439b9b033e799 (patch)
treea9305a7a80c31972a5ed5f54b5bb53d9c40b8ee2 /bfd/linker.c
parent63665287fc1495b903f61346158c7fd9bff11cc6 (diff)
downloadbinutils-redhat-d7dde66c50543d891eb2dcdde9e439b9b033e799.tar.gz
include/
* bfdlink.h (struct bfd_link_hash_table): Delete creator field. (struct bfd_link_info): Add output_bfd. bfd/ * elflink.c: Replace all accesses to hash->creator field with output_bfd->xvec. * cofflink.c: Likewise. * coff-h8300.c: Likewise. * ecoff.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-ppc.c: Likewise. * elf64-alpha.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sparc.c: Likewise. * elfxx-mips.c: Likewise. * i386linux.c: Likewise. * m68klinux.c: Likewise. * sparclinux.c: Likewise. * sunos.c: Likewise. * xcofflink.c: Likewise. * linker.c: Likewise. (_bfd_link_hash_table_init): Don't store creator. ld/ * ldmain.h (output_bfd): Delete. * ldmain.c (output_bfd): Delete. Replace all occurrences of output_bfd with link_info.output_bfd. * ldcref.c: Likewise. * ldctor.c: Likewise. * ldemul.c: Likewise. * ldexp.c: Likewise. * ldfile.c: Likewise. * ldlang.c: Likewise. * ldmisc.c: Likewise. * ldwrite.c: Likewise. * pe-dll.c: Likewise. * emultempl/aix.em: Likewise. * emultempl/alphaelf.em: Likewise. * emultempl/armcoff.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/elf-generic.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/irix.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/mmix-elfnmmo.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/scoreelf.em: Likewise. * emultempl/sh64elf.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/vxworks.em: Likewise. * emultempl/xtensaelf.em: Likewise. * emultempl/z80.em: Likewise. * ldlang.c (open_output): Don't return output, instead write link_info_output_bfd directly. * emultempl/alphaelf.em: Replace occurrences of link_info.hash->creator with link_info.output_bfd->xvec. * emultempl/hppaelf.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/spuelf.em: Likewise.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index fb293cca71..327426e3c5 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1,6 +1,6 @@
/* linker.c -- BFD linker routines
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007
+ 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
@@ -151,9 +151,9 @@ SUBSUBSECTION
Sometimes the <<_bfd_link_add_symbols>> function must store
some information in the hash table entry to be used by the
- <<_bfd_final_link>> function. In such a case the <<creator>>
- field of the hash table must be checked to make sure that the
- hash table was created by an object file of the same format.
+ <<_bfd_final_link>> function. In such a case the output bfd
+ xvec must be checked to make sure that the hash table was
+ created by an object file of the same format.
The <<_bfd_final_link>> routine must be prepared to handle a
hash entry without any extra information added by the
@@ -165,7 +165,7 @@ SUBSUBSECTION
initialization function.
See <<ecoff_link_add_externals>> for an example of how to
- check the <<creator>> field before saving information (in this
+ check the output bfd before saving information (in this
case, the ECOFF external symbol debugging information) in a
hash table entry.
@@ -471,13 +471,12 @@ _bfd_link_hash_newfunc (struct bfd_hash_entry *entry,
bfd_boolean
_bfd_link_hash_table_init
(struct bfd_link_hash_table *table,
- bfd *abfd,
+ bfd *abfd ATTRIBUTE_UNUSED,
struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *),
unsigned int entsize)
{
- table->creator = abfd->xvec;
table->undefs = NULL;
table->undefs_tail = NULL;
table->type = bfd_link_generic_hash_table;
@@ -1359,7 +1358,7 @@ generic_link_add_symbol_list (bfd *abfd,
hash table other than the generic hash table, so we only
do this if we are certain that the hash table is a
generic one. */
- if (info->hash->creator == abfd->xvec)
+ if (info->output_bfd->xvec == abfd->xvec)
{
if (h->sym == NULL
|| (! bfd_is_und_section (bfd_get_section (p))
@@ -2243,7 +2242,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd,
this routine will be called with a hash table
other than a generic hash table, so we double
check that. */
- if (info->hash->creator == input_bfd->xvec)
+ if (info->output_bfd->xvec == input_bfd->xvec)
{
if (h->sym != NULL)
*sym_ptr = sym = h->sym;