1 Star 0 Fork 44

zhangxianting/kpatch

forked from src-openEuler/kpatch 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0020-use-original-reloc-for-symbols-exported-from-modules.patch 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
HuBin95 提交于 2024-03-02 00:18 . kpatch: upgrade to 0.9.9
From 2cf99367ed7cdf4f0b2a929f6bddd7ef8c8a6441 Mon Sep 17 00:00:00 2001
From: Zhipeng Xie <xiezhipeng1@huawei.com>
Date: Thu, 12 Mar 2020 05:10:55 -0400
Subject: [PATCH 20/38] use original reloc for symbols exported from modules
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 | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
index 83836f6..2a3a5de 100644
--- a/kpatch-build/create-diff-object.c
+++ b/kpatch-build/create-diff-object.c
@@ -3533,14 +3533,7 @@ static bool need_klp_reloc(struct kpatch_elf *kelf, struct lookup_table *table,
return false;
}
- /*
- * The symbol is exported by the to-be-patched module, or by
- * another module which the patched module depends on. Use a
- * klp relocation 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) {
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangxianting/kpatch.git
git@gitee.com:zhangxianting/kpatch.git
zhangxianting
kpatch
kpatch
master

搜索帮助