From patchwork Fri Feb 5 20:22:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 376968 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp2584823jah; Fri, 5 Feb 2021 12:27:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+GhGXn5yv2K1/N1a6G7s4ud6xWvurHtnYs+jdPTLJ01GmeN1it6VkCzqUvaS0vgL9mHjq X-Received: by 2002:aa7:d8c9:: with SMTP id k9mr5407579eds.366.1612556851773; Fri, 05 Feb 2021 12:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612556851; cv=none; d=google.com; s=arc-20160816; b=lDqRlgs0ZbeDNGeIWjkfVA8VxgBc/6eW1LRgZ7+eaOyFjND+ByEVpgdKaxUnv04IPi 3NtQ8mhPHb/sZbBKKcdZTU3kU5HGR3dnhJherouFn/+ElpbZlZIt181iP5L+zc1WcR63 knhYcdN2VTWrX7hj9826zjxSZHBI6/ngPTrCfi53tUamMd6/4nIzMQZiCu+viwH9d7d8 m4aU5DQVLqMFlrPph1OhBrXVrMUrsgWCBwp9zYZBOgV1G/4kEuHlvnhY+tMvHgXEJ8wq Oo+wV+ziMMOOYfF4Os/jd5TS2A/TY/TvflMbpIQ59sf6z10Py6Y+lSS1CRrosJs1AyBQ SAow== 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=MnwHeAR4bMHay5BCQx1BG+In8Oh91VCziY4iNBlWyh/WDPJlP0eQrTDo7MEZrqPc2P 6U88IxrlM3K4Jf6ma0znoy5ZwElqfppeLzbnJ/SbvNcE6qdLKEbx2ll/HAHPz7nWLEyM BjAxpHw10sOPdQHeEZR87ZIoEvi5iW8AHdEULdfmYbt+P4V467o2CQJezIc+d/n02RZD ++RIKw4d6WTGLdKSgaoi5GT7g25r6l/7YLkSnT7a20E4SD+B3lUUifIiIzspmcCQqosa C6qJX99db7aFU9sikZ7wpQ2CYj4V5SkslxNA5f7bfVqKMvsw5fC9+wTPvqzpailHYWNl 696g== 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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 l6si5562857eds.376.2021.02.05.12.27.31; Fri, 05 Feb 2021 12:27:31 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S233425AbhBESoN (ORCPT + 13 others); Fri, 5 Feb 2021 13:44:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233617AbhBESmB (ORCPT ); Fri, 5 Feb 2021 13:42:01 -0500 Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D557AC06178C for ; Fri, 5 Feb 2021 12:22:32 -0800 (PST) Received: by mail-qt1-x849.google.com with SMTP id j14so6158987qtv.3 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=HiDjOhDj+DrIKvT6JNssxhnLiXsQuPjrgkP568mHEYVUGGQhybCs63M1nBJgCcqWNC kbPMigma2JOcsT2/ibYv3rjzAVAkDR4m0HMG1+FwAWO8Qoehf1aGCMMDHcU+IrECNC4l 0LxtEEJMa1+iXVOiXAAhqxX4pP1g0WShDRMgEaw03o+2VU4xCApJryu9/0+ea7SnWsHA AKBc1RylLNgoBngLpAsNqaalVoWwU4iG7E2aGkhHWVYwVqC+HjAtJ3kLiiwKBMS+RAWa w62aFGQ+YKlxgnwncJSlhnUNd+yuoTd2hLqOYorvblqxykTTr2rOUGv6nk0zmHLsLq/1 JMBw== X-Gm-Message-State: AOAM53303LbOVo6lG4dk0PtgHc6n2jUCgDymgobiKLqXgFv/QlIYE3gk Wv6m8eFHioi/C+vzAt+4f6pm85WVSTrbycDSAo8= 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 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.30.0.365.g02bc693789-goog 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 \