mirror of
https://github.com/dynup/kpatch
synced 2025-05-07 10:27:55 +00:00
create-diff-object: ignore __patchable_function_entries
Kernel v6.2+ commit bea75b33895f ("x86/Kconfig: Introduce function padding") introduces the -fpatchable-function-entry=16,16 build flag on x86. This leverages compiler support for generating a __patchable_function_entries section similar to __mcount_loc. That said, x86 still utilizes __mcount_loc even when __patchable_function_entries exists. The latter point to the __pfx symbols, but the section is discarded in the vmlinux link and isn't used regardless, for ftrace or for any other purpose. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
parent
6b78bd5c67
commit
7d22fefa35
@ -2835,6 +2835,12 @@ static void kpatch_mark_ignored_sections(struct kpatch_elf *kelf)
|
|||||||
!strncmp(sec->name, ".llvm_addrsig", 13) ||
|
!strncmp(sec->name, ".llvm_addrsig", 13) ||
|
||||||
!strncmp(sec->name, ".llvm.", 6))
|
!strncmp(sec->name, ".llvm.", 6))
|
||||||
sec->ignore = 1;
|
sec->ignore = 1;
|
||||||
|
|
||||||
|
if (kelf->arch == X86_64) {
|
||||||
|
if (!strcmp(sec->name, ".rela__patchable_function_entries") ||
|
||||||
|
!strcmp(sec->name, "__patchable_function_entries"))
|
||||||
|
sec->ignore = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sec = find_section_by_name(&kelf->sections, ".kpatch.ignore.sections");
|
sec = find_section_by_name(&kelf->sections, ".kpatch.ignore.sections");
|
||||||
|
Loading…
Reference in New Issue
Block a user