diff options
author | Stan Shebs <shebs@codesourcery.com> | 1994-01-25 21:30:00 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1994-01-25 21:30:00 +0000 |
commit | 8594f568906ffe9b7c9297b115625fb6b5c3850b (patch) | |
tree | 7a4e80a6843ed985eddb0703ed30fd6a68231cb8 | |
parent | 4b471f9391d22fade680878aa29ea6cac5f8211c (diff) | |
download | gdb-8594f568906ffe9b7c9297b115625fb6b5c3850b.zip gdb-8594f568906ffe9b7c9297b115625fb6b5c3850b.tar.gz gdb-8594f568906ffe9b7c9297b115625fb6b5c3850b.tar.bz2 |
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.
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/ld.texinfo | 7 | ||||
-rw-r--r-- | ld/ldmain.c | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index ad06226..a8ffe10 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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 diff --git a/ld/ld.texinfo b/ld/ld.texinfo index c305215..fad8802 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -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} diff --git a/ld/ldmain.c b/ld/ldmain.c index 8ac7eeb..4eb5fce 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -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)); } |