aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2011-07-16 07:58:40 +0000
committerRoland McGrath <roland@gnu.org>2011-07-16 07:58:40 +0000
commit30824704e933a2dad20afc97be7bce651e4b5ac1 (patch)
tree49a5ba33578f0ab2f30b548e4dbd12af83baa7c1 /ld/ldmain.c
parent436ce5e7e644c7b1746e83fa371b2fda18a83aad (diff)
downloadgdb-30824704e933a2dad20afc97be7bce651e4b5ac1.zip
gdb-30824704e933a2dad20afc97be7bce651e4b5ac1.tar.gz
gdb-30824704e933a2dad20afc97be7bce651e4b5ac1.tar.bz2
Implement ld --print-output-format.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 1b4afff..ec9dcff 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -427,11 +427,14 @@ main (int argc, char **argv)
info_msg ("\n==================================================\n");
}
+ if (command_line.print_output_format)
+ info_msg ("%s\n", lang_get_output_target ());
+
lang_final ();
if (!lang_has_input_file)
{
- if (version_printed)
+ if (version_printed || command_line.print_output_format)
xexit (0);
einfo (_("%P%F: no input files\n"));
}