aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2013-04-15 16:40:59 +0000
committerCary Coutant <ccoutant@google.com>2013-04-15 16:40:59 +0000
commite79c84aa33d03bd43404565f5b98c78a8f98ab95 (patch)
treeb86d21b28783572ea3096fb5e03f4154dad13fd7 /gold/layout.cc
parent2199fbe773f0795a92afb9a2383b463ccd936008 (diff)
downloadgdb-e79c84aa33d03bd43404565f5b98c78a8f98ab95.zip
gdb-e79c84aa33d03bd43404565f5b98c78a8f98ab95.tar.gz
gdb-e79c84aa33d03bd43404565f5b98c78a8f98ab95.tar.bz2
gold/
* layout.cc (Layout::set_relocatable_section_offsets): Don't allocate space in file for BSS sections.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc3
1 files changed, 2 insertions, 1 deletions
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;