diff options
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r-- | binutils/objdump.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index 8e7d24d290..ce87a5f36a 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -393,7 +393,8 @@ free_only_list (void) { if (! at_least_one_seen) { - non_fatal (_("Section '%s' mentioned in a -j option, but not found in any input file"), + non_fatal (_("section '%s' mentioned in a -j option, " + "but not found in any input file"), only->name); exit_status = 1; } @@ -555,6 +556,7 @@ slurp_dynamic_symtab (bfd *abfd) if (!(bfd_get_file_flags (abfd) & DYNAMIC)) { non_fatal (_("%s: not a dynamic object"), bfd_get_filename (abfd)); + exit_status = 1; dynsymcount = 0; return NULL; } @@ -1210,9 +1212,6 @@ update_source_path (const char *filename) const char *fname; int i; - if (filename == NULL) - return NULL; - p = try_print_file_open (filename, filename); if (p != NULL) return p; @@ -1626,10 +1625,16 @@ disassemble_bytes (struct disassemble_info * inf, inf->stream = stdout; if (insn_width == 0 && inf->bytes_per_line != 0) octets_per_line = inf->bytes_per_line; - if (octets < 0) + if (octets < (int) opb) { if (sfile.pos) printf ("%s\n", sfile.buffer); + if (octets >= 0) + { + non_fatal (_("disassemble_fn returned length %d"), + octets); + exit_status = 1; + } break; } } @@ -2107,7 +2112,7 @@ disassemble_data (bfd *abfd) const bfd_arch_info_type *inf = bfd_scan_arch (machine); if (inf == NULL) - fatal (_("Can't use supplied machine %s"), machine); + fatal (_("can't use supplied machine %s"), machine); abfd->arch_info = inf; } @@ -2126,7 +2131,7 @@ disassemble_data (bfd *abfd) aux.disassemble_fn = disassembler (abfd); if (!aux.disassemble_fn) { - non_fatal (_("Can't disassemble for architecture %s\n"), + non_fatal (_("can't disassemble for architecture %s\n"), bfd_printable_arch_mach (bfd_get_arch (abfd), 0)); exit_status = 1; return; @@ -2396,11 +2401,11 @@ read_section_stabs (bfd *abfd, const char *sect_name, bfd_size_type *size_ptr) if (! bfd_get_section_contents (abfd, stabsect, contents, 0, size)) { - non_fatal (_("Reading %s section of %s failed: %s"), + non_fatal (_("reading %s section of %s failed: %s"), sect_name, bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); - free (contents); exit_status = 1; + free (contents); return NULL; } @@ -3350,7 +3355,7 @@ main (int argc, char **argv) endian = BFD_ENDIAN_LITTLE; else { - non_fatal (_("unrecognized -E option")); + nonfatal (_("unrecognized -E option")); usage (stderr, 1); } break; @@ -3362,6 +3367,7 @@ main (int argc, char **argv) else { non_fatal (_("unrecognized --endian type `%s'"), optarg); + exit_status = 1; usage (stderr, 1); } break; |