* ldmain.c (main): Add start_sbrk set to sbrk(0) on entry.
On exit, compute data size as the delta between current sbrk(0) and start_sbrk.
This commit is contained in:
parent
2792b94d6b
commit
24a0971372
@ -1,3 +1,9 @@
|
||||
2012-11-15 Simon Baldwin <simonb@google.com>
|
||||
|
||||
* ldmain.c (main): Add start_sbrk set to sbrk(0) on entry.
|
||||
On exit, compute data size as the delta between current
|
||||
sbrk(0) and start_sbrk.
|
||||
|
||||
2012-11-09 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* emultempl/rxelf.em (no_flag_mismatch_warnings): Initialise to
|
||||
|
@ -191,6 +191,9 @@ 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, "");
|
||||
@ -505,7 +508,7 @@ main (int argc, char **argv)
|
||||
program_name, run_time / 1000000, run_time % 1000000);
|
||||
#ifdef HAVE_SBRK
|
||||
fprintf (stderr, _("%s: data size %ld\n"), program_name,
|
||||
(long) (lim - (char *) &environ));
|
||||
(long) (lim - start_sbrk));
|
||||
#endif
|
||||
fflush (stderr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user