From a3103a7c54e680dbc20e4cd034a3aaaff63b3c16 Mon Sep 17 00:00:00 2001 From: Wardenjohn Date: Fri, 6 Sep 2024 06:58:36 +0000 Subject: [PATCH] (bugfix)kpatch_check_relocation: out-of-range relocation --- .../0001-support-aarch64-under-0.9.9.patch | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/patches/0001-support-aarch64-under-0.9.9.patch b/patches/0001-support-aarch64-under-0.9.9.patch index ab2415a..1c6278c 100644 --- a/patches/0001-support-aarch64-under-0.9.9.patch +++ b/patches/0001-support-aarch64-under-0.9.9.patch @@ -1,6 +1,6 @@ -From 48fc4560fc5916f18172c09d72131d80453c8162 Mon Sep 17 00:00:00 2001 -From: "zhangyongde.zyd" -Date: Mon, 22 Apr 2024 11:56:19 +0800 +From 58c2796fdca6bbd7e8849970baf5535d361f4814 Mon Sep 17 00:00:00 2001 +From: Wardenjohn +Date: Fri, 6 Sep 2024 06:41:27 +0000 Subject: [PATCH] support aarch64 under 0.9.9 @@ -19,7 +19,7 @@ index bebf3cd..a36c50f 100644 endif diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c -index ec929c1..94ff1a2 100644 +index 25710e9..fb49fd9 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -180,6 +180,8 @@ static bool is_gcc6_localentry_bundled_sym(struct kpatch_elf *kelf, @@ -31,7 +31,7 @@ index ec929c1..94ff1a2 100644 default: ERROR("unsupported arch"); } -@@ -3967,6 +3969,14 @@ static void kpatch_find_func_profiling_calls(struct kpatch_elf *kelf) +@@ -3965,6 +3967,14 @@ static void kpatch_find_func_profiling_calls(struct kpatch_elf *kelf) } } break; @@ -47,10 +47,10 @@ index ec929c1..94ff1a2 100644 rela = list_first_entry(&sym->sec->rela->relas, struct rela, list); diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build -index c58e35e..ad58092 100755 +index dc80c42..3fe2438 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build -@@ -368,6 +368,47 @@ clang_version_check() { +@@ -339,6 +339,47 @@ clang_version_check() { return } @@ -98,7 +98,7 @@ index c58e35e..ad58092 100755 find_special_section_data() { local -A check -@@ -388,6 +429,10 @@ find_special_section_data() { +@@ -359,6 +400,10 @@ find_special_section_data() { "s390x") check[a]=true # alt_instr ;; @@ -110,7 +110,7 @@ index c58e35e..ad58092 100755 # Kernel CONFIG_ features diff --git a/kpatch-build/kpatch-elf.c b/kpatch-build/kpatch-elf.c -index 374d424..ea429d2 100644 +index 374d424..44dc2cc 100644 --- a/kpatch-build/kpatch-elf.c +++ b/kpatch-build/kpatch-elf.c @@ -142,6 +142,8 @@ unsigned int absolute_rela_type(struct kpatch_elf *kelf) @@ -130,8 +130,8 @@ index 374d424..ea429d2 100644 + } + else{ ERROR("unhandled rela type %d", rela->type); -+ break; + } ++ break; + case AARCH64: + add_off = 0; break; @@ -160,5 +160,5 @@ index e32209b..834c1ad 100644 struct kpatch_elf { -- -1.8.3.1 +2.39.3 -- Gitee