create-diff-object: fix the condition for the sections changed

The create-diff-object.c create intermediate ".kpatch.relocations"
sections instead of ".kpatch.dynrelas" sections, and add a new
section ".rela.kpatch.symbols", so we should update the conditions
in function kpatch_create_intermediate_sections for these changed.

Fixes: 87643703a7 ("create-diff-object: create .kpatch.relocations and .kpatch.symbols sections")

Signed-off-by: chenzefeng <chenzefeng2@huawei.com>
This commit is contained in:
chenzefeng 2019-05-09 15:49:31 +08:00
parent 19c7564242
commit b6e19c7795

View File

@ -2748,7 +2748,8 @@ static void kpatch_create_intermediate_sections(struct kpatch_elf *kelf,
if (!is_rela_section(sec)) if (!is_rela_section(sec))
continue; continue;
if (!strcmp(sec->name, ".rela.kpatch.funcs") || if (!strcmp(sec->name, ".rela.kpatch.funcs") ||
!strcmp(sec->name, ".rela.kpatch.dynrelas")) !strcmp(sec->name, ".rela.kpatch.relocations") ||
!strcmp(sec->name, ".rela.kpatch.symbols"))
continue; continue;
list_for_each_entry_safe(rela, safe, &sec->relas, list) { list_for_each_entry_safe(rela, safe, &sec->relas, list) {
if (!rela->need_dynrela) if (!rela->need_dynrela)