This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] PR gold/18689: Building perf fails with ld: fatal error: No space left on device
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Cc: Cary Coutant <ccoutant at gmail dot com>
- Date: Thu, 16 Jul 2015 15:13:59 -0700
- Subject: [PATCH] PR gold/18689: Building perf fails with ld: fatal error: No space left on device
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
For relocatable link, we should clear the SHF_COMPRESSED flag bit from
input group section.
OK for trunk?
H.J.
--
PR gold/18689
* layout.cc (Layout::layout): Clear the SHF_COMPRESSED flag bit
from input group section for relocatable link.
---
gold/layout.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gold/layout.cc b/gold/layout.cc
index 142fd90..11d87ef 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -1160,8 +1160,14 @@ Layout::layout(Sized_relobj_file<size, big_endian>* object, unsigned int shndx,
if (parameters->options().relocatable()
&& (shdr.get_sh_flags() & elfcpp::SHF_GROUP) != 0)
{
+ // Some flags in the input section should not be automatically
+ // copied to the output section.
+ elfcpp::Elf_Xword flags = (shdr.get_sh_flags()
+ & ~ (elfcpp::SHF_COMPRESSED
+ | elfcpp::SHF_MERGE
+ | elfcpp::SHF_STRINGS));
name = this->namepool_.add(name, true, NULL);
- os = this->make_output_section(name, sh_type, shdr.get_sh_flags(),
+ os = this->make_output_section(name, sh_type, flags,
ORDER_INVALID, false);
}
else
--
2.4.3