summaryrefslogtreecommitdiffstats
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorJulien Thierry <jthierry@redhat.com>2020-09-04 16:30:27 +0100
committerJosh Poimboeuf <jpoimboe@redhat.com>2020-09-10 10:43:13 -0500
commitee819aedf34a8f35cd54ee3967c7beb4d1d4a635 (patch)
tree7796908fb5cba3457a49ebba491a119355cdb72a /tools/objtool/check.c
parent5567c6c39f3404e4492c18c0c1abff5556684f6e (diff)
downloadlinux-ee819aedf34a8f35cd54ee3967c7beb4d1d4a635.tar.bz2
objtool: Make unwind hint definitions available to other architectures
Unwind hints are useful to provide objtool with information about stack states in non-standard functions/code. While the type of information being provided might be very arch specific, the mechanism to provide the information can be useful for other architectures. Move the relevant unwint hint definitions for all architectures to see. [ jpoimboe: REGS_IRET -> REGS_PARTIAL ] Signed-off-by: Julien Thierry <jthierry@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a94ad88d036c..95c6e0d31c0a 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -14,6 +14,7 @@
#include "warn.h"
#include "arch_elf.h"
+#include <linux/objtool.h>
#include <linux/hashtable.h>
#include <linux/kernel.h>
#include <linux/static_call_types.h>
@@ -1805,7 +1806,8 @@ static int update_cfi_state(struct instruction *insn, struct cfi_state *cfi,
return 0;
}
- if (cfi->type == ORC_TYPE_REGS || cfi->type == ORC_TYPE_REGS_IRET)
+ if (cfi->type == UNWIND_HINT_TYPE_REGS ||
+ cfi->type == UNWIND_HINT_TYPE_REGS_PARTIAL)
return update_cfi_state_regs(insn, cfi, op);
switch (op->dest.type) {