代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/kpatch 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 01214c9675eba980b44886e22478b7daff88c875 Mon Sep 17 00:00:00 2001
From: Zhipeng Xie <xiezhipeng1@huawei.com>
Date: Fri, 2 Nov 2018 17:25:38 +0000
Subject: [PATCH 21/38] create-diff-object: create dynamic relocs for changed
functions in this object
Currently, we only create dynamic relocs for changed functions of
other objects, but not this object. It will cause a problem like:
original: funcA and funcB (funcA calls funcB)
patch-1: funcA-1 and funcB-1 (funcA-1 calls funcB-1)
patch-2: funcB-2 (funcA-1 should call funcB-2)
But as we don't create dynamic relocs for funcA-1, it will call
funcB-1 directly (not by jumping from funcB). So the new funcB-2
will not get called. This patch will create dynamic relocs for
all the changed functions, including changed ones in this object.
Reported-by: Xie Zhipeng <xiezhipeng1@huawei.com>
Tested-by: Zhou Chengming <zhouchengming1@huawei.com>
Signed-off-by: Zhou Chengming <zhouchengming1@huawei.com>
Signed-off-by: Li Bin <huawei.libin@huawei.com>
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
---
kpatch-build/create-diff-object.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
index 2a3a5de..5bed3e2 100644
--- a/kpatch-build/create-diff-object.c
+++ b/kpatch-build/create-diff-object.c
@@ -3453,6 +3453,12 @@ static bool need_klp_reloc(struct kpatch_elf *kelf, struct lookup_table *table,
return false;
if (rela->sym->sec) {
+ if (rela->sym->type == STT_FUNC &&
+ rela->sym->status == CHANGED &&
+ rela->sym->sec != relasec->base &&
+ relasec->base->sym &&
+ relasec->base->sym->type == STT_FUNC)
+ return true;
/*
* Internal symbols usually don't need klp relocations, because
* they live in the patch module and can be relocated normally.
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。