Re: [PATCH 2/2] objtool: Improve call destination function detection

From: Nathan Chancellor
Date: Tue Feb 18 2020 - 15:07:45 EST


On Mon, Feb 17, 2020 at 09:41:54PM -0600, Josh Poimboeuf wrote:
> A recent clang change, combined with a binutils bug, can trigger a
> situation where a ".Lprintk$local" STT_NOTYPE symbol gets created at the
> same offset as the "printk" STT_FUNC symbol. This confuses objtool:
>
> kernel/printk/printk.o: warning: objtool: ignore_loglevel_setup()+0x10: can't find call dest symbol at .text+0xc67
>
> Improve the call destination detection by looking specifically for an
> STT_FUNC symbol.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/872
> Link: https://sourceware.org/bugzilla/show_bug.cgi?id=25551
> Reported-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

Tested with clang-11 and binutils 2.34, a combo that was previously
broken and I no longer see these warnings on either defconfig or
allyesconfig.

Tested-by: Nathan Chancellor <natechancellor@xxxxxxxxx>