{
class General_options;
+class Incremental_inputs;
class Input_objects;
class Mapfile;
class Symbol_table;
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
// 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);
script_options() const
{ return this->script_options_; }
+ // Return the object managing inputs in incremental build. NULL in
+ // non-incremental builds.
+ Incremental_inputs*
+ incremental_inputs()
+ { return this->incremental_inputs_; }
+
// Compute and write out the build ID if needed.
void
write_build_id(Output_file*) const;
};
typedef std::vector<Group_signature> Group_signatures;
- // Create a .note section, filling in the header.
+ // Create a note section, filling in the header.
Output_section*
- create_note(const char* name, int note_type, size_t descsz,
- bool allocate, size_t* trailing_padding);
+ create_note(const char* name, int note_type, const char *section_name,
+ size_t descsz, bool allocate, size_t* trailing_padding);
- // Create a .note section for gold.
+ // Create a note section for gold version.
void
create_gold_note();
void
create_build_id();
+ // Create .gnu_incremental_inputs and .gnu_incremental_strtab sections needed
+ // for the next run of incremental linking to check what has changed.
+ void
+ create_incremental_info_sections();
+
// Find the first read-only PT_LOAD segment, creating one if
// necessary.
Output_segment*
{ 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.
// 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_;
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_;
bool has_static_tls_;
// Whether any sections require postprocessing.
bool any_postprocessing_sections_;
+ // Whether we have resized the signatures_ hash table.
+ bool resized_signatures_;
+ // In incremental build, holds information check the inputs and build the
+ // .gnu_incremental_inputs section.
+ Incremental_inputs* incremental_inputs_;
};
// This task handles writing out data in output sections which is not