* 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.
This commit is contained in:
parent
241531d62d
commit
8274239589
|
@ -1,3 +1,18 @@
|
|||
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
|
||||
|
|
20
gold/arm.cc
20
gold/arm.cc
|
@ -4116,22 +4116,20 @@ Target_arm<big_endian>::got_section(Symbol_table* symtab, Layout* layout)
|
|||
|
||||
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);
|
||||
|
|
20
gold/i386.cc
20
gold/i386.cc
|
@ -494,19 +494,17 @@ Target_i386::got_section(Symbol_table* symtab, Layout* layout)
|
|||
|
||||
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);
|
||||
|
|
|
@ -2432,7 +2432,7 @@ class Output_section_lookup_maps
|
|||
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
|
||||
|
@ -2445,7 +2445,7 @@ class Output_section_lookup_maps
|
|||
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.
|
||||
|
@ -2469,7 +2469,7 @@ class Output_section_lookup_maps
|
|||
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:
|
||||
|
|
|
@ -1636,7 +1636,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
|
|||
// 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)
|
||||
|
@ -1668,7 +1667,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
|
|||
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,
|
||||
|
@ -1681,7 +1679,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
|
|||
got2_offset = got2->offset();
|
||||
addend += got2_offset;
|
||||
}
|
||||
have_got_offset = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1045,12 +1045,10 @@ Target_sparc<size, big_endian>::got_section(Symbol_table* symtab,
|
|||
|
||||
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,
|
||||
|
@ -2474,7 +2472,6 @@ Target_sparc<size, big_endian>::Relocate::relocate(
|
|||
// 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)
|
||||
{
|
||||
|
@ -2495,7 +2492,6 @@ Target_sparc<size, big_endian>::Relocate::relocate(
|
|||
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:
|
||||
|
|
|
@ -547,19 +547,17 @@ Target_x86_64::got_section(Symbol_table* symtab, Layout* layout)
|
|||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue