Merge pull request #301 from jpoimboe/debug-seg-fault

create-diff-object: fix for unincluded sec->secsym
This commit is contained in:
Seth Jennings 2014-07-14 08:51:05 -05:00
commit 60efcbd63e

View File

@ -1134,6 +1134,9 @@ void kpatch_migrate_included_elements(struct kpatch_elf *kelf, struct kpatch_elf
list_del(&sec->list);
list_add_tail(&sec->list, &out->sections);
sec->index = 0;
if (!is_rela_section(sec) && sec->secsym && !sec->secsym->include)
/* break link to non-included section symbol */
sec->secsym = NULL;
}
/* migrate included symbols from kelf to out */