diff options
author | Denis Nikitin <denik@chromium.org> | 2023-08-25 00:27:43 -0700 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-09-01 15:58:17 +0900 |
commit | 1ef061a4e2648f23ab9bd996a7656675933f1c1f (patch) | |
tree | e08acd21b7639e2b26f77f814f3f8a525033c0e3 /scripts | |
parent | 151aeca2179290fb9eb63bb3ee60c47fffd86c5e (diff) |
modpost: Skip .llvm.call-graph-profile section check
.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>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 9761f9d0eec0..34a5386d444a 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -762,6 +762,7 @@ static const char *const section_white_list[] = ".fmt_slot*", /* EZchip */ ".gnu.lto*", ".discard.*", + ".llvm.call-graph-profile", /* call graph */ NULL }; |