Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp287661pxb; Fri, 15 Jan 2021 13:08:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQ+XHA6Cem+yxsnrNi2zZpUARBxRRD3ZssJGPDo7HBbR+RoIQZJQPDpLx33ekEvQNPzExn X-Received: by 2002:a17:906:4a19:: with SMTP id w25mr9942203eju.153.1610744895845; Fri, 15 Jan 2021 13:08:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610744895; cv=none; d=google.com; s=arc-20160816; b=TXCiAmEOi+4ZDPh63rRNiq1ceEIYn3yAAq/u4K1dlj443HkKKD39a3uvsvmxYEOvMv hSx+xFa/htx6Sc6s5pwVdXqVuNWFsLit8NjiBjcnnsblYGuvH9gHMmJt+guLdARx4Oiy 709p9n8IPNdtxjkBd518WOR9VLLQwkd1pAffuUurIFdwYG4olc7WcWvxAcflp6/rJfPK csBZAHJ6luUVlHF3Cyk5g6JGTlxe2L9UpADXrjKzFQg1PtcASy2QMrTTC6zdvsZK2ZwT +bHu/7OjUWIR+zytdtwlRbz1j6jnqOeNN2nWYkhCFoVjTgzToe5Ro3UlTWqMRfaIPZdO d4kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=ZbInGrM8DQpEvZpcv+BH44NrN/in7NktHoThO/+hjn0=; b=y4tR/KxMZNDLKNW/HXSBlYs3fdiH6nA696Hy8vMMyLsNwh0nrKHAF+A8X2gkYlkN/B 8yZ1wWj6JV8x3x8KVVnfO+TVpAyzYbStfnY5PQPX0Vnq5j6A9Rwh1WneKXPjopvwo38S w6PhH9SLPb6hVQc3x4ABk09VGwMy/b/CqWnM42OongC+z2KjWps3suQhNnIZUa8j2CuY xn3qjpkbg/I+m4MwEDD5zxqbIZ0v/+CzOgDIK56kiJItK0itAYapGxHIfK4O4dVwnV// TqE0rnBCOWcJG5fpByuSCZSe8SR5mTkp84uQQIjv3cindAr59POCL8Cx0XhLqFpeh/CW 2M4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fTf4GrnR; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si2464769ejx.640.2021.01.15.13.07.52; Fri, 15 Jan 2021 13:08:15 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=fTf4GrnR; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730842AbhAOVHD (ORCPT + 99 others); Fri, 15 Jan 2021 16:07:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728800AbhAOVHA (ORCPT ); Fri, 15 Jan 2021 16:07:00 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CE5BC0613D3 for ; Fri, 15 Jan 2021 13:06:20 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id p80so5847683ybg.10 for ; Fri, 15 Jan 2021 13:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=ZbInGrM8DQpEvZpcv+BH44NrN/in7NktHoThO/+hjn0=; b=fTf4GrnRn3rHcZiqqJ3n4RDpL4htAC4GKILeEvMx9YIwYeaCdF0u0YZFa65oByW2MJ vuebTsSmoY54pAF/stdeDILEdoVgV8y++f3KQ617fYgz9ufXJdX4v1clDE7VjOp3KnZp Gpyzcpd300ndhov7N5kjnC+sr7nlXpM3k3wqes+fD0R9Da14q0KdxH/FN3xLAdIhiK1y VkZdjPmq7AZ9m0yF3+Me+HN1A5UsShNPWWrHn3RPhY7UyUs7YA+mgaOE/hrPsQ3c88AA EUVGL5n4F4wF2sv6YxNNtJ8pTdoqUmeUEwWrINqlCsn/NTunNo0d8b2RvtbH5ScxlTGP z1iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=ZbInGrM8DQpEvZpcv+BH44NrN/in7NktHoThO/+hjn0=; b=rLd5R/Z5gCA1JTrGv6HCIr5L0GKEaoOomwFBcmLopEx6CV9h/9/nKCTaFcBszceMom L8aR0VdRDGEQwVAvXaBh1n0tD2LD8B7qLFsh3qi4RAvtdk2t55sWhBy4MuzFneJwYRWN 3B24PcR12YF+twA/+/t5nvd8dEz4wz6w1Xs/Pe2LVEqkbhIM1LME2qZiDMSBwj7QIYCl T+cP3c3whMn32zoyBw5HdS5PQmajKBSEaKk2Ix/7gGVtzIU2t2EW+Wg+KsjCdR1raE1o iLuEh7PE9awl/3J7PJ8nm3Mwiuh8/Qgy8Y68XCD84albAzvd38WTrwYy4eMmlUB3w5Hi OPXA== X-Gm-Message-State: AOAM533w7OLDrojPFjADKJYPefe3n5Ef3dV9EYKYrecbdajnG5CUxXNW OOUW0uzNJRCFxABOa6PPsVAUME4G3dDv6BPVABk= Sender: "ndesaulniers via sendgmr" X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:f693:9fff:fef4:4d25]) (user=ndesaulniers job=sendgmr) by 2002:a25:ef47:: with SMTP id w7mr19625123ybm.509.1610744779507; Fri, 15 Jan 2021 13:06:19 -0800 (PST) Date: Fri, 15 Jan 2021 13:06:13 -0800 Message-Id: <20210115210616.404156-1-ndesaulniers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog Subject: [PATCH v5 0/3] Kbuild: DWARF v5 support From: Nick Desaulniers To: Masahiro Yamada Cc: Nathan Chancellor , Andrew Morton , Sedat Dilek , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, Jakub Jelinek , Fangrui Song , Caroline Tice , Nick Clifton , Yonghong Song , Jiri Olsa , Andrii Nakryiko , Arnaldo Carvalho de Melo , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DWARF v5 is the latest standard of the DWARF debug info format. DWARF5 wins significantly in terms of size when mixed with compression (CONFIG_DEBUG_INFO_COMPRESSED). Link: http://www.dwarfstd.org/doc/DWARF5.pdf Patch 1 is a cleanup from Masahiro and isn't DWARF v5 specific. Patch 2 is a cleanup that lays the ground work and isn't DWARF v5 specific. Patch 3 implements Kconfig and Kbuild support for DWARFv5. Changes from v4: * drop set -e from script as per Nathan. * add dependency on !CONFIG_DEBUG_INFO_BTF for DWARF v5 as per Sedat. * Move LLVM_IAS=1 complexity from patch 2 to patch 3 as per Arvind and Masahiro. Sorry it took me a few tries to understand the point (I might still not), but it looks much cleaner this way. Sorry Nathan, I did not carry forward your previous reviews as a result, but I would appreciate if you could look again. * Add Nathan's reviewed by tag to patch 1. * Reword commit message for patch 3 to mention LLVM_IAS=1 and -gdwarf-5 binutils addition later, and BTF issue. * I still happen to see a pahole related error spew for the combination of: * LLVM=1 * LLVM_IAS=1 * CONFIG_DEBUG_INFO_DWARF4 * CONFIG_DEBUG_INFO_BTF Though they're non-fatal to the build. I'm not sure yet why removing any one of the above prevents the warning spew. Maybe we'll need a v6. Changes from v3: Changes as per Arvind: * only add -Wa,-gdwarf-5 for (LLVM=1|CC=clang)+LLVM_IAS=0 builds. * add -gdwarf-5 to Kconfig shell script. * only run Kconfig shell script for Clang. Apologies to Sedat and Nathan; I appreciate previous testing/review, but I did no carry forward your Tested-by and Reviewed-by tags, as the patches have changed too much IMO. Changes from v2: * Drop two of the earlier patches that have been accepted already. * Add measurements with GCC 10.2 to commit message. * Update help text as per Arvind with help from Caroline. * Improve case/wording between DWARF Versions as per Masahiro. Changes from the RFC: * split patch in 3 patch series, include Fangrui's patch, too. * prefer `DWARF vX` format, as per Fangrui. * use spaces between assignment in Makefile as per Masahiro. * simplify setting dwarf-version-y as per Masahiro. * indent `prompt` in Kconfig change as per Masahiro. * remove explicit default in Kconfig as per Masahiro. * add comments to test_dwarf5_support.sh. * change echo in test_dwarf5_support.sh as per Masahiro. * remove -u from test_dwarf5_support.sh as per Masahiro. * add a -gdwarf-5 cc-option check to Kconfig as per Jakub. *** BLURB HERE *** Masahiro Yamada (1): Remove $(cc-option,-gdwarf-4) dependency from CONFIG_DEBUG_INFO_DWARF4 Nick Desaulniers (2): Kbuild: make DWARF version a choice Kbuild: implement support for DWARF v5 Makefile | 13 +++++++--- include/asm-generic/vmlinux.lds.h | 6 ++++- lib/Kconfig.debug | 42 +++++++++++++++++++++++++------ scripts/test_dwarf5_support.sh | 8 ++++++ 4 files changed, 57 insertions(+), 12 deletions(-) create mode 100755 scripts/test_dwarf5_support.sh -- 2.30.0.284.gd98b1dd5eaa7-goog