diff options
| author | Alexandre Chartre <alexandre.chartre@oracle.com> | 2025-11-21 10:53:15 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-11-21 15:30:07 +0100 |
| commit | 5d859dff266f7e57664dc6bcf80ef2c66547c58a (patch) | |
| tree | 2e9a3390c0d2d9bf9eafd35e3c88b5842f8207ca /tools/objtool/include | |
| parent | f348a44c103aac04fc9420d993afa4ab5cf5e3e2 (diff) | |
objtool: Print symbol during disassembly
Print symbols referenced during disassembly instead of just printing
raw addresses. Also handle address relocation.
Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://patch.msgid.link/20251121095340.464045-6-alexandre.chartre@oracle.com
Diffstat (limited to 'tools/objtool/include')
| -rw-r--r-- | tools/objtool/include/objtool/check.h | 9 |
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); |
