diff options
author | Ian Lance Taylor <iant@google.com> | 2008-03-12 04:38:42 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-03-12 04:38:42 +0000 |
commit | 1650c4ff500bc54eea33d31ae9396434a3e13733 (patch) | |
tree | 36c7a4a10c6005e8ab65e0afb8b9230d49a50c39 /gold/output.cc | |
parent | e00eeb0a11ba17abc1166adb7f94097ae37c470c (diff) | |
download | gdb-1650c4ff500bc54eea33d31ae9396434a3e13733.zip gdb-1650c4ff500bc54eea33d31ae9396434a3e13733.tar.gz gdb-1650c4ff500bc54eea33d31ae9396434a3e13733.tar.bz2 |
Combine read-only .eh_frame sections with read-write .eh_frame
sections.
Diffstat (limited to 'gold/output.cc')
-rw-r--r-- | gold/output.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gold/output.cc b/gold/output.cc index 622e983..044a035 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -2376,6 +2376,27 @@ Output_segment::add_output_section(Output_section* os, pdl->push_back(os); } +// Remove an Output_section from this segment. It is an error if it +// is not present. + +void +Output_segment::remove_output_section(Output_section* os) +{ + // We only need this for SHT_PROGBITS. + gold_assert(os->type() == elfcpp::SHT_PROGBITS); + for (Output_data_list::iterator p = this->output_data_.begin(); + p != this->output_data_.end(); + ++p) + { + if (*p == os) + { + this->output_data_.erase(p); + return; + } + } + gold_unreachable(); +} + // Add an Output_data (which is not an Output_section) to the start of // a segment. |