|
|
Log in / Subscribe / Register

Kbuild: DWARF v5 support

From:  Nick Desaulniers <ndesaulniers-AT-google.com>
To:  Masahiro Yamada <masahiroy-AT-kernel.org>
Subject:  [PATCH v2 0/4] Kbuild: DWARF v5 support
Date:  Tue, 03 Nov 2020 16:53:39 -0800
Message-ID:  <20201104005343.4192504-1-ndesaulniers@google.com>
Cc:  Jakub Jelinek <jakub-AT-redhat.com>, Linux Kbuild mailing list <linux-kbuild-AT-vger.kernel.org>, Linux Kernel Mailing List <linux-kernel-AT-vger.kernel.org>, linux-toolchains-AT-vger.kernel.org, clang-built-linux <clang-built-linux-AT-googlegroups.com>, Fangrui Song <maskray-AT-google.com>, Nathan Chancellor <natechancellor-AT-gmail.com>, Sedat Dilek <sedat.dilek-AT-gmail.com>, Dmitry Golovin <dima-AT-golovin.in>, Alistair Delva <adelva-AT-google.com>, Nick Desaulniers <ndesaulniers-AT-google.com>
Archive-link:  Article

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 fixup already sent, but necessary for trying to use
LLVM_IAS=1 with ToT LLVM.
https://lore.kernel.org/stable/20201103012358.168682-1-ma...

Patches 2 and 3 are cleanups that lay the ground work and aren't DWARF
v5 specific. In particular, I would like to see Patch 2 sent to stable
so that Android and CrOS can move to LLVM_IAS=1 ASAP.

Patch 4 implements Kconfig and Kbuild support for DWARFv5.

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.

Fangrui Song (1):
  x86_64: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S

Nick Desaulniers (3):
  Kbuild: do not emit debug info for assembly with LLVM_IAS=1
  Kbuild: make DWARF version a choice
  Kbuild: implement support for DWARF v5

 Makefile                          | 13 +++++++++----
 arch/x86/lib/memcpy_64.S          |  4 +---
 arch/x86/lib/memmove_64.S         |  4 +---
 arch/x86/lib/memset_64.S          |  4 +---
 include/asm-generic/vmlinux.lds.h |  6 +++++-
 lib/Kconfig.debug                 | 27 +++++++++++++++++++++++----
 scripts/test_dwarf5_support.sh    |  9 +++++++++
 7 files changed, 49 insertions(+), 18 deletions(-)
 create mode 100755 scripts/test_dwarf5_support.sh

-- 
2.29.1.341.ge80a0c044ae-goog



Copyright © 2020, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds