]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gold/
authorCary Coutant <ccoutant@google.com>
Mon, 15 Apr 2013 16:40:59 +0000 (16:40 +0000)
committerCary Coutant <ccoutant@google.com>
Mon, 15 Apr 2013 16:40:59 +0000 (16:40 +0000)
* layout.cc (Layout::set_relocatable_section_offsets): Don't
allocate space in file for BSS sections.

gold/ChangeLog
gold/layout.cc

index 595c017b607d3d128311d4c6a98adf4968fc6521..64aedfdd7e93ffc12d00a8b3a2d983e0c68a74de 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-15  Cary Coutant  <ccoutant@google.com>
+
+       * layout.cc (Layout::set_relocatable_section_offsets): Don't
+       allocate space in file for BSS sections.
+
 2013-04-15  Cary Coutant  <ccoutant@google.com>
 
        * script-sections.cc (Orphan_output_section): Reset address
index 8b88deaa43ddb42be4738fdf0de1b32c143cee9f..f2dc6da1913e6901e2bfb87286516995743c2bc5 100644 (file)
@@ -3594,7 +3594,8 @@ Layout::set_relocatable_section_offsets(Output_data* file_header,
        (*p)->set_address(0);
       (*p)->set_file_offset(off);
       (*p)->finalize_data_size();
-      off += (*p)->data_size();
+      if ((*p)->type() != elfcpp::SHT_NOBITS)
+       off += (*p)->data_size();
 
       (*p)->set_out_shndx(*pshndx);
       ++*pshndx;