From: Josh Poimboeuf Date: Mon, 18 Apr 2022 16:50:30 +0000 (-0700) Subject: objtool: Use offstr() to print address of missing ENDBR X-Git-Tag: v5.18-rc5~2^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d08b92fa2c41c43e4efe9787413e9ac9a434f83;p=thirdparty%2Flinux.git objtool: Use offstr() to print address of missing ENDBR Fixes: 89bc853eae4a ("objtool: Find unused ENDBR instructions") Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/95d12e800c736a3f7d08d61dabb760b2d5251a8e.1650300597.git.jpoimboe@redhat.com --- diff --git a/tools/objtool/check.c b/tools/objtool/check.c index b822a6d5a1721..5285edd41da8b 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -3211,9 +3211,8 @@ validate_ibt_reloc(struct objtool_file *file, struct reloc *reloc) static void warn_noendbr(const char *msg, struct section *sec, unsigned long offset, struct instruction *dest) { - WARN_FUNC("%srelocation to !ENDBR: %s+0x%lx", sec, offset, msg, - dest->func ? dest->func->name : dest->sec->name, - dest->func ? dest->offset - dest->func->offset : dest->offset); + WARN_FUNC("%srelocation to !ENDBR: %s", sec, offset, msg, + offstr(dest->sec, dest->offset)); } static void validate_ibt_dest(struct objtool_file *file, struct instruction *insn,