Mon Jan 24 13:29:02 1994 David J. Mackenzie (djm@thepub.cygnus.com)
+ * objdump.c (display_file): Remove call to list_matching_formats.
+ It would never be called.
+ (list_matching_formats): Take an arg giving the list of matching
+ formats.
+ (display_bfd): Pass the arg, and get it filled in by calling
+ bfd_check_format_matches instead of bfd_check_format.
+
* binutils.texi (objdump): Note some limitations of -h section
address printing.
}
static void
-list_matching_formats()
+list_matching_formats(p)
+ char **p;
{
- char **p = bfd_matching_formats ();
-
fprintf(stderr, "%s: Matching formats:", program_name);
while (*p)
fprintf(stderr, " %s", *p++);
display_bfd (abfd)
bfd *abfd;
{
- if (!bfd_check_format (abfd, bfd_object))
+ char **matching;
+
+ if (!bfd_check_format_matches (abfd, bfd_object, &matching))
{
fprintf (stderr, "%s: %s: %s\n", program_name, abfd->filename,
bfd_errmsg (bfd_error));
if (bfd_error == file_ambiguously_recognized)
- list_matching_formats();
+ {
+ list_matching_formats (matching);
+ free (matching);
+ }
return;
}
printf ("\n%s: file format %s\n", abfd->filename, abfd->xvec->name);
{
fprintf (stderr, "%s: ", program_name);
bfd_perror (filename);
- if (bfd_error == file_ambiguously_recognized)
- list_matching_formats();
return;
}