bfd/
[deliverable/binutils-gdb.git] / bfd / elf32-m68hc1x.c
index 190d257f7f74af4854e99dc9b117e1ca8235aadd..fb5e6abc7b3ea42689635427e8a6e47e065a3846 100644 (file)
@@ -1,5 +1,5 @@
 /* Motorola 68HC11/HC12-specific support for 32-bit ELF
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
 
@@ -17,7 +17,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.  */
 
 #include "bfd.h"
 #include "sysdep.h"
@@ -158,9 +158,8 @@ m68hc12_add_stub (const char *stub_name, asection *section,
                                          TRUE, FALSE);
   if (stub_entry == NULL)
     {
-      (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
-                            bfd_archive_filename (section->owner),
-                            stub_name);
+      (*_bfd_error_handler) (_("%B: cannot create stub entry %s"),
+                            section->owner, stub_name);
       return NULL;
     }
 
@@ -266,7 +265,7 @@ elf32_m68hc11_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
 
   /* We can't use output_bfd->section_count here to find the top output
      section index as some sections may have been removed, and
-     _bfd_strip_section_from_output doesn't renumber the indices.  */
+     strip_excluded_output_sections doesn't renumber the indices.  */
   for (section = output_bfd->sections, top_index = 0;
        section != NULL;
        section = section->next)
@@ -1001,7 +1000,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
   Elf_Internal_Rela *rel, *relend;
-  const char *name;
+  const char *name = NULL;
   struct m68hc11_page_info *pinfo;
   const struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd);
 
@@ -1022,13 +1021,13 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
       unsigned long r_symndx;
       Elf_Internal_Sym *sym;
       asection *sec;
-      bfd_vma relocation;
+      bfd_vma relocation = 0;
       bfd_reloc_status_type r = bfd_reloc_undefined;
       bfd_vma phys_page;
       bfd_vma phys_addr;
       bfd_vma insn_addr;
       bfd_vma insn_page;
-      bfd_boolean is_far;
+      bfd_boolean is_far = FALSE;
 
       r_symndx = ELF32_R_SYM (rel->r_info);
       r_type = ELF32_R_TYPE (rel->r_info);
@@ -1174,7 +1173,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
            {
            case bfd_reloc_overflow:
              if (!((*info->callbacks->reloc_overflow)
-                   (info, name, howto->name, (bfd_vma) 0,
+                   (info, NULL, name, howto->name, (bfd_vma) 0,
                     input_bfd, input_section, rel->r_offset)))
                return FALSE;
              break;
@@ -1274,17 +1273,15 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
   if ((new_flags & E_M68HC11_I32) != (old_flags & E_M68HC11_I32))
     {
       (*_bfd_error_handler)
-       (_("%s: linking files compiled for 16-bit integers (-mshort) "
-           "and others for 32-bit integers"),
-        bfd_archive_filename (ibfd));
+       (_("%B: linking files compiled for 16-bit integers (-mshort) "
+           "and others for 32-bit integers"), ibfd);
       ok = FALSE;
     }
   if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64))
     {
       (*_bfd_error_handler)
-       (_("%s: linking files compiled for 32-bit double (-fshort-double) "
-           "and others for 64-bit double"),
-        bfd_archive_filename (ibfd));
+       (_("%B: linking files compiled for 32-bit double (-fshort-double) "
+           "and others for 64-bit double"), ibfd);
       ok = FALSE;
     }
 
@@ -1292,9 +1289,8 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
   if (!EF_M68HC11_CAN_MERGE_MACH (new_flags, old_flags))
     {
       (*_bfd_error_handler)
-       (_("%s: linking files compiled for HCS12 with "
-           "others compiled for HC12"),
-        bfd_archive_filename (ibfd));
+       (_("%B: linking files compiled for HCS12 with "
+           "others compiled for HC12"), ibfd);
       ok = FALSE;
     }
   new_flags = ((new_flags & ~EF_M68HC11_MACH_MASK)
@@ -1309,9 +1305,8 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
   if (new_flags != old_flags)
     {
       (*_bfd_error_handler)
-       (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-        bfd_archive_filename (ibfd), (unsigned long) new_flags,
-        (unsigned long) old_flags);
+       (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+        ibfd, (unsigned long) new_flags, (unsigned long) old_flags);
       ok = FALSE;
     }
 
This page took 0.025298 seconds and 4 git commands to generate.