代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/kpatch 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d95dfac91b76cb524e0382132ce2f0ac3a288a5a Mon Sep 17 00:00:00 2001
From: Zhipeng Xie <xiezhipeng1@huawei.com>
Date: Tue, 25 Feb 2020 22:44:50 -0500
Subject: [PATCH 05/38] create-diff-object: new static var should be included
Before this patch, only global variables(no referenced) will be
included by kpatch-build. But some macros put some static varibles
in the object file, and no function references it, so they won't
be included by kpatch-build. Because they are changed, the kpatch
will report an error.
This patch includes all new static variables, and this method won't
cause a problem even the new static variables are in unbundled section.
Signed-off-by: Zhou Chengming <zhouchengming1@huawei.com>
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
---
kpatch-build/create-diff-object.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
index f7b59f0..20d9d8f 100644
--- a/kpatch-build/create-diff-object.c
+++ b/kpatch-build/create-diff-object.c
@@ -1928,6 +1928,21 @@ static void kpatch_include_force_elements(struct kpatch_elf *kelf)
sym->include = 0;
}
+int kpatch_include_new_static_var(struct kpatch_elf *kelf)
+{
+ struct symbol *sym;
+
+ list_for_each_entry(sym, &kelf->symbols, list) {
+ if (sym->status == NEW &&
+ sym->bind == STB_LOCAL &&
+ (sym->type == STT_OBJECT ||
+ (sym->type == STT_NOTYPE && sym->name[0] != '$')))
+ kpatch_include_symbol(sym);
+ }
+
+ return 0;
+}
+
static int kpatch_include_new_globals(struct kpatch_elf *kelf)
{
struct symbol *sym;
@@ -4137,6 +4152,7 @@ int main(int argc, char *argv[])
callbacks_exist = kpatch_include_callback_elements(kelf_patched);
kpatch_include_force_elements(kelf_patched);
new_globals_exist = kpatch_include_new_globals(kelf_patched);
+ kpatch_include_new_static_var(kelf_patched);
kpatch_include_debug_sections(kelf_patched);
kpatch_process_special_sections(kelf_patched, lookup);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。