1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2017 Josh Poimboeuf <jpoimboe@redhat.com>
10 #include <objtool/cfi.h>
11 #include <objtool/arch.h>
15 unsigned int uaccess_stack
;
23 struct list_head list
;
24 struct hlist_node hash
;
25 struct list_head static_call_node
;
30 unsigned long immediate
;
31 bool dead_end
, ignore
, ignore_alts
;
38 struct symbol
*call_dest
;
39 struct instruction
*jump_dest
;
40 struct instruction
*first_jump_src
;
41 struct reloc
*jump_table
;
42 struct list_head alts
;
44 struct list_head stack_ops
;
48 static inline bool is_static_jump(struct instruction
*insn
)
50 return insn
->type
== INSN_JUMP_CONDITIONAL
||
51 insn
->type
== INSN_JUMP_UNCONDITIONAL
;
54 struct instruction
*find_insn(struct objtool_file
*file
,
55 struct section
*sec
, unsigned long offset
);
57 #define for_each_insn(file, insn) \
58 list_for_each_entry(insn, &file->insn_list, list)
60 #define sec_for_each_insn(file, sec, insn) \
61 for (insn = find_insn(file, sec, 0); \
62 insn && &insn->list != &file->insn_list && \
64 insn = list_next_entry(insn, list))