Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2766518pxb; Sat, 6 Feb 2021 07:07:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4Hu8pXbFstAWpyz2cq1kRVymBterTtM4IItvzzGM4dD8135S2eAsKCwdi/LcDQ+IB6hIQ X-Received: by 2002:a17:906:55c5:: with SMTP id z5mr9307761ejp.275.1612624023536; Sat, 06 Feb 2021 07:07:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612624023; cv=none; d=google.com; s=arc-20160816; b=Bejg09JRTFPn6HcqruRkRrw70WqBHe62+IE0nEmzIfYlMh1eVCUZ6VOVnsK6tTwLjA TmbR48liwioXfid3VMVbU5Iu6r6RP+KBlEdelpYGLSJ0i9DIYAdoScse3mdT52Fd8ffB hCQ7QbbcbKcpSbhcpDmKzkQwDGF45LQP+6bHqT57q1vEwNVhBMEkKoWIyqiv2I1tRj3G 3FrxOrpSu94uVhSEJZN57eo2XzTU0uUmfcD3FMgiahY8uJv8iDGRgj5aMhmgkGVQLvQU agj1yoDwjFvhRXgNlEJ3YBEpCdCPVCSmgTFf9o79Ne/8VABuYrCKD91RJ8rtf/WnlsD9 4iHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=lcrYHDclE9dDLzdCMXASx/1y+GDf8M6dXmtv9Fx0rng=; b=RxXGE4Xn2QitvAHvYs9bHz53uKa1/ZpaUfyGa25CovnS8q5iE0jWyx2A50KqgzBlN7 5SpPYRQxPpB7kIFwhnsEQR9qQR73X2mzJaQtNgsyJN8KE1uHHkOfoIaiP+ozHaouAzbL /99DRKSXvT/EDEv2ciMpZ9iDxOvRoh+NR56cVmPNNg29N0TEQyqMsA+3MGQVsgLgAP5F xiYURZ8zSrcLENVQvP/s6qnc4f2zn0BwPHzSI018aslL8UzV79W/vhGeeOJL0LYhX8ue xJFkluIEhEFEhbJK10ohv2KY4bGuBMczhPiuxRzgpXIdUzs3vF4fCobU1J1Teay3QlVJ 7h2Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si4093312edy.511.2021.02.06.07.06.14; Sat, 06 Feb 2021 07:07:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230063AbhBFPDB convert rfc822-to-8bit (ORCPT + 99 others); Sat, 6 Feb 2021 10:03:01 -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 X-Spam-Flag: NO X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on gnu.wildebeest.org 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