Re: [RFC 21/31] objtool: Fix x86 addend calcuation

2024-09-04 Thread Josh Poimboeuf
On Wed, Sep 04, 2024 at 05:24:21PM +0800, laokz wrote: > On Mon, 2024-09-02 at 21:00 -0700, Josh Poimboeuf wrote: > > +++ b/tools/objtool/arch/loongarch/decode.c > > @@ -20,9 +20,9 @@ unsigned long arch_jump_destination(struct > > instruction *insn) > > return insn->offset + (insn->immediat

Re: [RFC 21/31] objtool: Fix x86 addend calcuation

2024-09-04 Thread laokz
On Mon, 2024-09-02 at 21:00 -0700, Josh Poimboeuf wrote: > arch_dest_reloc_offset() hard-codes the addend adjustment to 4, which > isn't always true.  In fact it's dependent on the instruction itself. > > Signed-off-by: Josh Poimboeuf > --- >  tools/objtool/arch/loongarch/decode.c |  4 ++-- >  to

[RFC 21/31] objtool: Fix x86 addend calcuation

2024-09-02 Thread Josh Poimboeuf
arch_dest_reloc_offset() hard-codes the addend adjustment to 4, which isn't always true. In fact it's dependent on the instruction itself. Signed-off-by: Josh Poimboeuf --- tools/objtool/arch/loongarch/decode.c | 4 ++-- tools/objtool/arch/powerpc/decode.c | 4 ++-- tools/objtool/arch/x86/d