All of lore.kernel.org
 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>,
	Douglas Anderson <dianders@chromium.org>,
	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 v3] modpost: Skip .llvm.call-graph-profile section check
Date: Fri, 25 Aug 2023 00:27:43 -0700	[thread overview]
Message-ID: <20230825072744.1322656-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=).
Note that .llvm.call-graph-profile intentionally uses REL relocations
to decrease the object size, for more details see
https://reviews.llvm.org/D104080.

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>
Reviewed-by: Fangrui Song <maskray@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-25  7:27 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 ` [PATCH v2] " Denis Nikitin
2023-08-22 17:51   ` 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 ` Denis Nikitin [this message]
2023-08-29 13:17   ` [PATCH v3] " 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=20230825072744.1322656-1-denik@chromium.org \
    --to=denik@chromium.org \
    --cc=dianders@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.