aboutsummaryrefslogtreecommitdiff
path: root/gold/stringpool.cc
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-03-19 19:11:21 +0000
committerDoug Kwan <dougkwan@google.com>2010-03-19 19:11:21 +0000
commitd099120c64430117a80fc95c0bff2da9ff5d8657 (patch)
tree459701f27b0243cd692c50d63fd90bd934a3886c /gold/stringpool.cc
parent20781792668b79372f059ecb51fa5d61a1a43f84 (diff)
downloadgdb-d099120c64430117a80fc95c0bff2da9ff5d8657.zip
gdb-d099120c64430117a80fc95c0bff2da9ff5d8657.tar.gz
gdb-d099120c64430117a80fc95c0bff2da9ff5d8657.tar.bz2
2010-03-19 Doug Kwan <dougkwan@google.com>
* 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.
Diffstat (limited to 'gold/stringpool.cc')
-rw-r--r--gold/stringpool.cc5
1 files changed, 1 insertions, 4 deletions
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<typename Stringpool_char>
Stringpool_template<Stringpool_char>::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<typename Stringpool_char>
void
Stringpool_template<Stringpool_char>::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;