[PATCH v2 06/10] objtool: check: Use arch specific values in restore_reg()
From: Julien Thierry
Date: Fri Mar 27 2020 - 11:29:17 EST
Initial register state is set up by arch specific code. Use the value
the arch code has set when restoring registers from the stack.
Suggested-by: Raphael Gault <raphael.gault@xxxxxxx>
Signed-off-by: Julien Thierry <jthierry@xxxxxxxxxx>
---
tools/objtool/check.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 6af14a55490d..65809c74f6a8 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1488,8 +1488,8 @@ static void save_reg(struct insn_state *state, unsigned char reg, int base,
static void restore_reg(struct insn_state *state, unsigned char reg)
{
- state->regs[reg].base = CFI_UNDEFINED;
- state->regs[reg].offset = 0;
+ state->regs[reg].base = initial_func_cfi.regs[reg].base;
+ state->regs[reg].offset = initial_func_cfi.regs[reg].offset;
}
/*
--
2.21.1