summaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-04-10 12:45:18 +0000
committerNick Clifton <nickc@redhat.com>2008-04-10 12:45:18 +0000
commitef23c7c400bed572a1d9ca778f2307dfd2ed79ac (patch)
treef17e0e40b73b56865d4f6197143c5b4d12b818ce /gas/as.c
parent326746e64026d14a821282d207f7aceb46683ca0 (diff)
downloadbinutils-redhat-ef23c7c400bed572a1d9ca778f2307dfd2ed79ac.tar.gz
* listing.c: Add -ag listing flag to show general information in
listings such as gas version, passed options, and time stamp. (listing_general_info): New function. (print_options): New function. (print_single_option): New function. (print_timestamp): New function. (MAX_DATELEN): Define. (listing_print): Add call to listing_general_info. * listing.h (LISTING_GENERAL): Define. (listing_print): Add new parameter. * as.c (show_usage): Print new switch. (parse_args): Parse new switch. (main): Pass command line on to listing_print. * NEWS: Mention this new feature. * doc/as.texinfo: Document the new sub-option. * gas/all/gas.exp: Check the performance of the -ag command line switch.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/as.c b/gas/as.c
index 200a4d10e3..f1a535ee8a 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1,6 +1,6 @@
/* as.c - GAS main program.
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -232,6 +232,7 @@ Options:\n\
Sub-options [default hls]:\n\
c omit false conditionals\n\
d omit debugging directives\n\
+ g include general info\n\
h include high-level source\n\
l include assembly\n\
m include macro expansions\n\
@@ -825,6 +826,9 @@ This program has absolutely no warranty.\n"));
case 'd':
listing |= LISTING_NODEBUG;
break;
+ case 'g':
+ listing |= LISTING_GENERAL;
+ break;
case 'h':
listing |= LISTING_HLL;
break;
@@ -1077,6 +1081,8 @@ create_obj_attrs_section (void)
int
main (int argc, char ** argv)
{
+ char ** argv_orig = argv;
+
int macro_strip_at;
int keep_it;
@@ -1232,7 +1238,7 @@ main (int argc, char ** argv)
fflush (stderr);
#ifndef NO_LISTING
- listing_print (listing_filename);
+ listing_print (listing_filename, argv_orig);
#endif
if (flag_fatal_warnings && had_warnings () > 0 && had_errors () == 0)