process special sections after checking for changes

There's no need to process special sections if we're returning due to no
functions changing.

Also this means we don't have to deal with extra-special usage of the
.fixup section (here's looking at you arch/x86/lib/copy_user_64.S -- we
can't patch functions in .S files anyway).
This commit is contained in:
Josh Poimboeuf 2014-09-15 09:46:29 -05:00
parent 218011b268
commit ba7c905b3a

View File

@ -2753,11 +2753,9 @@ int main(int argc, char *argv[])
hooks_exist = kpatch_include_hook_elements(kelf_patched);
kpatch_include_force_elements(kelf_patched);
new_globals_exist = kpatch_include_new_globals(kelf_patched);
kpatch_process_special_sections(kelf_patched);
kpatch_print_changes(kelf_patched);
kpatch_dump_kelf(kelf_patched);
kpatch_verify_patchability(kelf_patched);
if (!num_changed && !new_globals_exist) {
if (hooks_exist)
@ -2768,6 +2766,9 @@ int main(int argc, char *argv[])
}
}
kpatch_process_special_sections(kelf_patched);
kpatch_verify_patchability(kelf_patched);
/* this is destructive to kelf_patched */
kpatch_migrate_included_elements(kelf_patched, &kelf_out);