Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1790693rwb; Fri, 23 Sep 2022 19:33:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6epCFWEPB9q0SHhG1o51x/Rns8tC4d1JKyZNt/ocXzd0kKOkZZ3ZCcdNgeyWsRrC6nh7rd X-Received: by 2002:a17:90b:1bc7:b0:200:7f05:3c2 with SMTP id oa7-20020a17090b1bc700b002007f0503c2mr24292950pjb.95.1663986831490; Fri, 23 Sep 2022 19:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663986831; cv=none; d=google.com; s=arc-20160816; b=KyDXVZ+QOB6Gqvn+R8xZWkhLqAiewHh+17Sn8xDnTBYMv+R5Th0kq1EYUWmPycnDPP 6+/3YOt0u6J7f7QMQJu9eIGKl1MNxXBu+ZT3RpGOi0jPyb87X1q7H0l54yIoWMqi6jxf /Orjlo0meRn4axi+5yRly9blBtguY9EUNTZnMuDccH9B2c/uyn3WTpBeiXLmDXE0u3Hw tRkdICUGiZ589i0j0/XnOlyZv4LhWiLwbtST845Xc8Ol+rxdGeUR90lLsm1/W/cjGQPd TZZB2MGjeH6bTy/Spge4QX9euRHwcaXEWGbN3u17x7HY/WUz0esUlB/wf6zeldMzEEds zTIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OqGIr83avsKieKKHgb8l4/PvPv6lvnyXb0Oxt5Keb0M=; b=rcxvcEi5pF6r9HgBXFpPymz/MKr0N4ZJd5TNYA7WataR/1SclH+NYCCCY3x9qmpMnc fOMIVTns8NHlDsRLQYlfxlja4uDpEnGKY094P7zdp0h17MgPzaZyqbR/I9lt/5i6OZkA lnLe3bhnc8wVdV726q1vLln6HqFk/slUg2QdSYFIUTOreylxvbSaEHhRPl4nYcglQnpL R8a5am1K8OpsIvCp963EXn4UC4Rr4dVN6+koSfMIxTInMasV7chey6USE+6NjxPaqo+0 RnjIxd22wtV5qTgNA/RYpT1207zchcn1dqkJ6MeOd0yHTi0IGqbCvJ4k36KG37AFdbOz Yurw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QQ2mfUv7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q128-20020a634386000000b0043c674ac980si2123934pga.248.2022.09.23.19.33.37; Fri, 23 Sep 2022 19:33:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=QQ2mfUv7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233194AbiIXCUW (ORCPT + 99 others); Fri, 23 Sep 2022 22:20:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233088AbiIXCUS (ORCPT ); Fri, 23 Sep 2022 22:20:18 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBEA579A57 for ; Fri, 23 Sep 2022 19:20:15 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 3so1809142pga.1 for ; Fri, 23 Sep 2022 19:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=OqGIr83avsKieKKHgb8l4/PvPv6lvnyXb0Oxt5Keb0M=; b=QQ2mfUv7p7UJJ/wu8hdvLQLwax8cFTF5n3JslE8afwFsUqYiwWTNLPOeahX66KI2xU pDfYguqdCC25fWFqX2NyI3GapDMuvIx7JnjqNeg5p7nERCDN8qqACmMANbPZvfLbno6d Mv0d3NK+8Rfsq2ZbmkjIAB8CdE5ZKYkis64UD7ZU05IeWUCpOE0LmsJWNC7hxvOnsdiE /79BRdEO43VapKsi/VjSkpTtPEWap2sP+h/UjmdXxhZ8bwpswhbzCPh1cBSfXew0yzZm gIiYt10YcviacZxs3sT+HrJNhaypCeeqjN2z6FpaAfXnvaL7YtYTk1SgGadaY7NGE8YG Tyiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=OqGIr83avsKieKKHgb8l4/PvPv6lvnyXb0Oxt5Keb0M=; b=5kU2LwqTOAyI6LlEY9e8UqUYISi/7jLoMk8C3gm+UOk5uUVQWGg/VqW3UF8Rg8rw7E r1PLDQKa+v9QdBdHKKExbmexkJ8MGyaSvQ6d8Y+iLwtgJ7yO6aKeEHkZOv6xWCTt3RxQ mn49vhK1MPHg474jTDI2sZXX+0E3A7TwtKbyO12osKheRWioDeoAqd2esZ53lj/aPBcs 98/XT+cdIeg9ULBHUVnWz793WuqFoAxisZHKL6Y07a5aEikTY6T6TlqYr3PxnLFdClpi mM7JJz8JWXu6Y+hYv5JQxFn5u9HdcWjbb3qhEwj2cjv4MtwrB2IveEyMQOxsbpusdQ7m xulw== X-Gm-Message-State: ACrzQf3mIV8ZKSSKVz+xTEf9Qvy8ShvsHGoriBDLVx+VyQaLFXrXbdYS XrpSsaNdBgYxjtbHFR1EOVxxp2f9HMDCxNYNCDD+UQ== X-Received: by 2002:a63:e709:0:b0:438:98e8:d1c with SMTP id b9-20020a63e709000000b0043898e80d1cmr10283997pgi.403.1663986014944; Fri, 23 Sep 2022 19:20:14 -0700 (PDT) MIME-Version: 1.0 References: <20220919174547.3730737-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 23 Sep 2022 19:20:03 -0700 Message-ID: Subject: Re: [PATCH v4] Makefile.debug: re-enable debug info for .S files To: Masahiro Yamada Cc: Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , clang-built-linux , Bill Wendling , Greg Thelen , Alexey Alexandrov , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 23, 2022 at 7:12 PM Masahiro Yamada wrote: > > This patch still misses the debug info for *.S files > for the combination of LLVM_IAS=0 and > CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y > because, as the comment says, Clang does not pass -g down to GAS. > > > With "[v4] Makefile.debug: set -g unconditional on CONFIG_DEBUG_INFO_SPLIT" > and this one applied, > > > > $ grep CONFIG_DEBUG_INFO_DWARF .config > CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y > # CONFIG_DEBUG_INFO_DWARF4 is not set > # CONFIG_DEBUG_INFO_DWARF5 is not set > $ make LLVM=1 LLVM_IAS=0 arch/x86/kernel/irqflags.o > SYNC include/config/auto.conf.cmd > SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h > SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h > SYSTBL arch/x86/include/generated/asm/syscalls_64.h > HOSTCC arch/x86/tools/relocs_32.o > [snip] > AS arch/x86/kernel/irqflags.o > $ objdump -h arch/x86/kernel/irqflags.o | grep debug > $ > > > > > > > > > I think the following fix-up is needed on top. > > > > > diff --git a/scripts/Makefile.debug b/scripts/Makefile.debug > index d6aecd78b942..8cf1cb22dd93 100644 > --- a/scripts/Makefile.debug > +++ b/scripts/Makefile.debug > @@ -1,4 +1,5 @@ > -DEBUG_CFLAGS := -g > +DEBUG_CFLAGS := > +debug-flags-y := -g > > ifdef CONFIG_DEBUG_INFO_SPLIT > DEBUG_CFLAGS += -gsplit-dwarf > > > > > Then, I can see the debug sections. > > > > $ make LLVM=1 LLVM_IAS=0 arch/x86/kernel/irqflags.o > CALL scripts/checksyscalls.sh > DESCEND objtool > AS arch/x86/kernel/irqflags.o > $ objdump -h arch/x86/kernel/irqflags.o | grep debug > 6 .debug_line 00000050 0000000000000000 0000000000000000 0000008f 2**0 > 7 .debug_info 0000002e 0000000000000000 0000000000000000 000000f8 2**0 > 8 .debug_abbrev 00000014 0000000000000000 0000000000000000 000001d0 2**0 > 9 .debug_aranges 00000030 0000000000000000 0000000000000000 000001f0 2**4 > 10 .debug_str 0000004d 0000000000000000 0000000000000000 00000250 2**0 > > > > > > If you agree, I can locally fix it up as such. Ah, sorry I missed testing that combination. Thanks for your thoroughness. Yes please apply that diff on top. -- Thanks, ~Nick Desaulniers