Skip to content

Commit 87cf61f

Browse files
achartrePeter Zijlstra
authored andcommitted
objtool: is_fentry_call() crashes if call has no destination
Fix is_fentry_call() so that it works if a call has no destination set (call_dest). This needs to be done in order to support intra- function calls. Signed-off-by: Alexandre Chartre <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Miroslav Benes <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 1ff865e commit 87cf61f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/objtool/check.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ static int decode_sections(struct objtool_file *file)
14841484

14851485
static bool is_fentry_call(struct instruction *insn)
14861486
{
1487-
if (insn->type == INSN_CALL &&
1487+
if (insn->type == INSN_CALL && insn->call_dest &&
14881488
insn->call_dest->type == STT_NOTYPE &&
14891489
!strcmp(insn->call_dest->name, "__fentry__"))
14901490
return true;

0 commit comments

Comments
 (0)