mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-03 15:55:38 +00:00
objtool: Use arch_jump_destination() in read_intra_function_calls()
Use arch_jump_destiation() instead of the open-coded 'offset + len + immediate' that is x86 specific. Avoids future trouble with other architectures. Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20220818014553.220261-1-chenzhongjin@huawei.com
This commit is contained in:
parent
568035b01c
commit
7b3e318690
1 changed files with 1 additions and 1 deletions
|
@ -2233,7 +2233,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",
|
||||
|
|
Loading…
Add table
Reference in a new issue