[PATCH] PR gold/18689: Building perf fails with ld: fatal error: No space left on device
H.J. Lu
hongjiu.lu@intel.com
Thu Jul 16 22:14:00 GMT 2015
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
More information about the Binutils
mailing list