summaryrefslogtreecommitdiffstats
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-04-01 16:54:26 +0200
committerIngo Molnar <mingo@kernel.org>2020-04-22 10:53:50 +0200
commitc536ed2fffd5dbf81fe2dede8ef294e0cbb08f72 (patch)
tree6d5c7c35f17c5258ade1f04c3634be4efb49c1b8 /tools/objtool/check.c
parent9f2dfd61dd022d4559d42a832fb03e76aad36c5f (diff)
downloadlinux-c536ed2fffd5dbf81fe2dede8ef294e0cbb08f72.tar.bz2
objtool: Remove SAVE/RESTORE hints
The SAVE/RESTORE hints are now unused; remove them. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20200416115118.926738768@infradead.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c42
1 files changed, 3 insertions, 39 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 93c88ac51f0f..464f10c0a5ac 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1254,15 +1254,7 @@ static int read_unwind_hints(struct objtool_file *file)
cfa = &insn->state.cfa;
- if (hint->type == UNWIND_HINT_TYPE_SAVE) {
- insn->save = true;
- continue;
-
- } else if (hint->type == UNWIND_HINT_TYPE_RESTORE) {
- insn->restore = true;
- insn->hint = true;
-
- } else if (hint->type == UNWIND_HINT_TYPE_RET_OFFSET) {
+ if (hint->type == UNWIND_HINT_TYPE_RET_OFFSET) {
insn->ret_offset = hint->sp_offset;
continue;
}
@@ -2113,37 +2105,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
return 0;
}
- if (insn->hint) {
- if (insn->restore) {
- struct instruction *save_insn, *i;
-
- i = insn;
- save_insn = NULL;
- sym_for_each_insn_continue_reverse(file, func, i) {
- if (i->save) {
- save_insn = i;
- break;
- }
- }
-
- if (!save_insn) {
- WARN_FUNC("no corresponding CFI save for CFI restore",
- sec, insn->offset);
- return 1;
- }
-
- if (!save_insn->visited) {
- WARN_FUNC("objtool isn't smart enough to handle this CFI save/restore combo",
- sec, insn->offset);
- return 1;
- }
-
- insn->state = save_insn->state;
- }
-
+ if (insn->hint)
state = insn->state;
-
- } else
+ else
insn->state = state;
insn->visited |= visited;