diff options
author | Cary Coutant <ccoutant@google.com> | 2013-04-15 16:40:59 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2013-04-15 16:40:59 +0000 |
commit | cd2eafbac5c7b7717b7b1175bc03b100b4bc598c (patch) | |
tree | 45eebb60c16e8ffdf2f1f5d2fa3a893cb30a3bee /gold | |
parent | ba4854cdde75a7aaeca25c858c2f2801a9ff5a8c (diff) | |
download | binutils-redhat-cd2eafbac5c7b7717b7b1175bc03b100b4bc598c.tar.gz |
gold/
* layout.cc (Layout::set_relocatable_section_offsets): Don't
allocate space in file for BSS sections.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/layout.cc | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 595c017b60..64aedfdd7e 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,10 @@ 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 to zero after each orphaned section for relocatable links. diff --git a/gold/layout.cc b/gold/layout.cc index 8b88deaa43..f2dc6da191 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; |