aboutsummaryrefslogtreecommitdiff
path: root/gold/output.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-01-06 22:37:18 +0000
committerIan Lance Taylor <ian@airs.com>2010-01-06 22:37:18 +0000
commita192ba05083cb72a218e7c7722f30eadb9973833 (patch)
treefd02bf5a6447fb6c1ec2ba8655779f583ee8892e /gold/output.cc
parentd5551862dfa8c22746642b9a7f66b076557a0325 (diff)
downloadgdb-a192ba05083cb72a218e7c7722f30eadb9973833.zip
gdb-a192ba05083cb72a218e7c7722f30eadb9973833.tar.gz
gdb-a192ba05083cb72a218e7c7722f30eadb9973833.tar.bz2
PR 10980
* options.cc (General_options::parse_section_start): New function. (General_options::section_start): New function. (General_options::General_options): Initialize all members. * options.h: Include <map> (class General_options): Add --section-start. Add section_starts_ member. * layout.cc (Layout::attach_allocated_section_to_segment): If --section-start was used, set the address of the segment. Remove local sort_sections. (Layout::relaxation_loop_body): If the address of the load segment has been set by --section-start, don't use it. * output.h (Output_segment::update_flags_for_output_section): New function. * output.cc (Output_segment::add_output_section): Call update_flags_for_output_section.
Diffstat (limited to 'gold/output.cc')
-rw-r--r--gold/output.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/gold/output.cc b/gold/output.cc
index 8f1060e..63ab98c 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -3081,11 +3081,7 @@ Output_segment::add_output_section(Output_section* os,
gold_assert(os->is_large_data_section() == this->is_large_data_segment());
gold_assert(this->type() == elfcpp::PT_LOAD || !do_sort);
- // Update the segment flags. The ELF ABI specifies that a PT_TLS
- // segment should always have PF_R as the flags, regardless of the
- // associated sections.
- if (this->type() != elfcpp::PT_TLS)
- this->flags_ |= seg_flags;
+ this->update_flags_for_output_section(seg_flags);
Output_segment::Output_data_list* pdl;
if (os->type() == elfcpp::SHT_NOBITS)
@@ -3363,8 +3359,8 @@ Output_segment::remove_output_section(Output_section* os)
gold_unreachable();
}
-// Add an Output_data (which is not an Output_section) to the start of
-// a segment.
+// Add an Output_data (which need not be an Output_section) to the
+// start of a segment.
void
Output_segment::add_initial_output_data(Output_data* od)