create-diff-object: support .call_sites sections

Kernel v6.2+ commits 00abd3840812 ("objtool: Add .call_sites section")
and e81dc127ef69 ("x86/callthunks: Add call patching for call depth
tracking") added .call_sites sections to object files.  These are filled
with an array of s32 values.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
Joe Lawrence 2023-01-16 09:33:55 -05:00
parent e707515cb1
commit 6b78bd5c67
1 changed files with 10 additions and 0 deletions

View File

@ -2124,6 +2124,11 @@ static int static_call_sites_group_size(struct kpatch_elf *kelf, int offset)
return size; return size;
} }
static int call_sites_group_size(struct kpatch_elf *kelf, int offset)
{
return 4;
}
static int retpoline_sites_group_size(struct kpatch_elf *kelf, int offset) static int retpoline_sites_group_size(struct kpatch_elf *kelf, int offset)
{ {
return 4; return 4;
@ -2431,6 +2436,11 @@ static struct special_section special_sections[] = {
.group_size = static_call_sites_group_size, .group_size = static_call_sites_group_size,
.group_filter = static_call_sites_group_filter, .group_filter = static_call_sites_group_filter,
}, },
{
.name = ".call_sites",
.arch = X86_64,
.group_size = call_sites_group_size,
},
{ {
.name = ".retpoline_sites", .name = ".retpoline_sites",
.arch = X86_64, .arch = X86_64,