1 Star 0 Fork 44

zhangxianting/kpatch

forked from src-openEuler/kpatch 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
huawei-ignore-initcall5-section-to-adapt-6.6-kernel.patch 949 Bytes
一键复制 编辑 原始数据 按行查看 历史
From bad5b93c1fa85cc4b71533284064fd0af1bab464 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Fri, 24 May 2024 14:45:55 +0800
Subject: [PATCH] ignore initcall5 section to adapt 6.6 kernel
---
kpatch-build/create-diff-object.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
index f1dfc1d..4c029ae 100644
--- a/kpatch-build/create-diff-object.c
+++ b/kpatch-build/create-diff-object.c
@@ -2035,8 +2035,12 @@ static void kpatch_include_force_elements(struct kpatch_elf *kelf)
int kpatch_include_new_static_var(struct kpatch_elf *kelf)
{
struct symbol *sym;
+ char *initcall_prefix = "__initcall__kmod";
list_for_each_entry(sym, &kelf->symbols, list) {
+ if (strncmp(sym->name, initcall_prefix, strlen(initcall_prefix)) == 0) {
+ continue;
+ }
if (sym->status == NEW &&
sym->bind == STB_LOCAL &&
(sym->type == STT_OBJECT ||
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangxianting/kpatch.git
git@gitee.com:zhangxianting/kpatch.git
zhangxianting
kpatch
kpatch
master

搜索帮助