Fix seg-fault running strip on a corrupt binary.
[deliverable/binutils-gdb.git] / bfd / elf32-visium.c
index 32ca479103e83f2b10a6e51a5587df5d50ce09f4..2983150306aae789b31775b6365b70a8f28ed7b0 100644 (file)
@@ -477,6 +477,7 @@ visium_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
     default:
       if (r_type >= (unsigned int) R_VISIUM_max)
        {
+         /* xgettext:c-format */
          _bfd_error_handler (_("%B: invalid Visium reloc number: %d"), abfd, r_type);
          r_type = 0;
        }
@@ -662,13 +663,13 @@ visium_elf_relocate_section (bfd *output_bfd,
          switch (r)
            {
            case bfd_reloc_overflow:
-             r = info->callbacks->reloc_overflow
+             (*info->callbacks->reloc_overflow)
                (info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
                 input_bfd, input_section, rel->r_offset);
              break;
 
            case bfd_reloc_undefined:
-             r = info->callbacks->undefined_symbol
+             (*info->callbacks->undefined_symbol)
                (info, name, input_bfd, input_section, rel->r_offset, TRUE);
              break;
 
@@ -690,11 +691,8 @@ visium_elf_relocate_section (bfd *output_bfd,
            }
 
          if (msg)
-           r = info->callbacks->warning
-             (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-         if (!r)
-           return FALSE;
+           (*info->callbacks->warning) (info, msg, name, input_bfd,
+                                        input_section, rel->r_offset);
        }
     }
 
@@ -766,8 +764,9 @@ visium_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
    file to the output object file when linking.  */
 
 static bfd_boolean
-visium_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+visium_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   flagword old_flags;
   flagword new_flags;
   flagword mismatch;
@@ -814,9 +813,9 @@ visium_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
 
       if (mismatch)
        _bfd_error_handler
-         (_
-          ("%s: compiled %s -mtune=%s and linked with modules"
-           " compiled %s -mtune=%s"),
+         /* xgettext:c-format */
+         (_("%s: compiled %s -mtune=%s and linked with modules"
+            " compiled %s -mtune=%s"),
           bfd_get_filename (ibfd), new_opt_with, opt_arch, old_opt_with,
           opt_arch);
     }
This page took 0.024374 seconds and 4 git commands to generate.