From: Cary Coutant Date: Mon, 15 Apr 2013 16:40:59 +0000 (+0000) Subject: gold/ X-Git-Tag: cygwin-64bit-premerge~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e79c84aa33d03bd43404565f5b98c78a8f98ab95;p=external%2Fbinutils.git gold/ * layout.cc (Layout::set_relocatable_section_offsets): Don't allocate space in file for BSS sections. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 595c017..64aedfd 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,10 @@ 2013-04-15 Cary Coutant + * layout.cc (Layout::set_relocatable_section_offsets): Don't + allocate space in file for BSS sections. + +2013-04-15 Cary Coutant + * script-sections.cc (Orphan_output_section): Reset address to zero after each orphaned section for relocatable links. diff --git a/gold/layout.cc b/gold/layout.cc index 8b88dea..f2dc6da 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -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;