* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
authorAlan Modra <amodra@gmail.com>
Mon, 22 Mar 2004 02:28:17 +0000 (02:28 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 22 Mar 2004 02:28:17 +0000 (02:28 +0000)
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.

34 files changed:
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elf-m10200.c
bfd/elf-m10300.c
bfd/elf32-arm.h
bfd/elf32-avr.c
bfd/elf32-cris.c
bfd/elf32-d10v.c
bfd/elf32-fr30.c
bfd/elf32-h8300.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-i860.c
bfd/elf32-ip2k.c
bfd/elf32-iq2000.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68k.c
bfd/elf32-mcore.c
bfd/elf32-msp430.c
bfd/elf32-openrisc.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sparc.c
bfd/elf32-v850.c
bfd/elf32-vax.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfxx-ia64.c

index 65a2626e2d3dd45fbf157252dbeca7e01810c072..50e2f3d6499c64b4a1cc0cb6e1691d711f59d76f 100644 (file)
@@ -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
index a5e52abe31e2714b0a4b81fa0e447584e78dee29..cd51e3265bbaedd28257cc9f52f8ed9f93b00d95 100644 (file)
@@ -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_ */
index 92cea80dbaefc1cf3abf4fc47322fffebdd74ca5..52685253062e71e28b307565d6b5b050d014941c 100644 (file)
@@ -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,
index f628e760bd588ce8561763800e094ef5eb14b8b8..a1327944e6b5c714ec133a874ded7e4e360839f6 100644 (file)
@@ -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;
 
index f8c859f764ab80426a57799ecb7295208ddca520..2f6c22e276522cc7e80fc3dea26df7cb2bb17c94 100644 (file)
@@ -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)
            {
index 7649d456157a5dda2550dcbb1e1cc1172d909bb0..06e398b542d8256a52194e48b497665b7a03b66b 100644 (file)
@@ -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,
index e2a51f64181f058cf8d102628d0cc239bfa5bbe5..18f87f497bd47a0563732fbf78f3a64b6e8204bd 100644 (file)
@@ -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
index 6d3b02dea2186b6600952c441f0980a125eb79fa..4bdaffcd5789e488f462d7a36b72ce9a285b3453 100644 (file)
@@ -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)
index aaa90f2d3f22e4630ba10382362c6d83d13eeab9..80408fa6ff2256064150ba1b049a0c4371fe52ea 100644 (file)
@@ -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,
index c933f40d41551983945b4e7e70777eb3f13d6d63..69433913312a0d3cb3e4fdd6a74722c50b61ba1a 100644 (file)
@@ -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,
index cb184f5dd47b648f3a211983757d2671c9fc3653..63b98e568e3d323d56ee3fb5fd0c70ec63c11f64 100644 (file)
@@ -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
index 0a3d83fb5a8f0cb4aaae06e965a8f8c3c2087d6d..8f30bb2c23112d8acd2e1ed53036281e61707a79 100644 (file)
@@ -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)
index c545d8c50e695a55341c32eb8e76c88a482a7a1e..f156bc51e1ab81511a5870b1be5bac985ad4a70d 100644 (file)
@@ -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)
index 7606e0d8a155da4bf8024b8af0be5a85f56063c8..6493be6995915fba484e6cccf6d53006531e60d8 100644 (file)
@@ -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;
        }
index f85ffac8431b60ea37da9e4ab4a0e303b9a233f7..67be1755f1331b67d6d381cdcf2ddc5bc4b2bbbc 100644 (file)
@@ -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;
        }
index 24460efadc2727ebbf2a2a028792ed00aca68576..00b75df0a7a488fd0e51e5b7921dbcfa78de75fc 100644 (file)
@@ -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;
index 1c7fed92baadf9ffe45c2b145d8e59a0ecd1d40b..f1bdd1a8f1bcf621c9fa76b3c1b857b8140f459e 100644 (file)
@@ -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)
index 4d431f688dae6470cf788089dfb6ccd7287b8c76..fd13ea897c967b6d6383bedd2bbb015c157e1d29 100644 (file)
@@ -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)
index ad4779d38d52b61011caf59259c22ee5c6523245..dfe33bd246fbf4fbad78a1c2bc21fb3a6cf51284 100644 (file)
@@ -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,
index 7a4d5ece9d204cec15d89de29e4a41457e3ecc61..5513ad66b0ad81217580ac6f8f832a45ef02181b 100644 (file)
@@ -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,
index 6849da82b893e8d1ccc0b0cf1d958dd9d2e47f36..5798ecaf20f7a65626076fc2100163c42bc6bc4d 100644 (file)
@@ -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;
        }
index 53b3fe4db9488be8cda49373ec998bde0c90900d..bb88dff781f0c0a1ff36ae6965e29e1ae3a5860a 100644 (file)
@@ -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)
index 74b0782d1d19583af334d769b844f28cf829edff..0f8afe0cfa35dfca780f088c0defb6dae40601cf 100644 (file)
@@ -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)
index 0218ddcb57d5ccc59789860d2fd4e90a3814ccc0..747095213e735c1302887e44357491a45abf04a5 100644 (file)
@@ -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.  */
index e085e3509fc4c80af8e550aed6ed6f345e7ded67..d2d5905e3e38a97e9afee2cb2af12c839c89ee4f 100644 (file)
@@ -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)
index b3b40fb1e094db32237c0ca73dace4502f61c753..985a43a522690c5cc5a0af237d9ce84551cf8f4a 100644 (file)
@@ -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))
index 44450c52e5bbf4beb0eaa9ae925bac3f4509d3bb..782baba652ea749f7ce45d606d8e12bb82996a61 100644 (file)
@@ -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
index 8bd03c20fc3980f4e17b0f2b983aa0c906e8143f..22c12c0602a3331f7ab3453d632c37e8d9890084 100644 (file)
@@ -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;
index 3e769d3d8a65496a53811c4ca95765733ca2bc71..0e1da0650ecaf3837edc2b7d2f60fe57eadb2e01 100644 (file)
@@ -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,
index 304a635856d43f32f15be941e30666886eebee83..d8f0b5e4220285496c5726c731cae8ecc7118ec2 100644 (file)
@@ -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;
        }
index 8a919c454febd436a0884689fdf16403e1827b56..3bf26bc3af354bece672f7e537dfc7e4cb0cc63e 100644 (file)
@@ -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)
index 4224310267598ab0a637735b860bbcf7a16ca307..001f3a5a77be71fcc95898c92c304049cdea6968 100644 (file)
@@ -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
index a6886201d3cb6ed9f472a805218fb03d10ece0c8..528f7a84ebb16062d687b690abf8cf240c31fea7 100644 (file)
@@ -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.  */
index 9c65696790f5ab2d58f0384fc8bad9c010efee0d..47b4eae338b957ebd950276d009e619d786c78e5 100644 (file)
@@ -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;