Skip to content

Commit 9e98d62

Browse files
Julien ThierryPeter Zijlstra
authored andcommitted
objtool: Remove check preventing branches within alternative
While jumping from outside an alternative region to the middle of an alternative region is very likely wrong, jumping from an alternative region into the same region is valid. It is a common pattern on arm64. The first pattern is unlikely to happen in practice and checking only for this adds a lot of complexity. Just remove the current check. Suggested-by: Josh Poimboeuf <[email protected]> Signed-off-by: Julien Thierry <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Miroslav Benes <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 0c98be8 commit 9e98d62

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

tools/objtool/check.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,12 +2162,6 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
21622162

21632163
sec = insn->sec;
21642164

2165-
if (insn->alt_group && list_empty(&insn->alts)) {
2166-
WARN_FUNC("don't know how to handle branch to middle of alternative instruction group",
2167-
sec, insn->offset);
2168-
return 1;
2169-
}
2170-
21712165
while (1) {
21722166
next_insn = next_insn_same_sec(file, insn);
21732167

0 commit comments

Comments
 (0)