Re: [PATCH v3 32/59] objtool: Allow STT_NOTYPE -> STT_FUNC+0 tail-calls
From: Peter Zijlstra
Date: Thu Sep 22 2022 - 06:47:57 EST
On Thu, Sep 22, 2022 at 12:29:58PM +0200, Peter Zijlstra wrote:
> I managed to reproduce with 12.2.0 -- my 12.1.0 compiler didn't
> reproduce.
>
> $ ./scripts/objdump-func vmlinux.o ftrace_replace_code
> 0000 0000000000012a83 <ftrace_replace_code.cold>:
> 0000 12a83: 48 89 de mov %rbx,%rsi
> 0003 12a86: 89 c7 mov %eax,%edi
> 0005 12a88: 5b pop %rbx
> 0006 12a89: 5d pop %rbp
> 0007 12a8a: 41 5c pop %r12
> 0009 12a8c: 41 5d pop %r13
> 000b 12a8e: 41 5e pop %r14
> 000d 12a90: e9 62 fd ff ff jmp 127f7 <ftrace_bug>
>
>
> Seems to suggest objtool is actually right; I cannot find a reference to
> that cold symbol.
Ohhhh, ftrace_replace_cold is a weak function, so it could be the
original weak symbol had a reference to the cold thing.
We have some code to deal with crap like that, lemme try and figure out
what went wrong.