]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* layout.cc (Layout::create_shstrtab): Only write out after input
authorIan Lance Taylor <ian@airs.com>
Tue, 15 Dec 2009 22:20:25 +0000 (22:20 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 15 Dec 2009 22:20:25 +0000 (22:20 +0000)
sections if we are compressing debug sections.

gold/ChangeLog
gold/layout.cc

index 7084de85a523edd594814cf99896317939e51124..86ed4e8f6f5d6434333498867a097d4ecc5c705f 100644 (file)
@@ -1,3 +1,8 @@
+2009-12-15  Ian Lance Taylor  <iant@google.com>
+
+       * layout.cc (Layout::create_shstrtab): Only write out after input
+       sections if we are compressing debug sections.
+
 2009-12-15  Ian Lance Taylor  <iant@google.com>
 
        * archive.cc (Archive::add_symbols): Only look up a symbol without
index a7f8185d49acb6201efb05eb59373905d64f7d83..914de92cfcac503f48b325ac0200eadf5b8e4f77 100644 (file)
@@ -2694,10 +2694,14 @@ Layout::create_shstrtab()
   Output_section* os = this->make_output_section(name, elfcpp::SHT_STRTAB, 0,
                                                 false, false);
 
-  // We can't write out this section until we've set all the section
-  // names, and we don't set the names of compressed output sections
-  // until relocations are complete.
-  os->set_after_input_sections();
+  if (strcmp(parameters->options().compress_debug_sections(), "none") != 0)
+    {
+      // We can't write out this section until we've set all the
+      // section names, and we don't set the names of compressed
+      // output sections until relocations are complete.  FIXME: With
+      // the current names we use, this is unnecessary.
+      os->set_after_input_sections();
+    }
 
   Output_section_data* posd = new Output_data_strtab(&this->namepool_);
   os->add_output_section_data(posd);