diff options
author | Cary Coutant <ccoutant@google.com> | 2010-08-03 20:38:09 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2010-08-03 20:38:09 +0000 |
commit | 569d07e08c91df81006a626accb9d643f97f7387 (patch) | |
tree | 23d0ce13c7e4b70dab3a12fe78fca41616720f0d /gold/merge.h | |
parent | e0fdf2aa981c77e5b65882e8a6da49bde0b046c3 (diff) | |
download | binutils-redhat-569d07e08c91df81006a626accb9d643f97f7387.tar.gz |
* merge.cc (Output_merge_string::do_add_input_section): Count strings
to reserve space in merged_strings vector. Keep total input size
for stats.
(Output_merge_string::do_print_merge_stats): Print total input size.
* merge.h (Output_merge_string): Add input_size_ field.
* stringpool.cc (Stringpool_template::string_length): Move
implementations out of Stringpool_template class and place in
stringpool.h.
* stringpool.h (string_length): Move out of Stringpool_template.
Diffstat (limited to 'gold/merge.h')
-rw-r--r-- | gold/merge.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/merge.h b/gold/merge.h index b1284ae17f..675739e24e 100644 --- a/gold/merge.h +++ b/gold/merge.h @@ -462,7 +462,7 @@ class Output_merge_string : public Output_merge_base public: Output_merge_string(uint64_t addralign) : Output_merge_base(sizeof(Char_type), addralign), stringpool_(), - merged_strings_lists_(), input_count_(0) + merged_strings_lists_(), input_count_(0), input_size_(0) { gold_assert(addralign <= sizeof(Char_type)); this->stringpool_.set_no_zero_null(); @@ -566,6 +566,8 @@ class Output_merge_string : public Output_merge_base Merged_strings_lists merged_strings_lists_; // The number of entries seen in input files. size_t input_count_; + // The total size of input sections. + size_t input_size_; }; } // End namespace gold. |