diff options
author | Doug Kwan <dougkwan@google.com> | 2010-01-20 17:29:52 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2010-01-20 17:29:52 +0000 |
commit | 5ac169d4b6e2d88c670298a3246fc2a5d8a94aa4 (patch) | |
tree | 02c188debc6532be6476d7de9cb86cc6309ea963 /gold/output.cc | |
parent | a21620630edb456511a2467466814ecffa158b2f (diff) | |
download | fsf-binutils-gdb-5ac169d4b6e2d88c670298a3246fc2a5d8a94aa4.zip fsf-binutils-gdb-5ac169d4b6e2d88c670298a3246fc2a5d8a94aa4.tar.gz fsf-binutils-gdb-5ac169d4b6e2d88c670298a3246fc2a5d8a94aa4.tar.bz2 |
2010-01-20 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::Arm_input_section_map): Change key type from
Input_section_specifier to Section_id.
(Target_arm::new_arm_input_section: Adjust code for change of key
type.
(Target_arm::find_arm_input_section): Ditto.
* gc.h (object.h): Include for Section_id nand Section_id_hash.
(Section_id): Remove.
(Garbage_collection::Section_id_hash): Remove.
* icf.h (object.h): Include for Section_id nand Section_id_hash.
(Section_id): Remove.
(Icf::Section_id_hash): Remove.
* object.h (Section_id, Const_section_id, Section_id_hash,
Const_section_id_hash): New type definitions.
* output.cc (Output_section::add_relaxed_input_section): Change to
use Const_section_id instead of Input_section_specifier as key type.
(Output_section::add_merge_input_section): Ditto.
(Output_section::build_relaxation_map): Change to use Section_id
instead of Input_section_specifier as key type.
(Output_section::convert_input_sections_in_list_to_relaxed_sections):
Ditto.
(Output_section::convert_input_sections_to_relaxed_sections): Change
to use Const_section_id instead of Input_section_specifier as key type.
(Output_section::find_merge_section): Ditto.
(Output_section::find_relaxed_input_section): Ditto.
* output.h (Input_section_specifier): Remove class.
(Output_section::Output_section_data_by_input_section_map): Change
key type to Const_section_id.
(Output_section::Output_relaxed_input_section_by_input_section_map):
Ditto.
(Output_section::Relaxation_map): Change key type to Section_id.
Diffstat (limited to 'gold/output.cc')
-rw-r--r-- | gold/output.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/gold/output.cc b/gold/output.cc index 2a97078..6374895 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -2072,8 +2072,8 @@ Output_section::add_relaxed_input_section(Output_relaxed_input_section* poris) this->add_output_section_data(&inp); if (this->is_relaxed_input_section_map_valid_) { - Input_section_specifier iss(poris->relobj(), poris->shndx()); - this->relaxed_input_section_map_[iss] = poris; + Const_section_id csid(poris->relobj(), poris->shndx()); + this->relaxed_input_section_map_[csid] = poris; } // For a relaxed section, we use the current data size. Linker scripts @@ -2145,8 +2145,8 @@ Output_section::add_merge_input_section(Relobj* object, unsigned int shndx, && merge_section->addralign() == addralign); // Link input section to found merge section. - Input_section_specifier iss(object, shndx); - this->merge_section_map_[iss] = merge_section; + Const_section_id csid(object, shndx); + this->merge_section_map_[csid] = merge_section; return true; } @@ -2181,8 +2181,8 @@ Output_section::add_merge_input_section(Relobj* object, unsigned int shndx, // Add input section to new merge section and link input section to new // merge section in map. pomb->add_input_section(object, shndx); - Input_section_specifier iss(object, shndx); - this->merge_section_map_[iss] = pomb; + Const_section_id csid(object, shndx); + this->merge_section_map_[csid] = pomb; return true; } @@ -2201,15 +2201,15 @@ Output_section::build_relaxation_map( const Input_section& is(input_sections[i]); if (is.is_input_section() || is.is_relaxed_input_section()) { - Input_section_specifier iss(is.relobj(), is.shndx()); - (*relaxation_map)[iss] = i; + Section_id sid(is.relobj(), is.shndx()); + (*relaxation_map)[sid] = i; } } } // Convert regular input sections in INPUT_SECTIONS into relaxed input -// sections in RELAXED_SECTIONS. MAP is a prebuilt map from input section -// specifier to indices of INPUT_SECTIONS. +// sections in RELAXED_SECTIONS. MAP is a prebuilt map from section id +// indices of INPUT_SECTIONS. void Output_section::convert_input_sections_in_list_to_relaxed_sections( @@ -2220,8 +2220,8 @@ Output_section::convert_input_sections_in_list_to_relaxed_sections( for (size_t i = 0; i < relaxed_sections.size(); ++i) { Output_relaxed_input_section* poris = relaxed_sections[i]; - Input_section_specifier iss(poris->relobj(), poris->shndx()); - Relaxation_map::const_iterator p = map.find(iss); + Section_id sid(poris->relobj(), poris->shndx()); + Relaxation_map::const_iterator p = map.find(sid); gold_assert(p != map.end()); gold_assert((*input_sections)[p->second].is_input_section()); (*input_sections)[p->second] = Input_section(poris); @@ -2283,8 +2283,8 @@ Output_section::convert_input_sections_to_relaxed_sections( for (size_t i = 0; i < relaxed_sections.size(); ++i) { Output_relaxed_input_section* poris = relaxed_sections[i]; - Input_section_specifier iss(poris->relobj(), poris->shndx()); - this->relaxed_input_section_map_[iss] = poris; + Const_section_id csid(poris->relobj(), poris->shndx()); + this->relaxed_input_section_map_[csid] = poris; } } @@ -2329,9 +2329,9 @@ Output_section_data* Output_section::find_merge_section(const Relobj* object, unsigned int shndx) const { - Input_section_specifier iss(object, shndx); + Const_section_id csid(object, shndx); Output_section_data_by_input_section_map::const_iterator p = - this->merge_section_map_.find(iss); + this->merge_section_map_.find(csid); if (p != this->merge_section_map_.end()) { Output_section_data* posd = p->second; @@ -2360,16 +2360,16 @@ Output_section::find_relaxed_input_section(const Relobj* object, ++p) if (p->is_relaxed_input_section()) { - Input_section_specifier iss(p->relobj(), p->shndx()); - this->relaxed_input_section_map_[iss] = + Const_section_id csid(p->relobj(), p->shndx()); + this->relaxed_input_section_map_[csid] = p->relaxed_input_section(); } this->is_relaxed_input_section_map_valid_ = true; } - Input_section_specifier iss(object, shndx); + Const_section_id csid(object, shndx); Output_relaxed_input_section_by_input_section_map::const_iterator p = - this->relaxed_input_section_map_.find(iss); + this->relaxed_input_section_map_.find(csid); if (p != this->relaxed_input_section_map_.end()) return p->second; else |