* 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.
	(display_info, display_info_table): target_vector was renamed to
	bfd_target_vector.
This commit is contained in:
David MacKenzie
1994-01-25 13:27:56 +00:00
parent f4bd7a8f0e
commit abdcac0f52
2 changed files with 19 additions and 18 deletions

View File

@ -6,6 +6,8 @@ Mon Jan 24 13:29:02 1994 David J. Mackenzie (djm@thepub.cygnus.com)
formats. formats.
(display_bfd): Pass the arg, and get it filled in by calling (display_bfd): Pass the arg, and get it filled in by calling
bfd_check_format_matches instead of bfd_check_format. bfd_check_format_matches instead of bfd_check_format.
(display_info, display_info_table): target_vector was renamed to
bfd_target_vector.
* binutils.texi (objdump): Note some limitations of -h section * binutils.texi (objdump): Note some limitations of -h section
address printing. address printing.

View File

@ -165,8 +165,8 @@ dump_headers (abfd)
} }
static asymbol ** static asymbol **
DEFUN (slurp_symtab, (abfd), slurp_symtab (abfd)
bfd * abfd) bfd *abfd;
{ {
asymbol **sy = (asymbol **) NULL; asymbol **sy = (asymbol **) NULL;
@ -1157,24 +1157,25 @@ dump_relocs (abfd)
#define _DUMMY_NAME_ "##dummy" #define _DUMMY_NAME_ "##dummy"
#endif #endif
static void static void
DEFUN (display_info_table, (first, last), display_info_table (first, last)
int first AND int last) int first;
int last;
{ {
unsigned int i, j; unsigned int i, j;
extern bfd_target *target_vector[]; extern bfd_target *bfd_target_vector[];
printf ("\n%12s", " "); printf ("\n%12s", " ");
for (i = first; i++ < last && target_vector[i];) for (i = first; i++ < last && bfd_target_vector[i];)
printf ("%s ", target_vector[i]->name); printf ("%s ", bfd_target_vector[i]->name);
printf ("\n"); printf ("\n");
for (j = (int) bfd_arch_obscure + 1; (int) j < (int) bfd_arch_last; j++) for (j = (int) bfd_arch_obscure + 1; (int) j < (int) bfd_arch_last; j++)
if (strcmp (bfd_printable_arch_mach (j, 0), "UNKNOWN!") != 0) if (strcmp (bfd_printable_arch_mach (j, 0), "UNKNOWN!") != 0)
{ {
printf ("%11s ", bfd_printable_arch_mach (j, 0)); printf ("%11s ", bfd_printable_arch_mach (j, 0));
for (i = first; i++ < last && target_vector[i];) for (i = first; i++ < last && bfd_target_vector[i];)
{ {
bfd_target *p = target_vector[i]; bfd_target *p = bfd_target_vector[i];
bfd *abfd = bfd_openw (_DUMMY_NAME_, p->name); bfd *abfd = bfd_openw (_DUMMY_NAME_, p->name);
int l = strlen (p->name); int l = strlen (p->name);
int ok; int ok;
@ -1195,17 +1196,17 @@ DEFUN (display_info_table, (first, last),
} }
static void static void
DEFUN_VOID (display_info) display_info ()
{ {
char *colum; char *colum;
unsigned int i, j, columns; unsigned int i, j, columns;
extern bfd_target *target_vector[]; extern bfd_target *bfd_target_vector[];
extern char *getenv (); extern char *getenv ();
printf ("BFD header file version %s\n", BFD_VERSION); printf ("BFD header file version %s\n", BFD_VERSION);
for (i = 0; target_vector[i]; i++) for (i = 0; bfd_target_vector[i]; i++)
{ {
bfd_target *p = target_vector[i]; bfd_target *p = bfd_target_vector[i];
bfd *abfd = bfd_openw (_DUMMY_NAME_, p->name); bfd *abfd = bfd_openw (_DUMMY_NAME_, p->name);
bfd_set_format (abfd, bfd_object); bfd_set_format (abfd, bfd_object);
printf ("%s\n (header %s, data %s)\n", p->name, printf ("%s\n (header %s, data %s)\n", p->name,
@ -1221,12 +1222,12 @@ DEFUN_VOID (display_info)
columns = atoi (colum); columns = atoi (colum);
if (!columns) if (!columns)
columns = 80; columns = 80;
for (i = 0; target_vector[i];) for (i = 0; bfd_target_vector[i];)
{ {
int old; int old;
old = i; old = i;
for (j = 12; target_vector[i] && j < columns; i++) for (j = 12; bfd_target_vector[i] && j < columns; i++)
j += strlen (target_vector[i]->name) + 1; j += strlen (bfd_target_vector[i]->name) + 1;
i--; i--;
if (old == i) if (old == i)
break; break;
@ -1241,8 +1242,6 @@ main (argc, argv)
char **argv; char **argv;
{ {
int c; int c;
extern int optind;
extern char *optarg;
char *target = default_target; char *target = default_target;
boolean seenflag = false; boolean seenflag = false;