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 /ld/ldmain.c | |
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.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 7 |
1 files changed, 6 insertions, 1 deletions
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)); } |