Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2239411pxb; Fri, 5 Feb 2021 12:26:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIuOeqOXA7xHMYgNvPVtdjMoUV+QU8RkyEXXe99JcupLPlnHe9erCY0H+86X0qBHFBhCUQ X-Received: by 2002:a17:906:c0cd:: with SMTP id bn13mr5453564ejb.368.1612556780290; Fri, 05 Feb 2021 12:26:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612556780; cv=none; d=google.com; s=arc-20160816; b=YoAemmyqcqON9CnmhtCnbI8sMRpXLRu99QJuvpoS0OnP93YDhnXz1jKBVbxkOuQvUa gJLWIknBCiiI/G83k5yuHrFHl5ei8igryxJpvemq/masHlQhNLOvDHm1fGIbWYXDwc4a y1MWBxLN2kTnttR7dFbL3n0+yvvaANCYg/IVHrGXCyCVShD0x103XM/GD+CG8Qpqm6J4 zMQTgA3K+ojN+UthwzBuhff0Us88DlzjcHvSf3RmMaXHXI5zaFx/4DhRAjen+FtiZ+s3 xPlMrEomvPjMaSGsQ7p/3UXEL53z87++DeU7Ix7dHA1PLBDj65phpIOvgY9NCxh+BMYO R8qQ== 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:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=zaz82GgJfGxiQg+lhL31nJxKpSeV5QcLPOrAgs8tROs=; b=WJ6FtCeKSLue6zmfK6XF3XgsSbsfAY44GifPVw6EAtS4iOXioTBXeikwjyKiB2CvRz dJA+N2G10LUEwbWrLCvL6ANMkWWyN48GL5lB8J8F5sFJraSwoqj5H3aV1J0jy6K404c1 IgPODv/biJs+mGcL94rUjg7SyuewXlk+2K0/k7pA+PUe7MXb8gCcxK/8hTD5ehJy2N06 8XSJVLd3WZ1S/XzSecM8S4vwnuWhvLwt4JeE/G4psBd4epNYjnokgtxc7cKOJdIr4TTR 73Bo2Q3V2YV0zQ7/zMLJYSVJmvBbIhF6ql9su+LC0msMO6QEcqNfsSKAfia9g/jqQDVJ 2IPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=E64YiaWh; 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 kj10si5998312ejc.166.2021.02.05.12.25.54; Fri, 05 Feb 2021 12:26:20 -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=E64YiaWh; 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 S231612AbhBESmw (ORCPT + 99 others); Fri, 5 Feb 2021 13:42:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233255AbhBESks (ORCPT ); Fri, 5 Feb 2021 13:40:48 -0500 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB409C061788 for ; Fri, 5 Feb 2021 12:22:32 -0800 (PST) Received: by mail-qt1-x84a.google.com with SMTP id w3so6104187qti.17 for ; Fri, 05 Feb 2021 12:22:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=zaz82GgJfGxiQg+lhL31nJxKpSeV5QcLPOrAgs8tROs=; b=E64YiaWh0YrhD/Nh9gBWy61m5SYAKMBEziy2a7oe4vFhsErcZS4kKT8UGF13NzkgdE sCR9JFcwguGcQPJ6uVuxkRR5TBTXVxQv+uQwiL/7HdPqfdXoaotYT02v5IWS0xzH8B3S ZkRezuwiSUsa2R2TMS0C6kjhhL5KtU8Ck7DPmTfKfpx7T12on5/Y9qMy57za6Ey6iZFw MAZAVdqmHN6TaBa13Q1a/HmROQL0stytGDGVtChoWM1522uaopDdJUjdGIOVlHxNNFwc 1hyswOQIgZ8H2/iXwZlvQyuJAuHlf2rEVaIKH3nPL9n0yMSKOS5tPTKKi+4t7EOn+m3g cLJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=zaz82GgJfGxiQg+lhL31nJxKpSeV5QcLPOrAgs8tROs=; b=M6I/Fb7gILPqQCCvHXeWJ3lTRRYkrq6a7vGuqRlMaj5cMdeolOZeaAyPU25P9p8QKF ErSXMxsfJgd0aXo43QT9S7Txnibn8c+xGeJp84QpPwI49XwRTvoHiKtySqofO4vizmDo mXJZtZQ32WDZPSZiJ4tSnvr2W6W040ofGv8xpw32Q4cBZtCKAsjFSOPRu5HHcP4AjXVK D6bwwIBoMaZav7yEsReQsZCcBBZcFTiWCWW1Al+y2tXymfA06ompyvEMCp87bwOgBwSk HbhRSObCcfRagcjHellu4nRXCnoxjQk+qv3G8zx3wv97GWtPiLoyY1j2jl/ZBEffdMVI y5fQ== X-Gm-Message-State: AOAM531nyPcetFgFGsgS+kCaWkqhLqKPDqfBkWjTpeuRGpzxmEAKSuKA GHjE/jCZC8R5TNAQiu4fPOkXmsyP/YyaXaeELYw= Sender: "ndesaulniers via sendgmr" X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:fce9:1439:f67f:bf26]) (user=ndesaulniers job=sendgmr) by 2002:a05:6214:c8a:: with SMTP id r10mr6117500qvr.13.1612556551921; Fri, 05 Feb 2021 12:22:31 -0800 (PST) Date: Fri, 5 Feb 2021 12:22:18 -0800 In-Reply-To: <20210205202220.2748551-1-ndesaulniers@google.com> Message-Id: <20210205202220.2748551-2-ndesaulniers@google.com> Mime-Version: 1.0 References: <20210205202220.2748551-1-ndesaulniers@google.com> X-Mailer: git-send-email 2.30.0.365.g02bc693789-goog Subject: [PATCH v9 1/3] vmlinux.lds.h: add DWARF v5 sections 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 , Arvind Sankar , Chris Murphy , Mark Wielaard , Nick Desaulniers , stable@vger.kernel.org, Chris Murphy , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 \ -- 2.30.0.365.g02bc693789-goog