summaryrefslogtreecommitdiff
path: root/tools/objtool/include
diff options
context:
space:
mode:
Diffstat (limited to 'tools/objtool/include')
-rw-r--r--tools/objtool/include/objtool/check.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/objtool/include/objtool/check.h b/tools/objtool/include/objtool/check.h
index 674f57466d12..ad9c73504b12 100644
--- a/tools/objtool/include/objtool/check.h
+++ b/tools/objtool/include/objtool/check.h
@@ -117,6 +117,15 @@ static inline bool is_jump(struct instruction *insn)
return is_static_jump(insn) || is_dynamic_jump(insn);
}
+static inline struct symbol *insn_call_dest(struct instruction *insn)
+{
+ if (insn->type == INSN_JUMP_DYNAMIC ||
+ insn->type == INSN_CALL_DYNAMIC)
+ return NULL;
+
+ return insn->_call_dest;
+}
+
struct instruction *find_insn(struct objtool_file *file,
struct section *sec, unsigned long offset);