aboutsummaryrefslogtreecommitdiff
path: root/gas/output-file.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-07-06 16:42:04 +0000
committerNick Clifton <nickc@redhat.com>2004-07-06 16:42:04 +0000
commite7bd9ea00e5f9144e69f3aeb477d4da420c281ed (patch)
treedb70fbfd5760dbf8124e99d77495beca717ca340 /gas/output-file.c
parentd98956497ec0188b9f29b873983b3445302d2ab9 (diff)
downloadgdb-e7bd9ea00e5f9144e69f3aeb477d4da420c281ed.zip
gdb-e7bd9ea00e5f9144e69f3aeb477d4da420c281ed.tar.gz
gdb-e7bd9ea00e5f9144e69f3aeb477d4da420c281ed.tar.bz2
(output_file_create): Report the target format chosen when bfd_openw reports
that it is invalid.
Diffstat (limited to 'gas/output-file.c')
-rw-r--r--gas/output-file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/output-file.c b/gas/output-file.c
index 4c376b4..4005fbf 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);
}