/* objdump.c -- dump information about an object file.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
{
- fprintf (stderr, _("%s: no symbols\n"), bfd_get_filename (abfd));
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
symcount = 0;
return NULL;
}
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
if (symcount == 0)
- fprintf (stderr, _("%s: no symbols\n"), bfd_get_filename (abfd));
+ non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
return sy;
}
{
if (!(bfd_get_file_flags (abfd) & DYNAMIC))
{
- fprintf (stderr, _("%s: %s: not a dynamic object\n"),
- program_name, bfd_get_filename (abfd));
+ non_fatal (_("%s: not a dynamic object"), bfd_get_filename (abfd));
dynsymcount = 0;
return NULL;
}
if (dynsymcount < 0)
bfd_fatal (bfd_get_filename (abfd));
if (dynsymcount == 0)
- fprintf (stderr, _("%s: %s: No dynamic symbols\n"),
- program_name, bfd_get_filename (abfd));
+ non_fatal (_("%s: No dynamic symbols"), bfd_get_filename (abfd));
return sy;
}
if (buf == NULL)
{
- fprintf (stderr, _("Out of virtual memory\n"));
- exit (1);
+ fatal (_("Out of virtual memory"));
}
n = strlen (buf);
const bfd_arch_info_type *info = bfd_scan_arch (machine);
if (info == NULL)
{
- fprintf (stderr, _("%s: Can't use supplied machine %s\n"),
- program_name,
- machine);
- exit (1);
+ fatal (_("Can't use supplied machine %s"), machine);
}
abfd->arch_info = info;
}
disassemble_fn = disassembler (abfd);
if (!disassemble_fn)
{
- fprintf (stderr, _("%s: Can't disassemble for architecture %s\n"),
- program_name,
- bfd_printable_arch_mach (bfd_get_arch (abfd), 0));
+ non_fatal (_("Can't disassemble for architecture %s\n"),
+ bfd_printable_arch_mach (bfd_get_arch (abfd), 0));
exit_status = 1;
return;
}
stabstrsect = bfd_get_section_by_name (abfd, strsect_name);
if (0 == stabstrsect)
{
- fprintf (stderr, _("%s: %s has no %s section\n"), program_name,
- bfd_get_filename (abfd), strsect_name);
+ non_fatal (_("%s has no %s section"),
+ bfd_get_filename (abfd), strsect_name);
exit_status = 1;
return false;
}
if (! bfd_get_section_contents (abfd, stabsect, (PTR) stabs, 0, stab_size))
{
- fprintf (stderr, _("%s: Reading %s section of %s failed: %s\n"),
- program_name, stabsect_name, bfd_get_filename (abfd),
- bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("Reading %s section of %s failed: %s"),
+ stabsect_name, bfd_get_filename (abfd),
+ bfd_errmsg (bfd_get_error ()));
free (stabs);
free (strtab);
exit_status = 1;
if (! bfd_get_section_contents (abfd, stabstrsect, (PTR) strtab, 0,
stabstr_size))
{
- fprintf (stderr, _("%s: Reading %s section of %s failed: %s\n"),
- program_name, strsect_name, bfd_get_filename (abfd),
- bfd_errmsg (bfd_get_error ()));
+ non_fatal (_("Reading %s section of %s failed: %s\n"),
+ strsect_name, bfd_get_filename (abfd),
+ bfd_errmsg (bfd_get_error ()));
free (stabs);
free (strtab);
exit_status = 1;
{
if (! print_debugging_info (stdout, dhandle))
{
- fprintf (stderr,
- _("%s: printing debugging information failed\n"),
- bfd_get_filename (abfd));
+ non_fatal (_("%s: printing debugging information failed"),
+ bfd_get_filename (abfd));
exit_status = 1;
}
}
endian = BFD_ENDIAN_LITTLE;
else
{
- fprintf (stderr, _("%s: unrecognized -E option\n"),
- program_name);
+ non_fatal (_("unrecognized -E option"));
usage (stderr, 1);
}
break;
endian = BFD_ENDIAN_LITTLE;
else
{
- fprintf (stderr, _("%s: unrecognized --endian type `%s'\n"),
- program_name, optarg);
+ non_fatal (_("unrecognized --endian type `%s'"), optarg);
usage (stderr, 1);
}
break;