Commit 6126ed5d authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Peter Zijlstra

objtool: Remove superfluous dead_end_function() check

annotate_call_site() already sets 'insn->dead_end' for calls to dead end
functions.
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/5d603a301e9a8b1036b61503385907e154867ace.1681325924.git.jpoimboe@kernel.org
parent 9290e772
...@@ -4078,8 +4078,7 @@ static bool ignore_unreachable_insn(struct objtool_file *file, struct instructio ...@@ -4078,8 +4078,7 @@ static bool ignore_unreachable_insn(struct objtool_file *file, struct instructio
* It may also insert a UD2 after calling a __noreturn function. * It may also insert a UD2 after calling a __noreturn function.
*/ */
prev_insn = prev_insn_same_sec(file, insn); prev_insn = prev_insn_same_sec(file, insn);
if ((prev_insn->dead_end || if (prev_insn->dead_end &&
dead_end_function(file, insn_call_dest(prev_insn))) &&
(insn->type == INSN_BUG || (insn->type == INSN_BUG ||
(insn->type == INSN_JUMP_UNCONDITIONAL && (insn->type == INSN_JUMP_UNCONDITIONAL &&
insn->jump_dest && insn->jump_dest->type == INSN_BUG))) insn->jump_dest && insn->jump_dest->type == INSN_BUG)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment