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=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable 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 B619DC433DB for ; Sat, 6 Feb 2021 15:03:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F60364EBF for ; Sat, 6 Feb 2021 15:03:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbhBFPDK convert rfc822-to-8bit (ORCPT ); Sat, 6 Feb 2021 10:03:10 -0500 Received: from wildebeest.demon.nl ([212.238.236.112]:45684 "EHLO gnu.wildebeest.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbhBFPC4 (ORCPT ); Sat, 6 Feb 2021 10:02:56 -0500 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 1996F30278CD; Sat, 6 Feb 2021 16:02:09 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id BEDE64000987; Sat, 6 Feb 2021 16:02:09 +0100 (CET) Message-ID: <642ceee8911e201438068f39f828af9f52cbb6a0.camel@klomp.org> Subject: Re: [PATCH v9 1/3] vmlinux.lds.h: add DWARF v5 sections From: Mark Wielaard To: Nick Desaulniers , 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 , Arvind Sankar , Chris Murphy , stable@vger.kernel.org, Chris Murphy , Nathan Chancellor Date: Sat, 06 Feb 2021 16:02:09 +0100 In-Reply-To: <20210205202220.2748551-2-ndesaulniers@google.com> References: <20210205202220.2748551-1-ndesaulniers@google.com> <20210205202220.2748551-2-ndesaulniers@google.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nick, On Fri, 2021-02-05 at 12:22 -0800, Nick Desaulniers wrote: > We expect toolchains to produce these new debug info sections as part of > DWARF v5. Add explicit placements to prevent the linker warnings from > --orphan-section=warn. > > Compilers may produce such sections with explicit -gdwarf-5, or based on > the implicit default version of DWARF when -g is used via DEBUG_INFO. > This implicit default changes over time, and has changed to DWARF v5 > with GCC 11. > > .debug_sup was mentioned in review, but without compilers producing it > today, let's wait to add it until it becomes necessary. I don't think that will be necessary. .debug_sup is for Dwarf Supplemental file producers like dwz. Those would run after the linker. > Cc: stable@vger.kernel.org > Link: https://bugzilla.redhat.com/show_bug.cgi?id=1922707 > Reported-by: Chris Murphy > Suggested-by: Fangrui Song > Reviewed-by: Nathan Chancellor > Tested-by: Sedat Dilek > Signed-off-by: Nick Desaulniers > --- > include/asm-generic/vmlinux.lds.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h > index 34b7e0d2346c..1e7cde4bd3f9 100644 > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -842,8 +842,13 @@ > /* DWARF 4 */ \ > .debug_types 0 : { *(.debug_types) } \ > /* DWARF 5 */ \ > + .debug_addr 0 : { *(.debug_addr) } \ > + .debug_line_str 0 : { *(.debug_line_str) } \ > + .debug_loclists 0 : { *(.debug_loclists) } \ > .debug_macro 0 : { *(.debug_macro) } \ > - .debug_addr 0 : { *(.debug_addr) } > + .debug_names 0 : { *(.debug_names) } \ > + .debug_rnglists 0 : { *(.debug_rnglists) } \ > + .debug_str_offsets 0 : { *(.debug_str_offsets) } > > /* Stabs debugging sections. */ > #define STABS_DEBUG \ Looks good to me. Cheers, Mark