[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQKMC-G4AJbHafPF0ef74_YPtzXipcmnZY=1AWgayVoCA@mail.gmail.com>
Date: Tue, 29 Aug 2023 22:17:38 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Denis Nikitin <denik@...omium.org>
Cc: linux-kbuild@...r.kernel.org, Fangrui Song <maskray@...gle.com>,
Douglas Anderson <dianders@...omium.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>, Tom Rix <trix@...hat.com>,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH v3] modpost: Skip .llvm.call-graph-profile section check
On Mon, Aug 28, 2023 at 5:15 AM Denis Nikitin <denik@...omium.org> wrote:
>
> .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@...omium.org>
> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
> Reviewed-by: Fangrui Song <maskray@...gle.com>
> ---
Applied to linux-kbuild.
Thanks.
> 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
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists