* ldmain.c (main): Compute and display total execution time.
* ld.texinfo (-stats): Document the option.
+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
[ -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 ]
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}
-/* 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.
char **argv;
{
char *emulation;
+ long start_time = get_run_time ();
program_name = argv[0];
{
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));
}