Correct check of whether value was inserted.
(Output_section_lookup_maps::add_merge_input_section): Likewise.
(Output_section_lookup_maps::add_relaxed_input_section):
Likewise.
* arm.cc (Target_arm::got_section): Remove used local os.
* i386.cc (Target_i386::got_section): Likewise.
* x86_64.cc (Target_x86_64::got_section): Likewise.
* sparc.cc (Target_sparc::got_section): Likewise.
(Target_sparc::relocate): Remove unused local have_got_offset.
* powerpc.cc (Target_powerpc::relocate): Likewise.
+2010-07-13 Philip Herron <herron.philip@googlemail.com>
+ Ian Lance Taylor <iant@google.com>
+
+ * output.h (Output_section_lookup_maps::add_merge_section):
+ Correct check of whether value was inserted.
+ (Output_section_lookup_maps::add_merge_input_section): Likewise.
+ (Output_section_lookup_maps::add_relaxed_input_section):
+ Likewise.
+ * arm.cc (Target_arm::got_section): Remove used local os.
+ * i386.cc (Target_i386::got_section): Likewise.
+ * x86_64.cc (Target_x86_64::got_section): Likewise.
+ * sparc.cc (Target_sparc::got_section): Likewise.
+ (Target_sparc::relocate): Remove unused local have_got_offset.
+ * powerpc.cc (Target_powerpc::relocate): Likewise.
+
2010-07-13 Ian Lance Taylor <iant@google.com>
* compressed_output.cc (zlib_decompress): Fix signature in
this->got_ = new Arm_output_data_got<big_endian>(symtab, layout);
- Output_section* os;
- os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
- this->got_, false, false, false,
- true);
+ layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
+ (elfcpp::SHF_ALLOC
+ | elfcpp::SHF_WRITE),
+ this->got_, false, false, false, true);
// The old GNU linker creates a .got.plt section. We just
// create another set of data in the .got section. Note that we
// always create a PLT if we create a GOT, although the PLT
// might be empty.
this->got_plt_ = new Output_data_space(4, "** GOT PLT");
- os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
- this->got_plt_, false, false,
- false, false);
+ layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
+ (elfcpp::SHF_ALLOC
+ | elfcpp::SHF_WRITE),
+ this->got_plt_, false, false, false,
+ false);
// The first three entries are reserved.
this->got_plt_->set_current_data_size(3 * 4);
this->got_ = new Output_data_got<32, false>();
- Output_section* os;
- os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
- this->got_, false, true, true,
- false);
+ layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
+ (elfcpp::SHF_ALLOC
+ | elfcpp::SHF_WRITE),
+ this->got_, false, true, true, false);
this->got_plt_ = new Output_data_space(4, "** GOT PLT");
- os = layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
- this->got_plt_, false, false, false,
- true);
+ layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
+ (elfcpp::SHF_ALLOC
+ | elfcpp::SHF_WRITE),
+ this->got_plt_, false, false, false,
+ true);
// The first three entries are reserved.
this->got_plt_->set_current_data_size(3 * 4);
std::pair<Merge_section_properties, Output_merge_base*> value(msp, pomb);
std::pair<Merge_sections_by_properties::iterator, bool> result =
this->merge_sections_by_properties_.insert(value);
- gold_assert(value.second);
+ gold_assert(result.second);
}
// Add a mapping from a merged input section in OBJECT with index SHNDX
std::pair<Const_section_id, Output_merge_base*> value(csid, pomb);
std::pair<Merge_sections_by_id::iterator, bool> result =
this->merge_sections_by_id_.insert(value);
- gold_assert(value.second);
+ gold_assert(result.second);
}
// Find a relaxed input section of OBJECT with index SHNDX.
value(csid, poris);
std::pair<Relaxed_input_sections_by_id::iterator, bool> result =
this->relaxed_input_sections_by_id_.insert(value);
- gold_assert(value.second);
+ gold_assert(result.second);
}
private:
// Get the GOT offset if needed. Unlike i386 and x86_64, our GOT
// pointer points to the beginning, not the end, of the table.
// So we just use the plain offset.
- bool have_got_offset = false;
unsigned int got_offset = 0;
unsigned int got2_offset = 0;
switch (r_type)
gold_assert(object->local_has_got_offset(r_sym, GOT_TYPE_STANDARD));
got_offset = object->local_got_offset(r_sym, GOT_TYPE_STANDARD);
}
- have_got_offset = true;
break;
// R_PPC_PLTREL24 is rather special. If non-zero,
got2_offset = got2->offset();
addend += got2_offset;
}
- have_got_offset = true;
break;
default:
this->got_ = new Output_data_got<size, big_endian>();
- Output_section* os;
- os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
- this->got_, false, true, false,
- false);
+ layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
+ (elfcpp::SHF_ALLOC
+ | elfcpp::SHF_WRITE),
+ this->got_, false, true, false, false);
// Define _GLOBAL_OFFSET_TABLE_ at the start of the .got section.
symtab->define_in_output_data("_GLOBAL_OFFSET_TABLE_", NULL,
// Get the GOT offset if needed. Unlike i386 and x86_64, our GOT
// pointer points to the beginning, not the end, of the table.
// So we just use the plain offset.
- bool have_got_offset = false;
unsigned int got_offset = 0;
switch (r_type)
{
gold_assert(object->local_has_got_offset(r_sym, GOT_TYPE_STANDARD));
got_offset = object->local_got_offset(r_sym, GOT_TYPE_STANDARD);
}
- have_got_offset = true;
break;
default:
this->got_ = new Output_data_got<64, false>();
- Output_section* os;
- os = layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
- this->got_, false, true, true,
- false);
+ layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
+ (elfcpp::SHF_ALLOC
+ | elfcpp::SHF_WRITE),
+ this->got_, false, true, true, false);
this->got_plt_ = new Output_data_space(8, "** GOT PLT");
- os = layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
- this->got_plt_, false, false,
- false, true);
+ layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
+ (elfcpp::SHF_ALLOC
+ | elfcpp::SHF_WRITE),
+ this->got_plt_, false, false, false,
+ true);
// The first three entries are reserved.
this->got_plt_->set_current_data_size(3 * 8);