Skip to content

Commit

Permalink
kpatch/LoongArch: short circuit for patchable sections
Browse files Browse the repository at this point in the history
Omit patchable sections compare processing, as we will rebuild it.

Signed-off-by: George Guo <[email protected]>
  • Loading branch information
georgejguo committed Nov 8, 2024
1 parent 06f87de commit 1f52740
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,11 @@ static void kpatch_compare_correlated_section(struct section *sec)
!is_text_section(sec1)))
DIFF_FATAL("%s section header details differ from %s", sec1->name, sec2->name);

/* Short circuit for mcount sections, we rebuild regardless */
/* Short circuit for mcount/patchable sections, we rebuild regardless */
if (!strcmp(sec->name, ".rela__mcount_loc") ||
!strcmp(sec->name, "__mcount_loc")) {
!strcmp(sec->name, "__mcount_loc") ||
!strcmp(sec->name, ".rela__patchable_function_entries") ||
!strcmp(sec->name, "__patchable_function_entries")) {
sec->status = SAME;
goto out;
}
Expand Down

0 comments on commit 1f52740

Please sign in to comment.