From: Nick Desaulniers <firstname.lastname@example.org>
To: Masahiro Yamada <email@example.com>
Cc: Nathan Chancellor <firstname.lastname@example.org>,
Andrew Morton <email@example.com>,
Sedat Dilek <firstname.lastname@example.org>,
Jakub Jelinek <email@example.com>,
Fangrui Song <firstname.lastname@example.org>,
Caroline Tice <email@example.com>,
Nick Clifton <firstname.lastname@example.org>, Yonghong Song <email@example.com>,
Jiri Olsa <firstname.lastname@example.org>, Andrii Nakryiko <email@example.com>,
Arnaldo Carvalho de Melo <firstname.lastname@example.org>,
Arvind Sankar <email@example.com>,
Nick Desaulniers <firstname.lastname@example.org>
Subject: [PATCH v7 0/2] Kbuild: DWARF v5 support
Date: Fri, 29 Jan 2021 16:43:59 -0800 [thread overview]
Message-ID: <email@example.com> (raw)
DWARF v5 is the latest standard of the DWARF debug info format.
DWARF5 wins significantly in terms of size and especially so when mixed
with compression (CONFIG_DEBUG_INFO_COMPRESSED).
Patch 1 is a cleanup that lays the ground work and isn't DWARF
Patch 2 implements Kconfig and Kbuild support for DWARFv5.
Changes from v6:
* Reorder sections from linker script to match order from BFD's internal
* Add .debug_names section, as per Fangrui.
* Drop CONFIG_DEBUG_INFO_DWARF2. Patch 0001 becomes a menu with 1
choice. GCC's implicit default version of DWARF has been DWARF v4
* Modify the test script to check for the presence of
* Drop the clang without integrated assembler block in
0002. Bumps the version requirement for GAS to 2.35.2, which isn't
released yet (but should be released soon). Folks looking to test
with clang but without the integrated assembler should fetch
binutils-gdb, build it from source, add a symlink to
binutils-gdb/gas/as-new to binutils-gdb/gas/as, then prefix
binutils-gdb/gas/as to their $PATH when building the kernel.
Changes from v5:
* Drop previous patch 1, it has been accepted into kbuild:
* Trying to set -Wa,-gdwarf-4 in the earlier patch was the source of
additional complexity. Drop it that part of the patch. We can revisit
clang without the integrated assembler setting -Wa,-gdwarf-4 later.
That is a separate problem from generally supporting DWARF v5.
* Rework the final patch for clang without the integrated assembler.
-Wa,-gdwarf-5 is required for DWARF5 in that case otherwise GAS will
not accept the assembler directives clang produces from C code when
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
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.
Nick Desaulniers (2):
Kbuild: make DWARF version a choice
Kbuild: implement support for DWARF v5
Makefile | 6 +++---
include/asm-generic/vmlinux.lds.h | 7 +++++-
lib/Kconfig.debug | 36 +++++++++++++++++++++++++------
scripts/test_dwarf5_support.sh | 8 +++++++
4 files changed, 47 insertions(+), 10 deletions(-)
create mode 100755 scripts/test_dwarf5_support.sh
next reply other threads:[~2021-01-30 1:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-30 0:43 Nick Desaulniers [this message]
2021-01-30 0:44 ` [PATCH v7 1/2] Kbuild: make DWARF version a choice Nick Desaulniers
2021-01-30 1:52 ` Nathan Chancellor
2021-02-03 22:23 ` Masahiro Yamada
2021-02-03 22:25 ` Masahiro Yamada
2021-02-03 23:16 ` Nick Desaulniers
2021-02-04 0:29 ` Masahiro Yamada
2021-02-04 6:15 ` Nick Desaulniers
2021-02-04 3:32 ` Fangrui Song
2021-02-04 6:08 ` Nick Desaulniers
2021-02-04 6:13 ` Nick Desaulniers
2021-02-04 10:39 ` Mark Wielaard
2021-02-04 19:18 ` Nick Desaulniers
2021-02-04 19:56 ` Mark Wielaard
2021-02-04 20:04 ` Nick Desaulniers
2021-02-04 20:28 ` Mark Wielaard
2021-02-04 22:06 ` Nick Desaulniers
2021-02-04 22:36 ` Fangrui Song
2021-02-05 12:49 ` Mark Wielaard
2021-02-05 21:18 ` Nick Desaulniers
2021-02-06 15:11 ` Mark Wielaard
2021-01-30 0:44 ` [PATCH v7 2/2] Kbuild: implement support for DWARF v5 Nick Desaulniers
2021-01-30 1:53 ` Nathan Chancellor
2021-01-30 23:10 ` Sedat Dilek
2021-01-30 23:39 ` Sedat Dilek
2021-01-31 0:37 ` Fāng-ruì Sòng
2021-01-31 0:39 ` Sedat Dilek
2021-02-03 23:06 ` Masahiro Yamada
2021-02-03 23:27 ` Nick Desaulniers
2021-02-04 0:33 ` Masahiro Yamada
2021-02-03 23:36 ` Jakub Jelinek
2021-02-04 0:33 ` Masahiro Yamada
2021-01-30 23:59 ` [PATCH v7 0/2] Kbuild: DWARF v5 support Sedat Dilek
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).