From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22471 invoked by alias); 19 Jan 2011 00:22:07 -0000 Received: (qmail 22454 invoked by uid 22791); 19 Jan 2011 00:22:03 -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-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Jan 2011 00:21:58 +0000 Received: by qwa26 with SMTP id 26so235686qwa.0 for ; Tue, 18 Jan 2011 16:21:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.10.208 with SMTP id q16mr19747qaq.65.1295396516214; Tue, 18 Jan 2011 16:21:56 -0800 (PST) Received: by 10.220.190.137 with HTTP; Tue, 18 Jan 2011 16:21:56 -0800 (PST) In-Reply-To: References: <20110118185733.GA16609@intel.com> <20110119000850.GZ11694@bubble.grove.modra.org> Date: Wed, 19 Jan 2011 00:22: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/msg00269.txt.bz2 On Tue, Jan 18, 2011 at 4:13 PM, H.J. Lu wrote: > 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 *x= xx 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_A= LLOC) >>> =A0 =A0 =A0return; >> > > How about 64? > I will use 32. --=20 H.J.