+2012-10-22 Simon Baldwin <simonb@google.com>
+
+ * as.c (dump_statistics): Compute data size as the delta between
+ current sbrk(0) and start_sbrk.
+ * (main): Set start_sbrk to sbrk(0) on entry.
+
2012-10-18 Kai Tietz <ktietz@redhat.com>
* config/obj-coff.c: Add include of struc-symbol.h header.
#endif
static long start_time;
+#ifdef HAVE_SBRK
+char *start_sbrk;
+#endif
static int flag_macro_alternate;
myname, run_time / 1000000, run_time % 1000000);
#ifdef HAVE_SBRK
fprintf (stderr, _("%s: data size %ld\n"),
- myname, (long) (lim - (char *) &environ));
+ myname, (long) (lim - start_sbrk));
#endif
subsegs_print_statistics (stderr);
int macro_strip_at;
start_time = get_run_time ();
+#ifdef HAVE_SBRK
+ start_sbrk = (char *) sbrk (0);
+#endif
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");