2010-10-20 Doug Kwan <dougkwan@google.com>
[deliverable/binutils-gdb.git] / gold / layout.cc
index 95f1de755a0e425953a613b84f1db8e9fc3b9670..bc6a053c487ecccd55b0ebea2611c672d6fc10d4 100644 (file)
@@ -489,11 +489,15 @@ Layout::choose_output_section(const Relobj* relobj, const char* name,
   // Some flags in the input section should not be automatically
   // copied to the output section.
   flags &= ~ (elfcpp::SHF_INFO_LINK
-             | elfcpp::SHF_LINK_ORDER
              | elfcpp::SHF_GROUP
              | elfcpp::SHF_MERGE
              | elfcpp::SHF_STRINGS);
 
+  // We only clear the SHF_LINK_ORDER flag in for
+  // a non-relocatable link.
+  if (!parameters->options().relocatable())
+    flags &= ~elfcpp::SHF_LINK_ORDER;
+
   if (this->script_options_->saw_sections_clause())
     {
       // We are using a SECTIONS clause, so the output section is
This page took 0.025416 seconds and 4 git commands to generate.