aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-12 05:51:25 +0000
committerIan Lance Taylor <iant@google.com>2007-10-12 05:51:25 +0000
commite44fcf3bcf912ddf4ce94f9c3f71c253d473d692 (patch)
tree3f5de3fdbbc7b5ba332f8d2123f017c2e8437ce6 /gold/layout.cc
parent6ca8706da5d2154ee86544024f708fda30efba26 (diff)
downloadgdb-e44fcf3bcf912ddf4ce94f9c3f71c253d473d692.zip
gdb-e44fcf3bcf912ddf4ce94f9c3f71c253d473d692.tar.gz
gdb-e44fcf3bcf912ddf4ce94f9c3f71c253d473d692.tar.bz2
Add --stats option to print runtime and memory usage statistics.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index f7e1365..5bcdbe1 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -67,7 +67,7 @@ Layout::Layout(const General_options& options)
unattached_section_list_(), special_output_list_(),
tls_segment_(NULL), symtab_section_(NULL),
dynsym_section_(NULL), dynamic_section_(NULL), dynamic_data_(NULL),
- eh_frame_section_(NULL)
+ eh_frame_section_(NULL), output_file_size_(-1)
{
// Make space for more than enough segments for a typical file.
// This is just for efficiency--it's OK if we wind up needing more.
@@ -625,6 +625,8 @@ Layout::finalize(const Input_objects* input_objects, Symbol_table* symtab)
// Now we know exactly where everything goes in the output file.
Output_data::layout_complete();
+ this->output_file_size_ = off;
+
return off;
}