Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4314637pxu; Tue, 1 Dec 2020 01:42:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJrj0XNHpWU6ZEWPPPmH8Qq58V3MfDr2XpPSkCC76KH1SYmWlp96YV+7OnbsqvexfTb9/k X-Received: by 2002:a17:907:3e23:: with SMTP id hp35mr2203981ejc.254.1606815766217; Tue, 01 Dec 2020 01:42:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606815766; cv=none; d=google.com; s=arc-20160816; b=l+ZDeXSDHdCDV0qZlXHZZD8BmhmLxSUQBVcVDtuurg0jV31g2eVreuUsQzQDJ6hGTB tDbJNRZkhLBgz0JVi0eOIl3/5JpzRcF11oUaute6GGoJK4sDaLI1kg3DNRO389COudo1 aGa+RMfnNTYZuoaajxF3HJSUsa2m9xBmqpdZt7YgVzO6ObbMvsEqz29e2sjgfYFzRUXM bh+fKB+v7H7O4YmH20+CC6iBaOBmDvXyLZ6vLDpfzc2TbfTg/yKZj+//XrXyTim9DoU+ eCazkJY/JEKm3RplBPHk+vpzExVuX12rAjSRSDhcCHi7ANcIEXHl6vKwv9lKHA9HBHqj XjRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=NcNA6crElTucJZvZkYkJKPPJfOy4GA5d15Lf9zppfW4=; b=bTUeOUTQmZPkz1G65nvoMiYaG1PkfdsZdmV1MdNWBuapZtE3CWTH9HQUhUe/yjmFS4 ipQhQl75SEWrvlJ6S9O4jvyoyQVr/vneynL7QlMOw2huK3pMR/ogPJ88SdP5eVAGvmhE X/UfjPXsLGU9X8g9Co7xR2hyFwOxCKfdLK84KPqbmOA7934NHcqeW0Fj3VE1O70ARdHl 8Hd9UjqIibZHnvgg51fDhwT8schtuXszrzsJn9Gocvsztrwu9BdvE6szMajMeTkdCnZy 1I8PyfHQQsguNEBu6zN4vQpkMKqnlNKb4nkZp9WgxDkdDlKP6viT8nphoP84sXG9XwC6 2PUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a27si685688edb.498.2020.12.01.01.42.23; Tue, 01 Dec 2020 01:42:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727256AbgLAJiy (ORCPT + 99 others); Tue, 1 Dec 2020 04:38:54 -0500 Received: from gate.crashing.org ([63.228.1.57]:50576 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbgLAJix (ORCPT ); Tue, 1 Dec 2020 04:38:53 -0500 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 0B19WsYY019369; Tue, 1 Dec 2020 03:32:54 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 0B19Wrls019366; Tue, 1 Dec 2020 03:32:53 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 1 Dec 2020 03:32:53 -0600 From: Segher Boessenkool To: Masahiro Yamada Cc: =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= , Nick Desaulniers , Jakub Jelinek , Linux Kbuild mailing list , Linux Kernel Mailing List , linux-toolchains@vger.kernel.org, clang-built-linux , Nathan Chancellor , Sedat Dilek , Dmitry Golovin , Alistair Delva Subject: Re: [PATCH v2 3/4] Kbuild: make DWARF version a choice Message-ID: <20201201093253.GJ2672@gate.crashing.org> References: <20201104005343.4192504-1-ndesaulniers@google.com> <20201104005343.4192504-4-ndesaulniers@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 01, 2020 at 12:38:16PM +0900, Masahiro Yamada wrote: > > We can bump -Wa,-gdwarf-2 to -Wa,-gdwarf-3 since GNU actually emits > > DWARF v3 DW_AT_ranges (see > > https://sourceware.org/bugzilla/show_bug.cgi?id=26850 ) > > This can avoid the `warning: DWARF2 only supports one section per > > compilation unit` warning for Clang. That warning should be "there can be only one section with executable code per translation unit", or similar. > I am not a DWARF spec expert. Neither am I. > Please teach me. > > In my understanding, "DWARF2 only supports one section ..." > is warned only when building .S files with LLVM_IAS=1 .S files are simply run through the C preprocessor first, and then given to the assembler. The only difference there should be wrt debug info is you could have some macros that expand to assembler debug statements. > If this is due to the limitation of DWARF v2, why is it OK to > build .c files with LLVM_IAS? The compiler can of course make sure not to use certain constructs in its generated assembler code, while the assembler will have to swallow whatever the user wrote. Segher