This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR gold/18689: Building perf fails with ld: fatal error: No space left on device


On Thu, Jul 16, 2015 at 3:13 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> 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.

Wrong patch.  Here is the right one.

-- 
H.J.
From ead97c547231d9922ab332645dd7cb152f1c0dd3 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 16 Jul 2015 15:07:19 -0700
Subject: [PATCH] Clear SHF_COMPRESSED flag bit from input to output

For relocatable link, we should clear the SHF_COMPRESSED flag bit from
input group section.

	PR gold/18689
	* layout.cc (Layout::layout): Clear the SHF_COMPRESSED flag bit
	from input group section for relocatable link.
---
 gold/layout.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gold/layout.cc b/gold/layout.cc
index 142fd90..b454c10 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -1160,8 +1160,12 @@ 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);
       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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]