Skip to content

Commit b1b3b16

Browse files
openeuler-ci-botgitee-org
authored andcommitted
!208 [BOLT] Fix instrumentation fail for aarch64 kernel5.10
From: @polaris_jiang Reviewed-by: @eastB233 Signed-off-by: @eastB233
2 parents 7ab04d7 + 4fa57bf commit b1b3b16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bolt/lib/Rewrite/LinuxKernelRewriter.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,11 @@ Error LinuxKernelRewriter::readStaticCalls() {
10491049
"no section matching __start_static_call_sites");
10501050

10511051
StaticCallSection = *ErrorOrSection;
1052-
if (!StaticCallSection->containsAddress(Stop->getAddress() - 1))
1052+
// In order to support kernels of different versions and architechures(such as
1053+
// aarch64 linux kernel5.10), we allow the address of the start and stop to be
1054+
// same.
1055+
if (!StaticCallSection->containsAddress(Stop->getAddress() - 1) &&
1056+
StaticCallTableAddress != Stop->getAddress())
10531057
return createStringError(errc::executable_format_error,
10541058
"__stop_static_call_sites not in the same section "
10551059
"as __start_static_call_sites");

0 commit comments

Comments
 (0)