aboutsummaryrefslogtreecommitdiff
path: root/gold/object.h
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-01-26 21:29:10 +0000
committerDoug Kwan <dougkwan@google.com>2010-01-26 21:29:10 +0000
commit2b328d4ec5fb4e92d9a1ca4db4d91da2034970e1 (patch)
treeef7b087ccf4ce36ec2be4e72c270a89abcdf4a64 /gold/object.h
parent708ead4e0572e94084eb3f4f0254428d996e8ee3 (diff)
downloadgdb-2b328d4ec5fb4e92d9a1ca4db4d91da2034970e1.zip
gdb-2b328d4ec5fb4e92d9a1ca4db4d91da2034970e1.tar.gz
gdb-2b328d4ec5fb4e92d9a1ca4db4d91da2034970e1.tar.bz2
2010-01-26 Doug Kwan <dougkwan@google.com>
* arm.cc (set): Include. (class Arm_exidx_fixup): Change type of last_input_section_ to const pointer type. (Arm_output_section::Text_section_list): New type. (Arm_output_section::append_text_sections_to_list): New method. (Arm_output_section::fix_exidx_coverage): Ditto. (Arm_relobj::Arm_relobj): Initialize exidx_section_map_. (Arm_relobj::convert_input_section_to_relaxed_section): Use Relobj::set_section_offset() instead of Sized_relobj::invalidate_section_offset(). (Arm_relobj::section_needs_reloc_stub_scanning): Add an extra parameter for section headers. Ignore relocation sections for unallocated sections and EXIDX sections. (Target_arm::fix_exidx_coverage): New method. (Target_arm::output_section_address_less_than): New type. (Arm_exidx_fixup::add_exidx_cantunwind_as_needed): Use index of the linked text section instead of the EXIDX section. (Arm_output_section::create_stub_group): Add an assertion to check that this is not an EXIDX output section. (Arm_output_section::append_text_sections_to_list): New method. (Arm_output_section::fix_exidx_coverage): Ditto. (Arm_relobj::scan_sections_for_stubs): Adjust call to Arm_relobj::section_needs_reloc_stub_scanning. (Target_arm::do_relax): Fix EXIDX output section coverage in the first pass. (Target_arm::fix_exidx_coverage): New method. * object.h (Relobj::set_output_section): New method. (Sized_relobj::invalidate_section_offset): Remove method. (Sized_relobj::do_invalidate_section_offset): Remove method. (Sized_relobj::do_set_section_offset): Handle offset value -1.
Diffstat (limited to 'gold/object.h')
-rw-r--r--gold/object.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/gold/object.h b/gold/object.h
index d006856..3f9aaae 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -747,6 +747,16 @@ class Relobj : public Object
return this->output_sections_[shndx];
}
+ // The the output section of the input section with index SHNDX.
+ // This is only used currently to remove a section from the link in
+ // relaxation.
+ void
+ set_output_section(unsigned int shndx, Output_section* os)
+ {
+ gold_assert(shndx < this->output_sections_.size());
+ this->output_sections_[shndx] = os;
+ }
+
// Given a section index, return the offset in the Output_section.
// The return value will be -1U if the section is specially mapped,
// such as a merge section.
@@ -1484,11 +1494,6 @@ class Sized_relobj : public Relobj
Address
map_to_kept_section(unsigned int shndx, bool* found) const;
- // Make section offset invalid. This is needed for relaxation.
- void
- invalidate_section_offset(unsigned int shndx)
- { this->do_invalidate_section_offset(shndx); }
-
protected:
// Set up.
virtual void
@@ -1626,15 +1631,10 @@ class Sized_relobj : public Relobj
do_set_section_offset(unsigned int shndx, uint64_t off)
{
gold_assert(shndx < this->section_offsets_.size());
- this->section_offsets_[shndx] = convert_types<Address, uint64_t>(off);
- }
-
- // Set the offset of a section to invalid_address.
- virtual void
- do_invalidate_section_offset(unsigned int shndx)
- {
- gold_assert(shndx < this->section_offsets_.size());
- this->section_offsets_[shndx] = invalid_address;
+ this->section_offsets_[shndx] =
+ (off == static_cast<uint64_t>(-1)
+ ? invalid_address
+ : convert_types<Address, uint64_t>(off));
}
// Adjust a section index if necessary.