From bec6488af6432fe7d514a34d87cd89ca4210cf01 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Wed, 11 May 2022 15:00:24 -0700 Subject: [PATCH] create-diff-object: add rela_insn() error check Error out if the insn can't be found. Signed-off-by: Josh Poimboeuf --- kpatch-build/create-diff-object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index d8c4005..1c2f584 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -1499,6 +1499,9 @@ static void rela_insn(const struct section *sec, const struct rela *rela, rela_addr < insn_addr + insn->length) return; } + + ERROR("can't find instruction for rela at %s+0x%x", + sec->name, rela->offset); } static bool is_callback_section(struct section *sec) {