(output_file_create): Report the target format chosen when bfd_openw reports
authorNick Clifton <nickc@redhat.com>
Tue, 6 Jul 2004 16:42:04 +0000 (16:42 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 6 Jul 2004 16:42:04 +0000 (16:42 +0000)
that it is invalid.

gas/ChangeLog
gas/output-file.c

index 4a4ec660f3460cf0493dd3b669b4590a76ed89c2..a7b174e83ba78d194208d5654815f522e484aa0e 100644 (file)
@@ -1,5 +1,8 @@
 2004-07-06  Nick Clifton  <nickc@redhat.com>
 
+       * 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.
 
index 4c376b4dcc4b3264853e5dc0a14fb92e151e3bc5..4005fbfa031c599dd4ab881b715fc3c53ede3f45 100644 (file)
@@ -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);
     }
 
This page took 0.034071 seconds and 4 git commands to generate.