diff --git a/gold/output.cc b/gold/output.cc index 0a9e58f..ae489fe 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -4152,27 +4152,6 @@ Output_segment::add_output_section_to_nonload(Output_section* os, this->output_lists_[0].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) -{ - for (int i = 0; i < static_cast(ORDER_MAX); ++i) - { - Output_data_list* pdl = &this->output_lists_[i]; - for (Output_data_list::iterator p = pdl->begin(); p != pdl->end(); ++p) - { - if (*p == os) - { - pdl->erase(p); - return; - } - } - } - gold_unreachable(); -} - // Add an Output_data (which need not be an Output_section) to the // start of a segment. diff --git a/gold/output.h b/gold/output.h index d8a8aaa..8297455 100644 --- a/gold/output.h +++ b/gold/output.h @@ -4713,11 +4713,6 @@ class Output_segment add_output_section_to_nonload(Output_section* os, elfcpp::Elf_Word seg_flags); - // Remove an Output_section from this segment. It is an error if it - // is not present. - void - remove_output_section(Output_section* os); - // Add an Output_data (which need not be an Output_section) to the // start of this segment. void