1 Star 0 Fork 44

xujialing/kpatch

forked from src-openEuler/kpatch 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0006-create-diff-object-don-t-create-dynamic-reloc-for-sy.patch 958 Bytes
一键复制 编辑 原始数据 按行查看 历史
谢志鹏 提交于 2020-09-12 05:45 . code optimization
From 30446d9a1a65c8369a54844d471c2aeb4c9139dd Mon Sep 17 00:00:00 2001
From: Zhipeng Xie <xiezhipeng1@huawei.com>
Date: Fri, 2 Nov 2018 17:24:58 +0000
Subject: [PATCH 06/23] create-diff-object: don't create dynamic reloc for
symbol exported by patch itself
when a patch export a new function, ___kcrctab+xxx has a reloc,
use origin reloc to get right symbol version.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
---
kpatch-build/create-diff-object.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
index 3681adb..ba2976b 100644
--- a/kpatch-build/create-diff-object.c
+++ b/kpatch-build/create-diff-object.c
@@ -3056,6 +3056,9 @@ static void kpatch_create_intermediate_sections(struct kpatch_elf *kelf,
if (!strcmp(sym_objname, "vmlinux"))
continue;
+ if (!strcmp(sym_objname, objname))
+ continue;
+
external = 1;
}
}
--
2.18.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sticky-rice-wine/kpatch.git
git@gitee.com:sticky-rice-wine/kpatch.git
sticky-rice-wine
kpatch
kpatch
master

搜索帮助