diff options
Diffstat (limited to 'tools/objtool/check.h')
-rw-r--r-- | tools/objtool/check.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/objtool/check.h b/tools/objtool/check.h index c0d2fde6b4ea..da85f5b00ec6 100644 --- a/tools/objtool/check.h +++ b/tools/objtool/check.h @@ -20,22 +20,34 @@ #include <stdbool.h> #include "elf.h" +#include "cfi.h" #include "arch.h" #include <linux/hashtable.h> +struct insn_state { + struct cfi_reg cfa; + struct cfi_reg regs[CFI_NUM_REGS]; + int stack_size; + bool bp_scratch; + bool drap; + int drap_reg; +}; + struct instruction { struct list_head list; struct hlist_node hash; struct section *sec; unsigned long offset; - unsigned int len, state; + unsigned int len; unsigned char type; unsigned long immediate; - bool alt_group, visited, dead_end; + bool alt_group, visited, dead_end, ignore; struct symbol *call_dest; struct instruction *jump_dest; struct list_head alts; struct symbol *func; + struct stack_op stack_op; + struct insn_state state; }; struct objtool_file { @@ -48,4 +60,7 @@ struct objtool_file { int check(const char *objname, bool nofp); +#define for_each_insn(file, insn) \ + list_for_each_entry(insn, &file->insn_list, list) + #endif /* _CHECK_H */ |