diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-11-04 15:56:03 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-11-04 15:56:03 +0000 |
commit | f5c870d25d59bc1e6fcb6a836b6bd1981788982c (patch) | |
tree | 5f0302e3a7df3fabd48233a453fdeca714c8116d /gold/output.h | |
parent | c7cbc7a8c26acd91b498167e3a2b8625d5eaa109 (diff) | |
download | gdb-f5c870d25d59bc1e6fcb6a836b6bd1981788982c.zip gdb-f5c870d25d59bc1e6fcb6a836b6bd1981788982c.tar.gz gdb-f5c870d25d59bc1e6fcb6a836b6bd1981788982c.tar.bz2 |
* layout.cc (Layout::get_output_section): Add is_interp and
is_dynamic_linker_section parameters. Change all callers.
(Layout::choose_output_section): Likewise.
(Layout::make_output_section): Likewise.
(Layout::add_output_section_data): Add is_dynamic_linker_section
parameter. Change all callers.
* layout.h (class Layout): Update declarations.
* output.h (class Output_section): Add is_interp, set_is_interp,
is_dynamic_linker_section, set_is_dynamic_linker_section methods.
Add is_interp_, is_dynamic_linker_section_ fields. Change
generate_code_fills_at_write_ to a bitfield.
* output.cc (Output_section::Output_sections): Initialize new
fields.
(Output_segment::add_output_section): Add do_sort parameter.
Change all callers.
Diffstat (limited to 'gold/output.h')
-rw-r--r-- | gold/output.h | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/gold/output.h b/gold/output.h index 841efd3..7e1c73b 100644 --- a/gold/output.h +++ b/gold/output.h @@ -2378,6 +2378,27 @@ class Output_section : public Output_data is_large_data_section() { return this->is_large_section_ && this->type_ != elfcpp::SHT_NOBITS; } + // True if this is the .interp section which goes into the PT_INTERP + // segment. + bool + is_interp() const + { return this->is_interp_; } + + // Record that this is the interp section. + void + set_is_interp() + { this->is_interp_ = true; } + + // True if this is a section used by the dynamic linker. + bool + is_dynamic_linker_section() const + { return this->is_dynamic_linker_section_; } + + // Record that this is a section used by the dynamic linker. + void + set_is_dynamic_linker_section() + { this->is_dynamic_linker_section_ = true; } + // Return whether this section should be written after all the input // sections are complete. bool @@ -3318,6 +3339,13 @@ class Output_section : public Output_data bool is_small_section_ : 1; // True if this is a large section. bool is_large_section_ : 1; + // True if this is the .interp section going into the PT_INTERP + // segment. + bool is_interp_ : 1; + // True if this is section is read by the dynamic linker. + bool is_dynamic_linker_section_ : 1; + // Whether code-fills are generated at write. + bool generate_code_fills_at_write_ : 1; // For SHT_TLS sections, the offset of this section relative to the base // of the TLS segment. uint64_t tls_offset_; @@ -3328,13 +3356,11 @@ class Output_section : public Output_data // Map from merge section properties to merge_sections; Merge_section_by_properties_map merge_section_by_properties_map_; // Map from input sections to relaxed input sections. This is mutable - // beacause it is udpated lazily. We may need to update it in a + // because it is updated lazily. We may need to update it in a // const qualified method. mutable Output_section_data_by_input_section_map relaxed_input_section_map_; // Whether relaxed_input_section_map_ is valid. mutable bool is_relaxed_input_section_map_valid_; - // Whether code-fills are generated at write. - bool generate_code_fills_at_write_; }; // An output segment. PT_LOAD segments are built from collections of @@ -3403,9 +3429,12 @@ class Output_segment uint64_t maximum_alignment(); - // Add an Output_section to this segment. + // Add the Output_section OS to this segment. SEG_FLAGS is the + // segment flags to use. DO_SORT is true if we should sort the + // placement of the input section for more efficient generated code. void - add_output_section(Output_section* os, elfcpp::Elf_Word seg_flags); + add_output_section(Output_section* os, elfcpp::Elf_Word seg_flags, + bool do_sort); // Remove an Output_section from this segment. It is an error if it // is not present. |