On Thu, Sep 15, 2022 at 01:11:11PM +0200, Peter Zijlstra wrote: > From: Peter Zijlstra > > Allow STT_NOTYPE to tail-call into STT_FUNC, per definition STT_NOTYPE > is not a sub-function of the STT_FUNC. > > Signed-off-by: Peter Zijlstra (Intel) > Signed-off-by: Thomas Gleixner > Signed-off-by: Peter Zijlstra (Intel) > --- > tools/objtool/check.c | 29 ++++++++++++++++++++--------- > 1 file changed, 20 insertions(+), 9 deletions(-) > > --- a/tools/objtool/check.c > +++ b/tools/objtool/check.c > @@ -1370,6 +1370,16 @@ static void add_return_call(struct objto > > static bool same_function(struct instruction *insn1, struct instruction *insn2) > { > + if (!insn1->func && !insn2->func) > + return true; > + > + /* Allow STT_NOTYPE -> STT_FUNC+0 tail-calls */ > + if (!insn1->func && insn1->func != insn2->func) > + return false; Looks like this check is triggering below warning: vmlinux.o: warning: objtool: ftrace_replace_code.cold+0x0: unreachable instruction (.config is attached) > + > + if (!insn2->func) > + return true; > + > return insn1->func->pfunc == insn2->func->pfunc; > }