From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 603AEC64E7A for ; Tue, 1 Dec 2020 09:39:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09D942067D for ; Tue, 1 Dec 2020 09:39:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727368AbgLAJiy (ORCPT ); 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