Tue Jan 25 13:19:41 1994 Stan Shebs (shebs@andros.cygnus.com)

* ldmain.c (main): Compute and display total execution time.
	* ld.texinfo (-stats): Document the option.
This commit is contained in:
Stan Shebs 1994-01-25 21:30:00 +00:00
parent 4b471f9391
commit 8594f56890
3 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Tue Jan 25 13:19:41 1994 Stan Shebs (shebs@andros.cygnus.com)
* ldmain.c (main): Compute and display total execution time.
* ld.texinfo (-stats): Document the option.
Mon Jan 24 12:56:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* ldmain.c (reloc_overflow): Added name, reloc_name and addend

View file

@ -173,7 +173,8 @@ ld [ -o @var{output} ] @var{objfile}@dots{}
[ -l@var{archive} ] [ -L@var{searchdir} ] [ -M ] [ -Map @var{mapfile} ]
[ -m @var{emulation} ] [ -N | -n ] [ -noinhibit-exec ]
[ -oformat @var{output-format} ] [ -R @var{filename} ] [ -relax ]
[ -r | -Ur ] [ -S ] [ -s ] [ -sort-common ] [ -T @var{commandfile} ]
[ -r | -Ur ] [ -S ] [ -s ] [ -sort-common ] [ -stats ]
[ -T @var{commandfile} ]
[ -Ttext @var{org} ] [ -Tdata @var{org} ]
[ -Tbss @var{org} ] [ -t ] [ -u @var{symbol}] [-V] [-v] [ --version ]
[ -warn-common ] [ -y@var{symbol} ] [ -X ] [-x ]
@ -519,6 +520,10 @@ one byte symbols, then all the two bytes, then all the four bytes, and
then everything else. This is to prevent gaps between symbols due to
alignment constraints. This option disables that sorting.
@item -stats
Compute and display statistics about the operation of the linker,
such as execution time and memory usage.
@item -Tbss @var{org}
@kindex -Tbss @var{org}
@itemx -Tdata @var{org}

View file

@ -1,4 +1,5 @@
/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
/* Main program of GNU linker.
Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@ -135,6 +136,7 @@ main (argc, argv)
char **argv;
{
char *emulation;
long start_time = get_run_time ();
program_name = argv[0];
@ -286,7 +288,10 @@ main (argc, argv)
{
extern char **environ;
char *lim = (char *) sbrk (0);
long run_time = get_run_time () - start_time;
fprintf (stderr, "%s: total time in link: %d.%06d\n",
program_name, run_time / 1000000, run_time % 1000000);
fprintf (stderr, "%s: data size %ld\n", program_name,
(long) (lim - (char *) &environ));
}