[kpatch] [PATCH] bugfix: when include a special section, its secsym should also be included

zhouchengming zhouchengming1 at huawei.com
Fri Sep 18 01:51:38 UTC 2015


In function kpatch_create_dynamic_rela_sections, a special section's
secsym will be used, but it isn't included.
It will happen when a special section need dynamic relocation.

Signed-off-by: zhouchengming <zhouchengming1 at huawei.com>
---
 kpatch-build/create-diff-object.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
index c604bb0..36e06f4 100644
--- a/kpatch-build/create-diff-object.c
+++ b/kpatch-build/create-diff-object.c
@@ -1967,6 +1967,8 @@ void kpatch_regenerate_special_section(struct kpatch_elf *kelf,
 	/* include both rela and base sections */
 	sec->include = 1;
 	sec->base->include = 1;
+	if(sec->base->secsym)
+		sec->base->secsym->include = 1;
 	/*
 	 * Update text section data buf and size.
 	 *
-- 
1.7.7




More information about the kpatch mailing list