Michel Lind de7e84
From 66da21b27722a6e1550cfd3a0c846e68f01d5bdc Mon Sep 17 00:00:00 2001
Michel Lind de7e84
From: Song Liu <song@kernel.org>
Michel Lind de7e84
Date: Wed, 22 Jan 2025 13:17:35 -0800
Michel Lind de7e84
Subject: [PATCH 105/118] arm64: Skip offset check in kpatch_bundle_symbols
Michel Lind de7e84
Michel Lind de7e84
Set expected_offset for AARCH64 directly to sym->sym.st_value, so the
Michel Lind de7e84
test is skipped.
Michel Lind de7e84
Michel Lind de7e84
Signed-off-by: Song Liu <song@kernel.org>
Michel Lind de7e84
---
Michel Lind de7e84
 kpatch-build/create-diff-object.c | 2 ++
Michel Lind de7e84
 1 file changed, 2 insertions(+)
Michel Lind de7e84
Michel Lind de7e84
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
Michel Lind de7e84
index e62880b..16cc1a1 100644
Michel Lind de7e84
--- a/kpatch-build/create-diff-object.c
Michel Lind de7e84
+++ b/kpatch-build/create-diff-object.c
Michel Lind de7e84
@@ -267,6 +267,8 @@ static void kpatch_bundle_symbols(struct kpatch_elf *kelf)
Michel Lind de7e84
 				expected_offset = sym->pfx->sym.st_size;
Michel Lind de7e84
 			else if (is_gcc6_localentry_bundled_sym(kelf, sym))
Michel Lind de7e84
 				expected_offset = 8;
Michel Lind de7e84
+			else if (kelf->arch == AARCH64)
Michel Lind de7e84
+				expected_offset = (unsigned int)sym->sym.st_value;
Michel Lind de7e84
 			else
Michel Lind de7e84
 				expected_offset = 0;
Michel Lind de7e84
 
Michel Lind de7e84
-- 
Michel Lind de7e84
2.48.1
Michel Lind de7e84