Merge pull request #114 from spartacus06/reject-init-changes

fail if init section has changed
This commit is contained in:
Seth Jennings 2014-04-10 16:12:12 -05:00
commit dd204989e6

View File

@ -497,13 +497,19 @@ void kpatch_compare_correlated_section(struct section *sec)
if (sec1->sh.sh_size != sec2->sh.sh_size ||
sec1->data->d_size != sec2->data->d_size) {
sec->status = CHANGED;
return;
goto out;
}
if (is_rela_section(sec))
kpatch_compare_correlated_rela_section(sec);
else
kpatch_compare_correlated_nonrela_section(sec);
out:
if (sec->status == CHANGED) {
log_debug("section %s has changed\n", sec->name);
if (!strcmp(sec->name, ".init.text"))
DIFF_FATAL("init section has changed");
}
}
void kpatch_compare_sections(struct table *table)