Re: ld.lld: error: undefined symbol: __kcfi_typeid_ftrace_stub_graph
From: Sami Tolvanen
Date: Wed Oct 26 2022 - 11:37:51 EST
On Tue, Oct 25, 2022 at 1:22 AM kernel test robot <lkp@xxxxxxxxx> wrote:
> >> ld.lld: error: undefined symbol: __kcfi_typeid_ftrace_stub_graph
> >>> referenced by entry-ftrace.S:299 (arch/arm64/kernel/entry-ftrace.S:299)
> >>> arch/arm64/kernel/entry-ftrace.o:(.text+0x48) in archive vmlinux.a
We don't seem to have any C translation units that would take the
address of ftrace_stub_graph with this config, which means the
compiler won't generate the __kcfi_typeid_ftrace_stub_graph symbol.
Adding __ADDRESSABLE(ftrace_stub_graph) to a suitable place would fix
this issue, perhaps somewhere in arch/arm64/kernel/ftrace.c?
Sami