[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250224162542.GE11590@noisy.programming.kicks-ass.net>
Date: Mon, 24 Feb 2025 17:25:42 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Sathvika Vasireddy <sv@...ux.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>, christophe.leroy@...roup.eu,
npiggin@...il.com, maddy@...ux.ibm.com,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
llvm@...ts.linux.dev
Subject: Re: [RFC PATCH] objtool: Skip unannotated intra-function call
warning for bl+mflr pattern
On Fri, Feb 21, 2025 at 02:20:41PM +0530, Sathvika Vasireddy wrote:
> > > @@ -1625,6 +1626,11 @@ static int add_call_destinations(struct objtool_file *file)
> > > reloc = insn_reloc(file, insn);
> > > if (!reloc) {
> > > dest_off = arch_jump_destination(insn);
> > > +
> > > + next_insn = next_insn_same_func(file, insn);
> > > + if (next_insn && dest_off == next_insn->offset)
> > > + continue;
> > > +
> > This won't work on x86, where an intra-function call is converted to a
> > stack-modifying JUMP. So this should probably be checked in an
> > arch-specific function.
>
> Thanks for letting me know, I'll introduce arch_skip_call_warning() to
> handle architecture specific cases in the next patch I send.
Can't you detect this pattern in decode and simpy not emit the call
instruction?
Powered by blists - more mailing lists