aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog14
-rw-r--r--bfd/elf-bfd.h103
-rw-r--r--bfd/elf-m10200.c9
-rw-r--r--bfd/elf-m10300.c15
-rw-r--r--bfd/elf32-arm.h8
-rw-r--r--bfd/elf32-avr.c10
-rw-r--r--bfd/elf32-cris.c7
-rw-r--r--bfd/elf32-d10v.c9
-rw-r--r--bfd/elf32-fr30.c9
-rw-r--r--bfd/elf32-h8300.c7
-rw-r--r--bfd/elf32-hppa.c10
-rw-r--r--bfd/elf32-i386.c9
-rw-r--r--bfd/elf32-i860.c9
-rw-r--r--bfd/elf32-ip2k.c7
-rw-r--r--bfd/elf32-iq2000.c9
-rw-r--r--bfd/elf32-m68hc1x.c9
-rw-r--r--bfd/elf32-m68k.c9
-rw-r--r--bfd/elf32-mcore.c9
-rw-r--r--bfd/elf32-msp430.c9
-rw-r--r--bfd/elf32-openrisc.c10
-rw-r--r--bfd/elf32-ppc.c8
-rw-r--r--bfd/elf32-s390.c10
-rw-r--r--bfd/elf32-sparc.c10
-rw-r--r--bfd/elf32-v850.c9
-rw-r--r--bfd/elf32-vax.c12
-rw-r--r--bfd/elf32-xstormy16.c9
-rw-r--r--bfd/elf32-xtensa.c10
-rw-r--r--bfd/elf64-alpha.c14
-rw-r--r--bfd/elf64-mmix.c9
-rw-r--r--bfd/elf64-ppc.c11
-rw-r--r--bfd/elf64-s390.c10
-rw-r--r--bfd/elf64-sparc.c8
-rw-r--r--bfd/elf64-x86-64.c10
-rw-r--r--bfd/elfxx-ia64.c13
34 files changed, 235 insertions, 189 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 65a2626..50e2f3d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,17 @@
+2004-03-22 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
+ and rel args. Group input and output args. Wrap to 80 columns.
+ * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
+ elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
+ elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
+ elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
+ elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
+ elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
+ elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
+ elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
+ RELOC_FOR_GLOBAL_SYMBOL invocation.
+
2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index a5e52ab..cd51e32 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1719,56 +1719,59 @@ extern bfd_boolean _sh_elf_set_mach_from_flags
/* This macro is to avoid lots of duplicated code in the body
of xxx_relocate_section() in the various elfxx-xxxx.c files. */
-#define RELOC_FOR_GLOBAL_SYMBOL(h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned) \
- do \
- { \
- /* It seems this can happen with erroneous or unsupported \
- input (mixing a.out and elf in an archive, for example.) */ \
- if (sym_hashes == NULL) \
- return FALSE; \
- \
- h = sym_hashes[r_symndx - symtab_hdr->sh_info]; \
- \
- while (h->root.type == bfd_link_hash_indirect \
- || h->root.type == bfd_link_hash_warning) \
- h = (struct elf_link_hash_entry *) h->root.u.i.link; \
- \
- warned = FALSE; \
- unresolved_reloc = FALSE; \
- relocation = 0; \
- if (h->root.type == bfd_link_hash_defined \
- || h->root.type == bfd_link_hash_defweak) \
- { \
- sec = h->root.u.def.section; \
- if (sec == NULL \
- || sec->output_section == NULL) \
- /* Set a flag that will be cleared later if we find a \
- relocation value for this symbol. output_section \
- is typically NULL for symbols satisfied by a shared \
- library. */ \
- unresolved_reloc = TRUE; \
- else \
- relocation = (h->root.u.def.value \
- + sec->output_section->vma \
- + sec->output_offset); \
- } \
- else if (h->root.type == bfd_link_hash_undefweak) \
- ; \
- else if (info->unresolved_syms_in_objects == RM_IGNORE \
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \
- ; \
- else \
- { \
- if (! info->callbacks->undefined_symbol \
- (info, h->root.root.string, input_bfd, \
- input_section, rel->r_offset, \
- (info->unresolved_syms_in_objects == RM_GENERATE_ERROR \
- || ELF_ST_VISIBILITY (h->other)) \
- )) \
- return FALSE; \
- warned = TRUE; \
- } \
- } \
+#define RELOC_FOR_GLOBAL_SYMBOL(info, input_bfd, input_section, rel, \
+ r_symndx, symtab_hdr, sym_hashes, \
+ h, sec, relocation, \
+ unresolved_reloc, warned) \
+ do \
+ { \
+ /* It seems this can happen with erroneous or unsupported \
+ input (mixing a.out and elf in an archive, for example.) */ \
+ if (sym_hashes == NULL) \
+ return FALSE; \
+ \
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; \
+ \
+ while (h->root.type == bfd_link_hash_indirect \
+ || h->root.type == bfd_link_hash_warning) \
+ h = (struct elf_link_hash_entry *) h->root.u.i.link; \
+ \
+ warned = FALSE; \
+ unresolved_reloc = FALSE; \
+ relocation = 0; \
+ if (h->root.type == bfd_link_hash_defined \
+ || h->root.type == bfd_link_hash_defweak) \
+ { \
+ sec = h->root.u.def.section; \
+ if (sec == NULL \
+ || sec->output_section == NULL) \
+ /* Set a flag that will be cleared later if we find a \
+ relocation value for this symbol. output_section \
+ is typically NULL for symbols satisfied by a shared \
+ library. */ \
+ unresolved_reloc = TRUE; \
+ else \
+ relocation = (h->root.u.def.value \
+ + sec->output_section->vma \
+ + sec->output_offset); \
+ } \
+ else if (h->root.type == bfd_link_hash_undefweak) \
+ ; \
+ else if (info->unresolved_syms_in_objects == RM_IGNORE \
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \
+ ; \
+ else \
+ { \
+ if (! info->callbacks->undefined_symbol \
+ (info, h->root.root.string, input_bfd, \
+ input_section, rel->r_offset, \
+ (info->unresolved_syms_in_objects == RM_GENERATE_ERROR \
+ || ELF_ST_VISIBILITY (h->other)) \
+ )) \
+ return FALSE; \
+ warned = TRUE; \
+ } \
+ } \
while (0)
#endif /* _LIBELF_H_ */
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index 92cea80..5268525 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -1,5 +1,5 @@
/* Matsushita 10200 specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -379,9 +379,10 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
r = mn10200_elf_final_link_relocate (howto, input_bfd, output_bfd,
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index f628e76..a132794 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -1,5 +1,5 @@
/* Matsushita 10300 specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1537,15 +1537,14 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
asection **local_sections;
{
Elf_Internal_Shdr *symtab_hdr;
- struct elf32_mn10300_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel, *relend;
if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
- sym_hashes = (struct elf32_mn10300_link_hash_entry **)
- (elf_sym_hashes (input_bfd));
+ sym_hashes = elf_sym_hashes (input_bfd);
rel = relocs;
relend = relocs + input_section->reloc_count;
@@ -1584,10 +1583,10 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean warned;
struct elf_link_hash_entry *hh;
- RELOC_FOR_GLOBAL_SYMBOL (hh, (struct elf_link_hash_entry *) sym_hashes,
- r_symndx, symtab_hdr, relocation,
- sec, unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ hh, sec, relocation,
+ unresolved_reloc, warned);
h = (struct elf32_mn10300_link_hash_entry *) hh;
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index f8c859f..2f6c22e 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -2125,10 +2125,10 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean warned;
bfd_boolean unresolved_reloc;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation,
- sec, unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
if (unresolved_reloc || relocation != 0)
{
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 7649d45..06e398b 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1,5 +1,6 @@
/* AVR-specific support for 32-bit ELF
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
This file is part of BFD, the Binary File Descriptor library.
@@ -760,9 +761,10 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
r = avr_final_link_relocate (howto, input_bfd, input_section,
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index e2a51f6..18f87f4 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1,5 +1,5 @@
/* CRIS-specific support for 32-bit ELF.
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Axis Communications AB.
Written by Hans-Peter Nilsson, based on elf32-fr30.c
PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c.
@@ -859,7 +859,10 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean warned;
bfd_boolean unresolved_reloc;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
if (unresolved_reloc
/* Perhaps we should detect the cases that
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index 6d3b02d..4bdaffc 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -1,5 +1,5 @@
/* D10V-specific support for 32-bit ELF
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
@@ -519,9 +519,10 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
if (h != NULL)
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index aaa90f2..80408fa 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -1,5 +1,5 @@
/* FR30-specific support for 32-bit ELF.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -568,9 +568,10 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
r = fr30_final_link_relocate (howto, input_bfd, input_section,
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index c933f40..6943391 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -441,9 +441,10 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
r = elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd,
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index cb184f5..63b98e5 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -1,6 +1,6 @@
/* BFD back-end for HP PA-RISC ELF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
- 2002, 2003 Free Software Foundation, Inc.
+ 2002, 2003, 2004 Free Software Foundation, Inc.
Original code by
Center for Software Science
@@ -3432,10 +3432,12 @@ elf32_hppa_relocate_section (bfd *output_bfd,
{
struct elf_link_hash_entry *hh;
bfd_boolean unresolved_reloc;
+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
- RELOC_FOR_GLOBAL_SYMBOL (hh, elf_sym_hashes (input_bfd), r_symndx, symtab_hdr,
- relocation, sym_sec, unresolved_reloc, info,
- warned_undef);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ hh, sym_sec, relocation,
+ unresolved_reloc, warned_undef);
if (relocation == 0
&& hh->root.type != bfd_link_hash_defined
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 0a3d83f..8f30bb2 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1,6 +1,6 @@
/* Intel 80386/80486-specific support for 32-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -2179,7 +2179,10 @@ elf_i386_relocate_section (bfd *output_bfd,
{
bfd_boolean warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
switch (r_type)
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index c545d8c..f156bc5 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -1,5 +1,5 @@
/* Intel i860 specific support for 32-bit ELF.
- Copyright 1993, 1995, 1999, 2000, 2001, 2002, 2003
+ Copyright 1993, 1995, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Full i860 support contributed by Jason Eckhardt <jle@cygnus.com>.
@@ -1114,9 +1114,10 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
switch (r_type)
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 7606e0d..6493be6 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1,5 +1,5 @@
/* Ubicom IP2xxx specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1535,7 +1535,10 @@ ip2k_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean warned;
bfd_boolean unresolved_reloc;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
name = h->root.root.string;
}
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index f85ffac..67be175 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -1,5 +1,5 @@
/* IQ2000-specific support for 32-bit ELF.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -621,9 +621,10 @@ iq2000_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean unresolved_reloc;
bfd_boolean warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation,
- sec, unresolved_reloc, info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
name = h->root.root.string;
}
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 24460ef..00b75df 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -1,5 +1,6 @@
/* Motorola 68HC11/HC12-specific support for 32-bit ELF
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
This file is part of BFD, the Binary File Descriptor library.
@@ -951,9 +952,9 @@ m68hc11_get_relocation_value (bfd *input_bfd, struct bfd_link_info *info,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- *relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, *relocation, unresolved_reloc, warned);
*is_far = (h && (h->other & STO_M68HC12_FAR));
stub_name = h->root.root.string;
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 1c7fed9..f1bdd1a 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1,6 +1,6 @@
/* Motorola 68k series support for 32-bit ELF
- Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1410,7 +1410,10 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
switch (r_type)
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 4d431f6..fd13ea8 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -1,5 +1,5 @@
/* Motorola MCore specific support for 32-bit ELF
- Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003
+ Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -474,9 +474,10 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
switch (r_type)
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index ad4779d..dfe33bd 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -1,5 +1,5 @@
/* MSP430-specific support for 32-bit ELF
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
This file is part of BFD, the Binary File Descriptor library.
@@ -459,9 +459,10 @@ elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
r = msp430_final_link_relocate (howto, input_bfd, input_section,
diff --git a/bfd/elf32-openrisc.c b/bfd/elf32-openrisc.c
index 7a4d5ec..5513ad6 100644
--- a/bfd/elf32-openrisc.c
+++ b/bfd/elf32-openrisc.c
@@ -1,5 +1,5 @@
/* OpenRISC-specific support for 32-bit ELF.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Johan Rydberg, jrydberg@opencores.org
This file is part of BFD, the Binary File Descriptor library.
@@ -385,10 +385,10 @@ openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
-
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
r = openrisc_final_link_relocate (howto, input_bfd, input_section,
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 6849da8..5798eca 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -4701,10 +4701,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
else
{
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
sym_name = h->root.root.string;
}
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 53b3fe4..bb88dff 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -1,5 +1,5 @@
/* IBM S/390-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Carl B. Pedersen and Martin Schwidefsky.
This file is part of BFD, the Binary File Descriptor library.
@@ -2322,10 +2322,10 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean warned ATTRIBUTE_UNUSED;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
switch (r_type)
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 74b0782..0f8afe0 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1,6 +1,6 @@
/* SPARC-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -2215,10 +2215,10 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean warned ATTRIBUTE_UNUSED;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
switch (r_type)
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 0218ddc..7470952 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1,5 +1,5 @@
/* V850-specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1698,9 +1698,10 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
/* FIXME: We should use the addend, but the COFF relocations don't. */
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index e085e35..d2d5905 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1,6 +1,6 @@
/* VAX series support for 32-bit ELF
- Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
Contributed by Matt Thomas <matt@3am-software.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -1489,10 +1489,10 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean unresolved_reloc;
bfd_boolean warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index b3b40fb..985a43a 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -1,5 +1,5 @@
/* XSTORMY16-specific support for 32-bit ELF.
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -855,9 +855,10 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc, warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
switch (ELF32_R_TYPE (rel->r_info))
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 44450c5..782baba 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -1,5 +1,5 @@
/* Xtensa-specific support for 32-bit ELF.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1993,10 +1993,10 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
}
else
{
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
if (relocation == 0
&& !unresolved_reloc
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 8bd03c2..22c12c0 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1,5 +1,5 @@
/* Alpha specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -4399,12 +4399,12 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean warned;
bfd_boolean unresolved_reloc;
struct elf_link_hash_entry *hh;
-
- RELOC_FOR_GLOBAL_SYMBOL (hh,
- (struct elf_link_hash_entry *) alpha_elf_sym_hashes (input_bfd),
- r_symndx, symtab_hdr, value,
- sec, unresolved_reloc, info,
- warned);
+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ hh, sec, value,
+ unresolved_reloc, warned);
if (warned)
continue;
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 3e769d3..0e1da06 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -1,5 +1,5 @@
/* MMIX-specific support for 64-bit ELF.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -1482,9 +1482,10 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
- relocation, sec, unresolved_reloc,
- info, undefined_signalled);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, undefined_signalled);
}
r = mmix_final_link_relocate (howto, input_section,
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 304a635..d8f0b5e 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -1,5 +1,6 @@
/* PowerPC64-specific support for 64-bit ELF.
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Written by Linus Nordberg, Swox AB <info@swox.com>,
based on elf32-ppc.c by Ian Lance Taylor.
Largely rewritten by Alan Modra <amodra@bigpond.net.au>
@@ -7480,10 +7481,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
else
{
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
sym_name = h->root.root.string;
sym_type = h->type;
}
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 8a919c4..3bf26bc 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -1,5 +1,5 @@
/* IBM S/390-specific support for 64-bit ELF
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -2292,10 +2292,10 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean warned ATTRIBUTE_UNUSED;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
switch (r_type)
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 4224310..001f3a5 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -2079,10 +2079,10 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
if (warned)
{
/* To avoid generating warning messages about truncated
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index a688620..528f7a8 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1,5 +1,5 @@
/* X86-64 specific support for 64-bit ELF
- Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Jan Hubicka <jh@suse.cz>.
This file is part of BFD, the Binary File Descriptor library.
@@ -1820,10 +1820,10 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
bfd_boolean warned;
- RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
- symtab_hdr, relocation, sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
/* When generating a shared object, the relocations handled here are
copied into the output file to be resolved at run time. */
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 9c65696..47b4eae 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -1,5 +1,6 @@
/* IA-64 support for 64-bit ELF
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -3974,12 +3975,12 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
bfd_boolean unresolved_reloc;
bfd_boolean warned;
+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
- RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd),
- r_symndx,
- symtab_hdr, value, sym_sec,
- unresolved_reloc, info,
- warned);
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sym_sec, value,
+ unresolved_reloc, warned);
if (h->root.type == bfd_link_hash_undefweak)
undef_weak_ref = TRUE;