Skip to content

Commit 1d08b92

Browse files
jpoimboePeter Zijlstra
authored andcommitted
objtool: Use offstr() to print address of missing ENDBR
Fixes: 89bc853 ("objtool: Find unused ENDBR instructions") Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/95d12e800c736a3f7d08d61dabb760b2d5251a8e.1650300597.git.jpoimboe@redhat.com
1 parent 4baae98 commit 1d08b92

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tools/objtool/check.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3211,9 +3211,8 @@ validate_ibt_reloc(struct objtool_file *file, struct reloc *reloc)
32113211
static void warn_noendbr(const char *msg, struct section *sec, unsigned long offset,
32123212
struct instruction *dest)
32133213
{
3214-
WARN_FUNC("%srelocation to !ENDBR: %s+0x%lx", sec, offset, msg,
3215-
dest->func ? dest->func->name : dest->sec->name,
3216-
dest->func ? dest->offset - dest->func->offset : dest->offset);
3214+
WARN_FUNC("%srelocation to !ENDBR: %s", sec, offset, msg,
3215+
offstr(dest->sec, dest->offset));
32173216
}
32183217

32193218
static void validate_ibt_dest(struct objtool_file *file, struct instruction *insn,

0 commit comments

Comments
 (0)