Remove datasize measurements based on sbrk()
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.
This commit is contained in:
parent
804a409318
commit
e4943f2c75
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
19
gas/as.c
19
gas/as.c
|
@ -46,12 +46,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 +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, "");
|
||||
|
|
|
@ -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
|
||||
|
|
16
ld/ldmain.c
16
ld/ldmain.c
|
@ -50,12 +50,6 @@
|
|||
|
||||
#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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue