2011-09-29 Sriraman Tallam <tmsriram@google.com>
[deliverable/binutils-gdb.git] / gold / gold.cc
index 693ff79b28bea1d4b0e3910bc0ccd7d3abd5540c..2700bdb5ef67a61bf156b7698f92e994b4dee1da 100644 (file)
@@ -539,6 +539,20 @@ queue_middle_tasks(const General_options& options,
         }
     }
 
+  /* If plugins have specified a section order, re-arrange input sections
+     according to a specified section order.  If --section-ordering-file is
+     also specified, do not do anything here.  */
+  if (parameters->options().has_plugins()
+      && layout->is_section_ordering_specified()
+      && !parameters->options().section_ordering_file ())
+    {
+      for (Layout::Section_list::const_iterator p
+            = layout->section_list().begin();
+           p != layout->section_list().end();
+           ++p)
+        (*p)->update_section_layout(layout->get_section_order_map());
+    }
+
   // Layout deferred objects due to plugins.
   if (parameters->options().has_plugins())
     {
This page took 0.027593 seconds and 4 git commands to generate.