aboutsummaryrefslogtreecommitdiff
path: root/gold/output.h
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.h
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.h')
-rw-r--r--gold/output.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/gold/output.h b/gold/output.h
index 7ce3202..98132e9 100644
--- a/gold/output.h
+++ b/gold/output.h
@@ -3483,8 +3483,8 @@ class Output_segment
void
remove_output_section(Output_section* os);
- // Add an Output_data (which is not an Output_section) to the start
- // of this segment.
+ // Add an Output_data (which need not be an Output_section) to the
+ // start of this segment.
void
add_initial_output_data(Output_data*);
@@ -3516,6 +3516,17 @@ class Output_segment
this->are_addresses_set_ = true;
}
+ // Update the flags for the flags of an output section added to this
+ // segment.
+ void
+ update_flags_for_output_section(elfcpp::Elf_Xword flags)
+ {
+ // The ELF ABI specifies that a PT_TLS segment should always have
+ // PF_R as the flags.
+ if (this->type() != elfcpp::PT_TLS)
+ this->flags_ |= flags;
+ }
+
// Set the segment flags. This is only used if we have a PHDRS
// clause which explicitly specifies the flags.
void