Constification of parse_linespec and fallout:
[deliverable/binutils-gdb.git] / gold / layout.h
index 94745a6e68f1ce98c8a67c7d85d5990d453c523e..f49ae248cbde9aa496a3f67605d324bc923c7d4c 100644 (file)
@@ -1,6 +1,6 @@
 // layout.h -- lay out output file sections for gold  -*- C++ -*-
 
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
 // Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
@@ -552,7 +552,15 @@ class Layout
   // Maps section SECN to SEGMENT s.
   void
   insert_section_segment_map(Const_section_id secn, Unique_segment_info *s);
-  
+
+  // Some input sections require special ordering, for compatibility
+  // with GNU ld.  Given the name of an input section, return -1 if it
+  // does not require special ordering.  Otherwise, return the index
+  // by which it should be ordered compared to other input sections
+  // that require special ordering.
+  static int
+  special_ordering_of_input_section(const char* name);
+
   bool
   is_section_ordering_specified()
   { return this->section_ordering_specified_; }
@@ -884,6 +892,13 @@ class Layout
                          const Output_data_reloc_generic* dyn_rel,
                          bool add_debug, bool dynrel_includes_plt);
 
+  // If a treehash is necessary to compute the build ID, then queue
+  // the necessary tasks and return a blocker that will unblock when
+  // they finish.  Otherwise return BUILD_ID_BLOCKER.
+  Task_token*
+  queue_build_id_tasks(Workqueue* workqueue, Task_token* build_id_blocker,
+                      Output_file* of);
+
   // Compute and write out the build ID if needed.
   void
   write_build_id(Output_file*) const;
@@ -917,6 +932,10 @@ class Layout
   void
   get_allocated_sections(Section_list*) const;
 
+  // Store the executable sections into the section list.
+  void
+  get_executable_sections(Section_list*) const;
+
   // Make a section for a linker script to hold data.
   Output_section*
   make_output_section_for_script(const char* name,
@@ -957,7 +976,17 @@ class Layout
   // be mapped to an output section that should be KEPT.
   bool
   keep_input_section(const Relobj*, const char*);
-  
+
+  // Add a special output object that will be recreated afresh
+  // if there is another relaxation iteration.
+  void
+  add_relax_output(Output_data* data)
+  { this->relax_output_list_.push_back(data); }
+
+  // Clear out (and free) everything added by add_relax_output.
+  void
+  reset_relax_output();
+
  private:
   Layout(const Layout&);
   Layout& operator=(const Layout&);
@@ -1253,7 +1282,8 @@ class Layout
     // Check that sections and special data are in reset states.
     void
     check_output_data_for_reset_values(const Layout::Section_list&,
-                                      const Layout::Data_list&);
+                                      const Layout::Data_list& special_outputs,
+                                      const Layout::Data_list& relax_outputs);
 
     // Record information of a section list.
     void
@@ -1305,6 +1335,9 @@ class Layout
   // The list of unattached Output_data objects which require special
   // handling because they are not Output_sections.
   Data_list special_output_list_;
+  // Like special_output_list_, but cleared and recreated on each
+  // iteration of relaxation.
+  Data_list relax_output_list_;
   // The section headers.
   Output_section_headers* section_headers_;
   // A pointer to the PT_TLS segment if there is one.
@@ -1342,6 +1375,12 @@ class Layout
   Gdb_index* gdb_index_data_;
   // The space for the build ID checksum if there is one.
   Output_section_data* build_id_note_;
+  // Temporary storage for tree hash of build ID.
+  unsigned char* array_of_hashes_;
+  // Size of array_of_hashes_ (in bytes).
+  size_t size_of_array_of_hashes_;
+  // Input view for computing tree hash of build ID.  Freed in write_build_id().
+  const unsigned char* input_view_;
   // The output section containing dwarf abbreviations
   Output_reduced_debug_abbrev_section* debug_abbrev_;
   // The output section containing the dwarf debug info tree
This page took 0.024697 seconds and 4 git commands to generate.