From d099120c64430117a80fc95c0bff2da9ff5d8657 Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Fri, 19 Mar 2010 19:11:21 +0000 Subject: 2010-03-19 Doug Kwan * arm.cc (Stub_table::Stub_table): Initialize new data members Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_. (Stub_table::add_reloc_stub): Assign stub offset and update Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_. (Stub_table::reloc_stubs_size_, Stub_table::reloc_stubs_addralign_): New data members. (Stub_table::update_data_size_and_addralign): Use Stub_table::reloc_stubs_size_ and Stub_table::reloc_stubs_addralign_ instead of going over all reloc stubs. (Stub_table::finalize_stubs): Do not assign reloc stub offsets. * stringpool.cc (Stringpool_template::Stringpool_template): Initialize Stringpool_template::offset_ to size of Stringpool_char. (Stringpool_template::new_key_offset): Remove code to initialize Stringpool_template::offset_. * stringpool.h (Stringpool_template::set_no_zero_null): Set Stringpool_template::offset_ to zero. --- gold/stringpool.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gold/stringpool.cc') diff --git a/gold/stringpool.cc b/gold/stringpool.cc index bbbe975..10d6d27 100644 --- a/gold/stringpool.cc +++ b/gold/stringpool.cc @@ -36,7 +36,7 @@ namespace gold template Stringpool_template::Stringpool_template() : string_set_(), key_to_offset_(), strings_(), strtab_size_(0), - zero_null_(true), optimize_(false), offset_(0) + zero_null_(true), optimize_(false), offset_(sizeof(Stringpool_char)) { if (parameters->options_valid() && parameters->options().optimize() >= 2) this->optimize_ = true; @@ -238,9 +238,6 @@ template void Stringpool_template::new_key_offset(size_t length) { - if (this->key_to_offset_.size() == 0) - this->offset_ = this->zero_null_ ? sizeof(Stringpool_char) : 0; - section_offset_type offset; if (this->zero_null_ && length == 0) offset = 0; -- cgit v1.1