X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fas.c;h=f6da1b1a1d477edba5eeaef6c81bce0753864cfe;hb=3233d7d074e59b83f68a22071cff597f00d5ae81;hp=83a572b25096053a07c833953f0f0029048b9025;hpb=1ec4b9f28bab4400c882a0f3e966eb12b73cee1a;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/as.c b/gas/as.c index 83a572b250..f6da1b1a1d 100644 --- a/gas/as.c +++ b/gas/as.c @@ -1,5 +1,5 @@ /* as.c - GAS main program. - Copyright (C) 1987-2017 Free Software Foundation, Inc. + Copyright (C) 1987-2018 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -31,6 +31,10 @@ #define COMMON +/* Disable code to set FAKE_LABEL_NAME in obj-multi.h, to avoid circular + reference. */ +#define INITIALIZING_EMULS + #include "as.h" #include "subsegs.h" #include "output-file.h" @@ -39,6 +43,7 @@ #include "dwarf2dbg.h" #include "dw2gencfi.h" #include "bfdver.h" +#include "write.h" #ifdef HAVE_ITBL_CPU #include "itbl-ops.h" @@ -46,12 +51,6 @@ #define itbl_init() #endif -#ifdef HAVE_SBRK -#ifdef NEED_DECLARATION_SBRK -extern void *sbrk (); -#endif -#endif - #ifdef USING_CGEN /* Perform any cgen specific initialisation for gas. */ extern void gas_cgen_begin (void); @@ -125,9 +124,6 @@ static struct itbl_file_list *itbl_files; #endif static long start_time; -#ifdef HAVE_SBRK -char *start_sbrk; -#endif static int flag_macro_alternate; @@ -208,10 +204,10 @@ common_emul_init (void) if (this_emulation->fake_label_name == 0) { if (this_emulation->leading_underscore) - this_emulation->fake_label_name = "L0\001"; + this_emulation->fake_label_name = FAKE_LABEL_NAME; else /* What other parameters should we test? */ - this_emulation->fake_label_name = ".L0\001"; + this_emulation->fake_label_name = "." FAKE_LABEL_NAME; } } #endif @@ -660,7 +656,7 @@ parse_args (int * pargc, char *** pargv) case OPTION_VERSION: /* This output is intended to follow the GNU standards document. */ printf (_("GNU assembler %s\n"), BFD_VERSION_STRING); - printf (_("Copyright (C) 2017 Free Software Foundation, Inc.\n")); + printf (_("Copyright (C) 2018 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 version 3 or later.\n\ @@ -1043,17 +1039,10 @@ This program has absolutely no warranty.\n")); static void dump_statistics (void) { -#ifdef HAVE_SBRK - char *lim = (char *) sbrk (0); -#endif long run_time = get_run_time () - start_time; fprintf (stderr, _("%s: total time in assembly: %ld.%06ld\n"), myname, run_time / 1000000, run_time % 1000000); -#ifdef HAVE_SBRK - fprintf (stderr, _("%s: data size %ld\n"), - myname, (long) (lim - start_sbrk)); -#endif subsegs_print_statistics (stderr); write_print_statistics (stderr); @@ -1187,9 +1176,6 @@ main (int argc, char ** argv) start_time = get_run_time (); signal_init (); -#ifdef HAVE_SBRK - start_sbrk = (char *) sbrk (0); -#endif #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) setlocale (LC_MESSAGES, ""); @@ -1335,15 +1321,10 @@ main (int argc, char ** argv) n_warns = had_warnings (); n_errs = had_errors (); - if (n_warns == 1) - sprintf (warn_msg, _("%d warning"), n_warns); - else - sprintf (warn_msg, _("%d warnings"), n_warns); - if (n_errs == 1) - sprintf (err_msg, _("%d error"), n_errs); - else - sprintf (err_msg, _("%d errors"), n_errs); - + sprintf (warn_msg, + ngettext ("%d warning", "%d warnings", n_warns), n_warns); + sprintf (err_msg, + ngettext ("%d error", "%d errors", n_errs), n_errs); if (flag_fatal_warnings && n_warns != 0) { if (n_errs == 0)