diff mbox series

[v2,5/5] objtool: use arch_jump_destination in read_intra_function_calls

Message ID 20220622101344.38002-6-chenzhongjin@huawei.com (mailing list archive)
State New, archived
Headers show
Series objtool: Reorganize x86 arch-specific code | expand

Commit Message

Chen Zhongjin June 22, 2022, 10:13 a.m. UTC
Now we use arch_jump_destination() instead of offset + len + immediate
for jump destination.
But in read_intra_function_calls it didn't get changed. Fix it.

Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
---
 tools/objtool/check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 11ab13fd99fd..35d0a1bc4279 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2127,7 +2127,7 @@  static int read_intra_function_calls(struct objtool_file *file)
 		 */
 		insn->type = INSN_JUMP_UNCONDITIONAL;
 
-		dest_off = insn->offset + insn->len + insn->immediate;
+		dest_off = arch_jump_destination(insn);
 		insn->jump_dest = find_insn(file, insn->sec, dest_off);
 		if (!insn->jump_dest) {
 			WARN_FUNC("can't find call dest at %s+0x%lx",