From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 9105A3857C64 for ; Sat, 29 Aug 2020 16:33:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9105A3857C64 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 5BDC730278CD; Sat, 29 Aug 2020 18:33:36 +0200 (CEST) Received: by librem (Postfix, from userid 1000) id CD341C1781; Sat, 29 Aug 2020 18:32:53 +0200 (CEST) Date: Sat, 29 Aug 2020 18:32:53 +0200 From: Mark Wielaard To: "H.J. Lu" Cc: GCC Patches , Jakub Jelinek , Binutils Subject: Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC) Message-ID: <20200829163253.GC3051@wildebeest.org> References: <20200824125658.22526-1-mark@klomp.org> <20200824125658.22526-6-mark@klomp.org> <20200826213729.GG3062@wildebeest.org> <20200829122337.GA3051@wildebeest.org> <20200829152312.GB3051@wildebeest.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Aug 2020 16:33:38 -0000 Hi, On Sat, Aug 29, 2020 at 08:43:30AM -0700, H.J. Lu wrote: > On Sat, Aug 29, 2020 at 8:23 AM Mark Wielaard wrote: > > My proposal, and what my strawman patch implements, is that gas will > > generate a .debug_line section when -g is given and the debug types is > > DWARF (just as it does now). Unless there is a non-empty .debug_line > > section already created by the input assembly and the input assembly > > does not contain any .loc directive then gas will not try to generate > > a .debug_line section itself but leaves the non-empty .debug_line as > > is (currently gas will generate an error in this case). But if the > > input assembly does contain both .loc directives and creates a > > non-empty .debug line section gas will still generate an error (as it > > does now, whether or not the input assembly contains any .loc > > directives). > > > > Does this sound sane? > > What if there is a .file directive, but without .loc directive, like > > $ gcc -c x.c -Wa,-g That situation does not change, since in that case no .debug_* sections are generated in the assembly file, so gas will generate everything it currently generates. Cheers, Mark