ChangeLog rotatation and copyright year update
[deliverable/binutils-gdb.git] / gold / layout.h
index 17438692885e51f78914aed68b15982217f4fa6a..aec0c53be778d890bf8213b58203fac44606f8d7 100644 (file)
@@ -1,7 +1,6 @@
 // layout.h -- lay out output file sections for gold  -*- C++ -*-
 
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
-// Free Software Foundation, Inc.
+// Copyright (C) 2006-2015 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -897,7 +896,7 @@ class Layout
   // they finish.  Otherwise return BUILD_ID_BLOCKER.
   Task_token*
   queue_build_id_tasks(Workqueue* workqueue, Task_token* build_id_blocker,
-                       Output_file* of);
+                      Output_file* of);
 
   // Compute and write out the build ID if needed.
   void
@@ -976,7 +975,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&);
@@ -1272,7 +1281,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
@@ -1324,6 +1334,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.
@@ -1441,9 +1454,11 @@ class Write_sections_task : public Task
  public:
   Write_sections_task(const Layout* layout, Output_file* of,
                      Task_token* output_sections_blocker,
+                     Task_token* input_sections_blocker,
                      Task_token* final_blocker)
     : layout_(layout), of_(of),
       output_sections_blocker_(output_sections_blocker),
+      input_sections_blocker_(input_sections_blocker),
       final_blocker_(final_blocker)
   { }
 
@@ -1468,6 +1483,7 @@ class Write_sections_task : public Task
   const Layout* layout_;
   Output_file* of_;
   Task_token* output_sections_blocker_;
+  Task_token* input_sections_blocker_;
   Task_token* final_blocker_;
 };
 
@@ -1510,10 +1526,10 @@ class Write_symbols_task : public Task
 {
  public:
   Write_symbols_task(const Layout* layout, const Symbol_table* symtab,
-                    const Input_objects* input_objects,
+                    const Input_objects* /*input_objects*/,
                     const Stringpool* sympool, const Stringpool* dynpool,
                     Output_file* of, Task_token* final_blocker)
-    : layout_(layout), symtab_(symtab), input_objects_(input_objects),
+    : layout_(layout), symtab_(symtab),
       sympool_(sympool), dynpool_(dynpool), of_(of),
       final_blocker_(final_blocker)
   { }
@@ -1536,7 +1552,6 @@ class Write_symbols_task : public Task
  private:
   const Layout* layout_;
   const Symbol_table* symtab_;
-  const Input_objects* input_objects_;
   const Stringpool* sympool_;
   const Stringpool* dynpool_;
   Output_file* of_;
This page took 0.024478 seconds and 4 git commands to generate.