* bucomm.c (list_supported_targets): Use bfd_target_list.

This commit is contained in:
Alan Modra 2002-10-15 11:34:01 +00:00
parent 49c1257607
commit 48417c1acc
2 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,7 @@
2002-10-15 Alan Modra <amodra@bigpond.net.au>
* bucomm.c (list_supported_targets): Use bfd_target_list.
* objcopy.c (copy_file): Report ambiguous bfd_object matches, and
other object errors in preference to bfd_core errors.

View file

@ -128,16 +128,18 @@ list_supported_targets (name, f)
const char *name;
FILE *f;
{
extern const bfd_target *const *bfd_target_vector;
int t;
const char **targ_names = bfd_target_list ();
if (name == NULL)
fprintf (f, _("Supported targets:"));
else
fprintf (f, _("%s: supported targets:"), name);
for (t = 0; bfd_target_vector[t] != NULL; t++)
fprintf (f, " %s", bfd_target_vector[t]->name);
for (t = 0; targ_names[t] != NULL; t++)
fprintf (f, " %s", targ_names[t]);
fprintf (f, "\n");
free (targ_names);
}
/* List the supported architectures. */
@ -147,7 +149,7 @@ list_supported_architectures (name, f)
const char *name;
FILE *f;
{
const char** arch;
const char **arch;
if (name == NULL)
fprintf (f, _("Supported architectures:"));