tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git kprobe_multi_kmod head: 13e547c472fd67b9ac56d181c40ac326b934b4da commit: e737e20e8fa23ef85697dee5db638280689d5c3d [3/9] ftrace: Add support to resolve module symbols in ftrace_lookup_symbols config: csky-randconfig-r016-20221002 compiler: csky-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=e737e20e8fa23ef85697dee5db638280689d5c3d git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git git fetch --no-tags jolsa-perf kprobe_multi_kmod git checkout e737e20e8fa23ef85697dee5db638280689d5c3d # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): csky-linux-ld: kernel/trace/ftrace.o: in function `ftrace_lookup_symbols': >> kernel/trace/ftrace.c:8305: undefined reference to `module_kallsyms_on_each_symbol' >> csky-linux-ld: kernel/trace/ftrace.c:8306: undefined reference to `module_kallsyms_on_each_symbol' vim +8305 kernel/trace/ftrace.c 8275 8276 /** 8277 * ftrace_lookup_symbols - Lookup addresses for array of symbols 8278 * 8279 * @sorted_syms: array of symbols pointers symbols to resolve, 8280 * must be alphabetically sorted 8281 * @cnt: number of symbols/addresses in @syms/@addrs arrays 8282 * @addrs: array for storing resulting addresses 8283 * 8284 * This function looks up addresses for array of symbols provided in 8285 * @syms array (must be alphabetically sorted) and stores them in 8286 * @addrs array, which needs to be big enough to store at least @cnt 8287 * addresses. 8288 * 8289 * This function returns 0 if all provided symbols are found, 8290 * -ESRCH otherwise. 8291 */ 8292 int ftrace_lookup_symbols(const char **sorted_syms, size_t cnt, unsigned long *addrs) 8293 { 8294 struct kallsyms_data args; 8295 int err; 8296 8297 memset(addrs, 0, sizeof(*addrs) * cnt); 8298 args.addrs = addrs; 8299 args.syms = sorted_syms; 8300 args.cnt = cnt; 8301 args.found = 0; 8302 err = kallsyms_on_each_symbol(kallsyms_callback, &args); 8303 if (err < 0) 8304 return err; > 8305 err = module_kallsyms_on_each_symbol(kallsyms_callback, &args); > 8306 if (err < 0) 8307 return err; 8308 return args.found == args.cnt ? 0 : -ESRCH; 8309 } 8310 -- 0-DAY CI Kernel Test Service https://01.org/lkp