From bfc94743ea0a885386652f34be93bcbc40e12f11 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 1 Oct 1996 19:31:06 +0000 Subject: [PATCH] * as.c (show_usage): Print bug report address. (parse_args): Change version printing to match current GNU standards. * gasp.c (show_usage): Print bug report address. (main): Change version printing to match current GNU standards. --- gas/ChangeLog | 6 ++++++ gas/as.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++------- gas/gasp.c | 9 ++++++++- 3 files changed, 66 insertions(+), 8 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index bb2aab5..5b64d03 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ Tue Oct 1 12:37:48 1996 Ian Lance Taylor + * as.c (show_usage): Print bug report address. + (parse_args): Change version printing to match current GNU + standards. + * gasp.c (show_usage): Print bug report address. + (main): Change version printing to match current GNU standards. + * config/tc-m68k.c (init_table): Correct access control unit register numbers. From Ken Rose . diff --git a/gas/as.c b/gas/as.c index 4062f62..21caa20 100644 --- a/gas/as.c +++ b/gas/as.c @@ -15,8 +15,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* * Main program for AS; a 32-bit assembler of GNU. @@ -44,6 +45,12 @@ #include "sb.h" #include "macro.h" +#ifdef HAVE_SBRK +#ifdef NEED_DECLARATION_SBRK +extern PTR sbrk (); +#endif +#endif + static void perform_an_assembly_pass PARAMS ((int argc, char **argv)); static int macro_expr PARAMS ((const char *, int, sb *, int *)); @@ -67,6 +74,17 @@ int chunksize = 5000; Then the chunk sizes for gas and bfd will be reduced. */ int debug_memory = 0; +/* We build a list of defsyms as we read the options, and then define + them after we have initialized everything. */ + +struct defsym_list +{ + struct defsym_list *next; + char *name; + valueT value; +}; + +static struct defsym_list *defsyms; void print_version_id () @@ -121,6 +139,8 @@ Options:\n\ -Z generate object file even after errors\n"); md_show_usage (stream); + + fprintf (stream, "\nReport bugs to bug-gnu-utils@prep.ai.mit.edu\n"); } #ifdef USE_EMULATIONS @@ -351,7 +371,14 @@ parse_args (pargc, pargv) break; case OPTION_VERSION: - print_version_id (); + /* This output is intended to follow the GNU standards document. */ + printf ("GNU assembler %s\n", GAS_VERSION); + printf ("Copyright 1996 Free Software Foundation, Inc.\n"); + printf ("\ +This program is free software; you may redistribute it under the terms of\n\ +the GNU General Public License. This program has absolutely no warranty.\n"); + printf ("This assembler was configured for a target of `%s'.\n", + TARGET_ALIAS); exit (EXIT_SUCCESS); case OPTION_EMULATION: @@ -379,7 +406,7 @@ parse_args (pargc, pargv) { char *s; long i; - symbolS *sym; + struct defsym_list *n; for (s = optarg; *s != '\0' && *s != '='; s++) ; @@ -387,9 +414,11 @@ parse_args (pargc, pargv) as_fatal ("bad defsym; format is --defsym name=value"); *s++ = '\0'; i = strtol (s, (char **) NULL, 0); - sym = symbol_new (optarg, absolute_section, (valueT) i, - &zero_address_frag); - symbol_table_insert (sym); + n = (struct defsym_list *) xmalloc (sizeof *n); + n->next = defsyms; + n->name = optarg; + n->value = i; + defsyms = n; } break; @@ -585,6 +614,22 @@ main (argc, argv) tc_init_after_args (); #endif + /* Now that we have fully initialized, and have created the output + file, define any symbols requested by --defsym command line + arguments. */ + while (defsyms != NULL) + { + symbolS *sym; + struct defsym_list *next; + + sym = symbol_new (defsyms->name, absolute_section, defsyms->value, + &zero_address_frag); + symbol_table_insert (sym); + next = defsyms->next; + free (defsyms); + defsyms = next; + } + PROGRESS (1); perform_an_assembly_pass (argc, argv); /* Assemble it. */ diff --git a/gas/gasp.c b/gas/gasp.c index ff779b0..2cb4877 100644 --- a/gas/gasp.c +++ b/gas/gasp.c @@ -3549,6 +3549,8 @@ Usage: %s \n\ [-Dname=value] create preprocessor variable called name, with value\n\ [-Ipath] add to include path list\n\ [in-file]\n"); + if (status == 0) + printf ("\nReport bugs to bug-gnu-utils@prep.ai.mit.edu\n"); exit (status); } @@ -3634,7 +3636,12 @@ main (argc, argv) show_help (); /*NOTREACHED*/ case 'v': - printf ("GNU %s version %s\n", program_name, program_version); + /* This output is intended to follow the GNU standards document. */ + printf ("GNU assembler pre-processor %s\n", program_version); + printf ("Copyright 1996 Free Software Foundation, Inc.\n"); + printf ("\ +This program is free software; you may redistribute it under the terms of\n\ +the GNU General Public License. This program has absolutely no warranty.\n"); exit (0); /*NOTREACHED*/ case 0: -- 2.7.4