backport patch to fix kpatch-build failure
backport patch to fix following error: "ERROR: util.o: find_local_syms: 185: found duplicate matches for util.c" Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
This commit is contained in:
parent
e92734a7fb
commit
9f6655b06e
30
0028-Fix-sym-type-condition-in-locals_match.patch
Normal file
30
0028-Fix-sym-type-condition-in-locals_match.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 4d8c8102de49534bd538bb20319680ce1f1ff9ef Mon Sep 17 00:00:00 2001
|
||||||
|
From: Artem Savkov <asavkov@redhat.com>
|
||||||
|
Date: Thu, 3 Feb 2022 11:59:24 +0100
|
||||||
|
Subject: [PATCH] Fix sym->type condition in locals_match()
|
||||||
|
|
||||||
|
Second loop in locals_match() checks table_sym->type instead of
|
||||||
|
sym->type.
|
||||||
|
|
||||||
|
Fixes: 7207687 Switch to per-file lookup table pointers.
|
||||||
|
Signed-off-by: Artem Savkov <asavkov@redhat.com>
|
||||||
|
---
|
||||||
|
kpatch-build/lookup.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c
|
||||||
|
index 0323c61..06f4b38 100644
|
||||||
|
--- a/kpatch-build/lookup.c
|
||||||
|
+++ b/kpatch-build/lookup.c
|
||||||
|
@@ -131,7 +131,7 @@ static bool locals_match(struct lookup_table *table, int idx,
|
||||||
|
break;
|
||||||
|
if (sym->bind != STB_LOCAL)
|
||||||
|
continue;
|
||||||
|
- if (sym->type != STT_FUNC && table_sym->type != STT_OBJECT)
|
||||||
|
+ if (sym->type != STT_FUNC && sym->type != STT_OBJECT)
|
||||||
|
continue;
|
||||||
|
/*
|
||||||
|
* Symbols which get discarded at link time are missing from
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
Name: kpatch
|
Name: kpatch
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 0.9.5
|
Version: 0.9.5
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: A Linux dynamic kernel patching infrastructure
|
Summary: A Linux dynamic kernel patching infrastructure
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -40,6 +40,7 @@ Patch0024:0024-kpatch-build-support-CROSS_COMPILE.patch
|
|||||||
Patch0025:0025-create-diff-object-update-for-__already_done.patch
|
Patch0025:0025-create-diff-object-update-for-__already_done.patch
|
||||||
Patch0026:0026-kpatch-build-Add-missing-allocation-failure-checks.patch
|
Patch0026:0026-kpatch-build-Add-missing-allocation-failure-checks.patch
|
||||||
Patch0027:0027-create-diff-object-add-support-for-.retpoline_sites-.patch
|
Patch0027:0027-create-diff-object-add-support-for-.retpoline_sites-.patch
|
||||||
|
Patch0028:0028-Fix-sym-type-condition-in-locals_match.patch
|
||||||
|
|
||||||
BuildRequires: gcc elfutils-libelf-devel kernel-devel git
|
BuildRequires: gcc elfutils-libelf-devel kernel-devel git
|
||||||
Requires: bc make gcc patch bison flex openssl-devel
|
Requires: bc make gcc patch bison flex openssl-devel
|
||||||
@ -100,6 +101,12 @@ popd
|
|||||||
%{_mandir}/man1/*.1.gz
|
%{_mandir}/man1/*.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Feb 6 2022 Zhipeng Xie<xiezhipeng1@huawei.com> -1:0.9.5-4
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix "ERROR: util.o: find_local_syms: 185: found duplicate matches for util.c"
|
||||||
|
|
||||||
* Wed Jan 26 2022 Zhipeng Xie<xiezhipeng1@huawei.com> -1:0.9.5-3
|
* Wed Jan 26 2022 Zhipeng Xie<xiezhipeng1@huawei.com> -1:0.9.5-3
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user