Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -1700,8 +1700,8 @@ static void kpatch_check_func_profiling_calls(struct kpatch_elf *kelf)
(sym->parent && sym->parent->status == CHANGED))
continue;
if (!sym->twin->has_func_profiling) {
log_error("function %s has no fentry/mcount call, unable to patch\n",
sym->name);
log_error("function %s doesn't have patchable function entry, unable to patch\n",
sym->name);
errs++;
}
}
Expand Down Expand Up @@ -4180,6 +4180,10 @@ static void kpatch_find_func_profiling_calls(struct kpatch_elf *kelf)
insn[4] == 0x00 && insn[5] == 0x00)
sym->has_func_profiling = 1;
break;
case AARCH64:
if (kpatch_symbol_has_pfe_entry(kelf, sym))
sym->has_func_profiling = 1;
break;
default:
ERROR("unsupported arch");
}
Expand Down
3 changes: 3 additions & 0 deletions kpatch-build/kpatch-elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,9 @@ struct kpatch_elf *kpatch_elf_open(const char *name)
case EM_S390:
kelf->arch = S390;
break;
case EM_AARCH64:
kelf->arch = ARM64;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was updated to AARCH64 in a later commit. I guess this is a typo here?

break;
default:
ERROR("Unsupported target architecture");
}
Expand Down
1 change: 1 addition & 0 deletions kpatch-build/kpatch-elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ enum architecture {
PPC64 = 0x1 << 0,
X86_64 = 0x1 << 1,
S390 = 0x1 << 2,
AARCH64 = 0x1 << 3,
};

struct kpatch_elf {
Expand Down