From: nickc Date: Tue, 6 Jul 2004 16:42:02 +0000 (+0000) Subject: (output_file_create): Report the target format chosen when bfd_openw reports X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e129858ec60a6f2a6dce22e24c082d932e95777f;p=pf3gnuchains%2Fsourceware.git (output_file_create): Report the target format chosen when bfd_openw reports that it is invalid. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 4a4ec660f3..a7b174e83b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,8 @@ 2004-07-06 Nick Clifton + * output-file.c (output_file_create): Report the target format + chosen when bfd_openw reports that it is invalid. + * config/obj-coff.c (coff_pseudo_table): Only define the weak pseudo for BFD based assemblers. diff --git a/gas/output-file.c b/gas/output-file.c index 4c376b4dcc..4005fbfa03 100644 --- a/gas/output-file.c +++ b/gas/output-file.c @@ -48,7 +48,10 @@ output_file_create (char *name) else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT))) { - as_perror (_("FATAL: can't create %s"), name); + if (bfd_get_error () == bfd_error_invalid_target) + as_perror (_("Selected target format '%s' unknown"), TARGET_FORMAT); + else + as_perror (_("FATAL: can't create %s"), name); exit (EXIT_FAILURE); }