2023-01-30 16:10:43 +08:00
|
|
|
From d122635200d5c9d7e6efa59745efe2e796a7f9ff Mon Sep 17 00:00:00 2001
|
2021-11-16 12:10:06 +08:00
|
|
|
From: Zhipeng Xie <xiezhipeng1@huawei.com>
|
|
|
|
|
Date: Thu, 12 Mar 2020 05:10:55 -0400
|
2023-01-30 16:10:43 +08:00
|
|
|
Subject: [PATCH 20/37] use original reloc for symbols exported from modules
|
2021-11-16 12:10:06 +08:00
|
|
|
|
|
|
|
|
symbols exported in a patch will generate a symbol version with
|
|
|
|
|
object module name in Module.symvers, but the symbol is actually
|
|
|
|
|
in patch module which cause livepatch symbol lookup failed.
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
|
|
|
|
|
---
|
|
|
|
|
kpatch-build/create-diff-object.c | 8 +-------
|
|
|
|
|
1 file changed, 1 insertion(+), 7 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
|
2023-01-30 16:10:43 +08:00
|
|
|
index c90b30a..deddde9 100644
|
2021-11-16 12:10:06 +08:00
|
|
|
--- a/kpatch-build/create-diff-object.c
|
|
|
|
|
+++ b/kpatch-build/create-diff-object.c
|
2023-01-30 16:10:43 +08:00
|
|
|
@@ -3388,13 +3388,7 @@ static bool need_dynrela(struct kpatch_elf *kelf, struct lookup_table *table,
|
2021-11-16 12:10:06 +08:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- /*
|
|
|
|
|
- * The symbol is exported by the to-be-patched module, or by
|
|
|
|
|
- * another module which the patched module depends on. Use a
|
|
|
|
|
- * dynrela because of late module loading: the patch module may
|
|
|
|
|
- * be loaded before the to-be-patched (or other) module.
|
|
|
|
|
- */
|
|
|
|
|
- return true;
|
|
|
|
|
+ return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (symbol.global) {
|
|
|
|
|
--
|
2023-01-30 16:10:43 +08:00
|
|
|
2.33.0
|
2021-11-16 12:10:06 +08:00
|
|
|
|