aboutsummaryrefslogtreecommitdiff
path: root/gold/ehframe.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-02 06:50:45 +0000
committerIan Lance Taylor <iant@google.com>2008-02-02 06:50:45 +0000
commit1cac254c18ff7ebf94d1f949b2c65ecc447a2ebf (patch)
treee19182c2708f9110c975c293e6844f5de917e56f /gold/ehframe.cc
parentf964a7562a92762d94cc8c1f6177db2989dcac15 (diff)
downloadgdb-1cac254c18ff7ebf94d1f949b2c65ecc447a2ebf.zip
gdb-1cac254c18ff7ebf94d1f949b2c65ecc447a2ebf.tar.gz
gdb-1cac254c18ff7ebf94d1f949b2c65ecc447a2ebf.tar.bz2
Don't record file offset for CIEs.
Diffstat (limited to 'gold/ehframe.cc')
-rw-r--r--gold/ehframe.cc35
1 files changed, 13 insertions, 22 deletions
diff --git a/gold/ehframe.cc b/gold/ehframe.cc
index b2406b4..80fd859 100644
--- a/gold/ehframe.cc
+++ b/gold/ehframe.cc
@@ -561,12 +561,10 @@ Eh_frame::add_ehframe_input_section(
p != new_cies.end();
++p)
{
- uint64_t zero = 0;
if (p->second)
- this->cie_offsets_.insert(std::make_pair(p->first, zero));
+ this->cie_offsets_.insert(p->first);
else
- this->unmergeable_cie_offsets_.push_back(std::make_pair(p->first,
- zero));
+ this->unmergeable_cie_offsets_.push_back(p->first);
}
return true;
@@ -875,7 +873,7 @@ Eh_frame::read_cie(Sized_relobj<size, big_endian>* object,
{
Cie_offsets::iterator find_cie = this->cie_offsets_.find(&cie);
if (find_cie != this->cie_offsets_.end())
- cie_pointer = find_cie->first;
+ cie_pointer = *find_cie;
else
{
// See if we already saw this CIE in this object file.
@@ -990,11 +988,11 @@ Eh_frame::fde_count() const
this->unmergeable_cie_offsets_.begin();
p != this->unmergeable_cie_offsets_.end();
++p)
- ret += p->first->fde_count();
+ ret += (*p)->fde_count();
for (Cie_offsets::const_iterator p = this->cie_offsets_.begin();
p != this->cie_offsets_.end();
++p)
- ret += p->first->fde_count();
+ ret += (*p)->fde_count();
return ret;
}
@@ -1003,29 +1001,22 @@ Eh_frame::fde_count() const
void
Eh_frame::set_final_data_size()
{
- off_t start_file_offset = this->offset();
section_offset_type output_offset = 0;
for (Unmergeable_cie_offsets::iterator p =
this->unmergeable_cie_offsets_.begin();
p != this->unmergeable_cie_offsets_.end();
++p)
- {
- p->second = start_file_offset + output_offset;
- output_offset = p->first->set_output_offset(output_offset,
- this->addralign(),
- &this->merge_map_);
- }
+ output_offset = (*p)->set_output_offset(output_offset,
+ this->addralign(),
+ &this->merge_map_);
for (Cie_offsets::iterator p = this->cie_offsets_.begin();
p != this->cie_offsets_.end();
++p)
- {
- p->second = start_file_offset + output_offset;
- output_offset = p->first->set_output_offset(output_offset,
- this->addralign(),
- &this->merge_map_);
- }
+ output_offset = (*p)->set_output_offset(output_offset,
+ this->addralign(),
+ &this->merge_map_);
gold_assert((output_offset & (this->addralign() - 1)) == 0);
this->set_data_size(output_offset);
@@ -1114,11 +1105,11 @@ Eh_frame::do_sized_write(unsigned char* oview)
this->unmergeable_cie_offsets_.begin();
p != this->unmergeable_cie_offsets_.end();
++p)
- o = p->first->write<size, big_endian>(oview, o, this->eh_frame_hdr_);
+ o = (*p)->write<size, big_endian>(oview, o, this->eh_frame_hdr_);
for (Cie_offsets::iterator p = this->cie_offsets_.begin();
p != this->cie_offsets_.end();
++p)
- o = p->first->write<size, big_endian>(oview, o, this->eh_frame_hdr_);
+ o = (*p)->write<size, big_endian>(oview, o, this->eh_frame_hdr_);
}
#ifdef HAVE_TARGET_32_LITTLE