32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
From dc771a1789ea3769777228f792f0902f8b0566ba Mon Sep 17 00:00:00 2001
|
|
From: Zhipeng Xie <xiezhipeng1@huawei.com>
|
|
Date: Thu, 22 Nov 2018 21:06:32 +0000
|
|
Subject: [PATCH] kpatch-build: include secsym in kpatch_mark_ignored_sections
|
|
|
|
kpatch_mark_ignored_sections include .rodata.str1.1 section but does
|
|
not include its section symbol, causing its section symbol can not be
|
|
included any more in kpatch_include_standard_elements. After the
|
|
section symbol is freed in kpatch_elf_teardown, we got a segmentation
|
|
fault in kpatch_create_intermediate_sections.
|
|
|
|
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
|
|
---
|
|
kpatch-build/create-diff-object.c | 1 +
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
|
|
index 2e54960..97ae0d4 100644
|
|
--- a/kpatch-build/create-diff-object.c
|
|
+++ b/kpatch-build/create-diff-object.c
|
|
@@ -2285,6 +2285,7 @@ static void kpatch_mark_ignored_sections(struct kpatch_elf *kelf)
|
|
* from the section data comparison, but this is a simpler way.
|
|
*/
|
|
strsec->include = 1;
|
|
+ strsec->secsym->include = 1;
|
|
name = strsec->data->d_buf + rela->addend;
|
|
ignoresec = find_section_by_name(&kelf->sections, name);
|
|
if (!ignoresec)
|
|
--
|
|
1.7.5.4
|
|
|