diff options
| author | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-09-17 09:03:28 -0700 |
|---|---|---|
| committer | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-10-14 14:45:24 -0700 |
| commit | 41d24d78589705f85cbe90e5a8c1b55ea05557a2 (patch) | |
| tree | fd297dadb1550ac904fbf6912348724cfab89f9c /tools/objtool/arch/powerpc/decode.c | |
| parent | 72567c630d32bc31f671977f78228c80937ed80e (diff) | |
objtool: Fix x86 addend calculation
On x86, arch_dest_reloc_offset() hardcodes the addend adjustment to
four, but the actual adjustment depends on the relocation type. Fix
that.
Acked-by: Petr Mladek <pmladek@suse.com>
Tested-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/arch/powerpc/decode.c')
| -rw-r--r-- | tools/objtool/arch/powerpc/decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/arch/powerpc/decode.c b/tools/objtool/arch/powerpc/decode.c index c851c51d4bd3..9b17885e6cba 100644 --- a/tools/objtool/arch/powerpc/decode.c +++ b/tools/objtool/arch/powerpc/decode.c @@ -14,9 +14,9 @@ int arch_ftrace_match(char *name) return !strcmp(name, "_mcount"); } -unsigned long arch_dest_reloc_offset(int addend) +s64 arch_insn_adjusted_addend(struct instruction *insn, struct reloc *reloc) { - return addend; + return reloc_addend(reloc); } bool arch_callee_saved_reg(unsigned char reg) |