1 Star 0 Fork 44

hanxinke/kpatch

forked from src-openEuler/kpatch 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0022-use-original-reloc-for-symbols-exported-from-modules.patch 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
谢志鹏 提交于 2021-11-16 12:10 . rebase from upstream v0.9.5
From b841186b9f8ced6a78953c0c109138f9aef7a53a Mon Sep 17 00:00:00 2001
From: Zhipeng Xie <xiezhipeng1@huawei.com>
Date: Thu, 12 Mar 2020 05:10:55 -0400
Subject: [PATCH 22/24] 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 | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
index aa5c5c4..59d491d 100644
--- a/kpatch-build/create-diff-object.c
+++ b/kpatch-build/create-diff-object.c
@@ -3317,13 +3317,7 @@ static bool need_dynrela(struct lookup_table *table, struct section *sec, const
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) {
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hanxinke/kpatch.git
git@gitee.com:hanxinke/kpatch.git
hanxinke
kpatch
kpatch
master

搜索帮助