Skip to content

Commit 1ef061a

Browse files
Denis Nikitinmasahir0y
authored andcommitted
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>
1 parent 151aeca commit 1ef061a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/mod/modpost.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ static const char *const section_white_list[] =
762762
".fmt_slot*", /* EZchip */
763763
".gnu.lto*",
764764
".discard.*",
765+
".llvm.call-graph-profile", /* call graph */
765766
NULL
766767
};
767768

0 commit comments

Comments
 (0)