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.
#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 *));
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;
\f
void
print_version_id ()
-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
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:
{
char *s;
long i;
- symbolS *sym;
+ struct defsym_list *n;
for (s = optarg; *s != '\0' && *s != '='; s++)
;
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;
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. */
[-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);
}
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: