daily update
[deliverable/binutils-gdb.git] / gold / layout.h
index 010ab2ee98a6ab12a241c47c5cd4251abe7409ed..0a9146bdf4f60254f7856a23633e4a38dd5e9706 100644 (file)
@@ -39,6 +39,7 @@ namespace gold
 {
 
 class General_options;
+class Incremental_inputs;
 class Input_objects;
 class Mapfile;
 class Symbol_table;
@@ -125,7 +126,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 +272,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);
 
@@ -368,6 +369,12 @@ class Layout
   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;
@@ -473,6 +480,11 @@ class Layout
   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*
@@ -640,8 +652,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 +673,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 +712,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 +727,11 @@ 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_;
+  // 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
This page took 0.024391 seconds and 4 git commands to generate.