avoid __memcat_p link failure
BugLink: https://bugs.launchpad.net/bugs/1928823
The kernel test robot reports a link error when the stm driver is a
loadable module on any v5.4 kernel:
> ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined!
This was fixed in mainline with commit
7273ad2b08f8 ("kbuild: link
lib-y objects to vmlinux forcibly when CONFIG_MODULES=y"), which
is fairly intrusive.
Fix the v5.4 specific issue with a minimal subset of that patch,
linking only the failing object into the kernel. Kernels before v4.20
are not affected.
Reported-by: kernel test robot <lkp@intel.com>
Link: https://groups.google.com/g/clang-built-linux/c/H-PrABqYShg
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>