From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17907 invoked by alias); 19 Jan 2011 00:13:28 -0000 Received: (qmail 17897 invoked by uid 22791); 19 Jan 2011 00:13:27 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f176.google.com (HELO mail-qy0-f176.google.com) (209.85.216.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Jan 2011 00:13:23 +0000 Received: by qyk10 with SMTP id 10so238446qyk.0 for ; Tue, 18 Jan 2011 16:13:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.45.68 with SMTP id d4mr3775qaf.115.1295396001305; Tue, 18 Jan 2011 16:13:21 -0800 (PST) Received: by 10.220.190.137 with HTTP; Tue, 18 Jan 2011 16:13:21 -0800 (PST) In-Reply-To: <20110119000850.GZ11694@bubble.grove.modra.org> References: <20110118185733.GA16609@intel.com> <20110119000850.GZ11694@bubble.grove.modra.org> Date: Wed, 19 Jan 2011 00:13:00 -0000 Message-ID: Subject: Re: PATCH: PR gas/12409: --compress-debug-sections doesn't work on empty DWARF sections From: "H.J. Lu" To: Cary Coutant , binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00268.txt.bz2 On Tue, Jan 18, 2011 at 4:08 PM, Alan Modra wrote: > On Tue, Jan 18, 2011 at 03:54:32PM -0800, H.J. Lu wrote: >> Should I apply this patch? Since the compression header is 12 byte, >> if the section is smaller than 12 bytes, compressed section will be >> bigger. > > OK. =A0Perhaps a larger value would be even better? > >> diff --git a/gas/write.c b/gas/write.c >> index aabb96d..9e4d6f4 100644 >> --- a/gas/write.c >> +++ b/gas/write.c >> @@ -1359,7 +1359,7 @@ compress_debug (bfd *abfd, asection *sec, void *xx= x ATTRIB >> UTE_UNUSED) >> =A0 =A0flagword flags =3D bfd_get_section_flags (abfd, sec); >> >> =A0 =A0if (seginfo =3D=3D NULL >> - =A0 =A0 =A0|| sec->size =3D=3D 0 >> + =A0 =A0 =A0|| sec->size < 12 >> =A0 =A0 =A0 =A0|| (flags & (SEC_ALLOC | SEC_HAS_CONTENTS)) =3D=3D SEC_AL= LOC) >> =A0 =A0 =A0return; > How about 64? --=20 H.J.