mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 02:35:00 +08:00
* gold.h (reserve_unordered_map): Define, three versions, one for
each version of Unordered_map. * layout.cc (Layout::Layout): Remove options parameter. Add number_of_input_files parameter. Don't initialize options_. Initialize number_of_input_files_ and resized_signatures_. Move sections_are_attached_. (Layout::layout_group): Reserve space for group_signatures_. (Layout::find_or_add_kept_section): Change name parameter to be a reference. Resize signatures_ map when it gets large enough. (Layout::layout_eh_frame): Use parameters->options() instead of this->options_. (Layout::make_output_section): Likewise. (Layout::attach_allocated_section_to_segment): Likewise. (Layout::finalize, Layout::create_executable_stack): Likewise. (Layout::set_segment_offsets, Layout::create_interp): Likewise. (Layout::finish_dynamic_section, Layout::write_binary): Likewise. * layout.h (class Layout): Update declarations. Remove options_ field. Add number_of_input_files_ and resized_signatures_ fields. Move sections_are_attached_ field. * main.cc (main): Pass number of input files to Layout constructor. Don't pass options.
This commit is contained in:
@ -125,7 +125,7 @@ struct Kept_section
|
||||
class Layout
|
||||
{
|
||||
public:
|
||||
Layout(const General_options& options, Script_options*);
|
||||
Layout(int number_of_input_files, Script_options*);
|
||||
|
||||
// Given an input section SHNDX, named NAME, with data in SHDR, from
|
||||
// the object file OBJECT, return the output section where this
|
||||
@ -271,7 +271,7 @@ class Layout
|
||||
// CANDIDATE->GROUP_ being false, KEPT_SECTION can point back to
|
||||
// CANDIDATE.
|
||||
bool
|
||||
find_or_add_kept_section(const std::string name,
|
||||
find_or_add_kept_section(const std::string& name,
|
||||
Kept_section* candidate,
|
||||
Kept_section** kept_section);
|
||||
|
||||
@ -640,8 +640,8 @@ class Layout
|
||||
{ return Layout::segment_precedes(seg1, seg2); }
|
||||
};
|
||||
|
||||
// A reference to the options on the command line.
|
||||
const General_options& options_;
|
||||
// The number of input files, for sizing tables.
|
||||
int number_of_input_files_;
|
||||
// Information set by scripts or by command line options.
|
||||
Script_options* script_options_;
|
||||
// The output section names.
|
||||
@ -661,8 +661,6 @@ class Layout
|
||||
// The list of output sections which are not attached to any output
|
||||
// segment.
|
||||
Section_list unattached_section_list_;
|
||||
// Whether we have attached the sections to the segments.
|
||||
bool sections_are_attached_;
|
||||
// The list of unattached Output_data objects which require special
|
||||
// handling because they are not Output_sections.
|
||||
Data_list special_output_list_;
|
||||
@ -702,6 +700,8 @@ class Layout
|
||||
Group_signatures group_signatures_;
|
||||
// The size of the output file.
|
||||
off_t output_file_size_;
|
||||
// Whether we have attached the sections to the segments.
|
||||
bool sections_are_attached_;
|
||||
// Whether we have seen an object file marked to require an
|
||||
// executable stack.
|
||||
bool input_requires_executable_stack_;
|
||||
@ -715,6 +715,8 @@ class Layout
|
||||
bool has_static_tls_;
|
||||
// Whether any sections require postprocessing.
|
||||
bool any_postprocessing_sections_;
|
||||
// Whether we have resized the signatures_ hash table.
|
||||
bool resized_signatures_;
|
||||
};
|
||||
|
||||
// This task handles writing out data in output sections which is not
|
||||
|
Reference in New Issue
Block a user