Remove datasize measurements based on sbrk()
authorTristan Gingold <tgingold@free.fr>
Wed, 19 Jul 2017 07:55:12 +0000 (09:55 +0200)
committerTristan Gingold <tgingold@free.fr>
Wed, 19 Jul 2017 07:55:12 +0000 (09:55 +0200)
binutils/
* nm.c (show_stats): Remove variable.
(long_options): Remove --stats option.
(main): Remove handling of --stats.

ld/
* ldmain.c (main): Remove display of data size.

gas/
* as.c (start_sbrk): Remove.
(main): Remove assignment.
(dump_statistics): Remove display of data size.

binutils/ChangeLog
binutils/nm.c
gas/ChangeLog
gas/as.c
ld/ChangeLog
ld/ldmain.c

index d0980829581f28320773db0e45d969d36802077b..7e9d809c14391581af0a0a0c262e580991cdf5c2 100644 (file)
@@ -1,3 +1,9 @@
+2017-07-19  Tristan Gingold  <gingold@adacore.com>
+
+       * nm.c (show_stats): Remove variable.
+       (long_options): Remove --stats option.
+       (main): Remove handling of --stats.
+
 2017-07-18  Nick Clifton  <nickc@redhat.com>
 
        PR 21775
index 7ddcc8a113d20e90e39314ed5dc8eebf1514cdbd..5e03a8ae92d526d8b28048271835773d38c605af 100644 (file)
@@ -157,7 +157,6 @@ static int sort_by_size = 0;        /* Sort by size of symbol.  */
 static int undefined_only = 0; /* Print undefined symbols only.  */
 static int dynamic = 0;                /* Print dynamic symbols.  */
 static int show_version = 0;   /* Show the version number.  */
-static int show_stats = 0;     /* Show statistics.  */
 static int show_synthetic = 0; /* Display synthesized symbols too.  */
 static int line_numbers = 0;   /* Print line numbers for symbols.  */
 static int allow_special_symbols = 0;  /* Allow special symbols.  */
@@ -221,7 +220,6 @@ static struct option long_options[] =
   {"reverse-sort", no_argument, &reverse_sort, 1},
   {"size-sort", no_argument, 0, OPTION_SIZE_SORT},
   {"special-syms", no_argument, &allow_special_symbols, 1},
-  {"stats", no_argument, &show_stats, 1},
   {"synthetic", no_argument, &show_synthetic, 1},
   {"target", required_argument, 0, OPTION_TARGET},
   {"defined-only", no_argument, &defined_only, 1},
@@ -1797,15 +1795,6 @@ main (int argc, char **argv)
 
   END_PROGRESS (program_name);
 
-#ifdef HAVE_SBRK
-  if (show_stats)
-    {
-      char *lim = (char *) sbrk (0);
-
-      non_fatal (_("data size %ld"), (long) (lim - (char *) &environ));
-    }
-#endif
-
   exit (retval);
   return retval;
 }
index c53ac9ad1f4ca3cac1dd99e6f3050d6244dbf605..dd6a34f858b6cd99a66d6ce5125b6fed4dcc4d91 100644 (file)
@@ -1,3 +1,9 @@
+2017-07-19  Tristan Gingold  <gingold@adacore.com>
+
+       * as.c (start_sbrk): Remove.
+       (main): Remove assignment.
+       (dump_statistics): Remove display of data size.
+
 2017-07-19  Tristan Gingold  <gingold@adacore.com>
 
        * testsuite/gas/pe/seh-x64-err-2.s: New test.
index 83a572b25096053a07c833953f0f0029048b9025..47175591a083e944cff93ebff99623899ca7a7a9 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
 #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 +119,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;
 
@@ -1043,17 +1034,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 +1171,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, "");
index ea648a93809ab0bbf5e3f003b8258829ffb0192b..4525236a6b7b71b7d7b9e76475c457e5f4fe7b34 100644 (file)
@@ -1,3 +1,7 @@
+2017-07-19  Tristan Gingold  <gingold@adacore.com>
+
+       * ldmain.c (main): Remove display of data size.
+
 2017-07-18  Maciej W. Rozycki  <macro@imgtec.com>
 
        * testsuite/ld-elf/binutils.exp (binutils_test): Make the
index ee5ab1166ade91a6de329cc97ff3179c0ed8ba61..5d1a3f46f556184aa65cfb1d2d9514ece1ac1ca2 100644 (file)
 
 #include <string.h>
 
-#ifdef HAVE_SBRK
-#if !HAVE_DECL_SBRK
-extern void *sbrk ();
-#endif
-#endif
-
 #ifndef TARGET_SYSTEM_ROOT
 #define TARGET_SYSTEM_ROOT ""
 #endif
@@ -198,9 +192,6 @@ main (int argc, char **argv)
 {
   char *emulation;
   long start_time = get_run_time ();
-#ifdef HAVE_SBRK
-  char *start_sbrk = (char *) sbrk (0);
-#endif
 
 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
   setlocale (LC_MESSAGES, "");
@@ -539,18 +530,11 @@ main (int argc, char **argv)
 
   if (config.stats)
     {
-#ifdef HAVE_SBRK
-      char *lim = (char *) sbrk (0);
-#endif
       long run_time = get_run_time () - start_time;
 
       fflush (stdout);
       fprintf (stderr, _("%s: total time in link: %ld.%06ld\n"),
               program_name, run_time / 1000000, run_time % 1000000);
-#ifdef HAVE_SBRK
-      fprintf (stderr, _("%s: data size %ld\n"), program_name,
-              (long) (lim - start_sbrk));
-#endif
       fflush (stderr);
     }
 
This page took 0.036268 seconds and 4 git commands to generate.