linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Nikitin <denik@chromium.org>
To: linux-kbuild@vger.kernel.org
Cc: denik@chromium.org, Fangrui Song <maskray@google.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>, Tom Rix <trix@redhat.com>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: [PATCH v2] modpost: Skip .llvm.call-graph-profile section check
Date: Tue, 22 Aug 2023 10:48:34 -0700	[thread overview]
Message-ID: <20230822174835.253469-1-denik@chromium.org> (raw)
In-Reply-To: <20230822065256.163660-1-denik@chromium.org>

.llvm.call-graph-profile section is added by clang when the kernel is
built with profiles (e.g. -fprofile-sample-use= or -fprofile-use=).

The section contains edge information derived from text sections,
so .llvm.call-graph-profile itself doesn't need more analysis as
the text sections have been analyzed.

This change fixes the kernel build with clang and a sample profile
which currently fails with:

"FATAL: modpost: Please add code to calculate addend for this architecture"

Signed-off-by: Denis Nikitin <denik@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
---
 scripts/mod/modpost.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index b29b29707f10..64bd13f7199c 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -761,6 +761,7 @@ static const char *const section_white_list[] =
 	".fmt_slot*",			/* EZchip */
 	".gnu.lto*",
 	".discard.*",
+	".llvm.call-graph-profile",	/* call graph */
 	NULL
 };
 
-- 
2.42.0.rc1.204.g551eb34607-goog


  parent reply	other threads:[~2023-08-22 17:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22  6:52 [PATCH] modpost: Skip .llvm.call-graph-profile section check Denis Nikitin
2023-08-22  7:05 ` Fangrui Song
2023-08-22 17:17   ` Denis Nikitin
2023-08-22 15:47 ` Nick Desaulniers
2023-08-22 17:21   ` Denis Nikitin
2023-08-22 17:48 ` Denis Nikitin [this message]
2023-08-22 17:51   ` [PATCH v2] " Fangrui Song
2023-08-23 23:01     ` Masahiro Yamada
2023-08-23 23:12       ` Denis Nikitin
2023-08-23 23:54         ` Fangrui Song
2023-08-24 23:09           ` Masahiro Yamada
2023-08-25  6:42             ` Denis Nikitin
2023-08-24  1:34         ` Masahiro Yamada
2023-08-24  6:13           ` Fangrui Song
2023-08-25  7:27 ` [PATCH v3] " Denis Nikitin
2023-08-29 13:17   ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230822174835.253469-1-denik@chromium.org \
    --to=denik@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=masahiroy@kernel.org \
    --cc=maskray@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).