ld.lld: error: relocation R_PPC_ADDR16_HA cannot be used against symbol 'virt_phys_offset'; recompile with -fPIC
From: kernel test robot
Date: Sat Nov 28 2026 - 06:07:30 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7cd8495c0f16275c4f9abe1cef09a7b5fcd6d046
commit: 238be4ba87605da69de2131e8736be7a0d299e00 x86/microcode: Refactor platform ID enumeration into a helper
date: 9 months ago
config: powerpc-randconfig-r2309-20261128 (https://download.01.org/0day-ci/archive/20261128/20261128115906.0jcqIVz1-lkp@xxxxxxxxx/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 578b1f2d6a9776b63cbb6b86f4cca6208d429f48)
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261128/20261128115906.0jcqIVz1-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 238be4ba8760 ("x86/microcode: Refactor platform ID enumeration into a helper")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261128115906.0jcqIVz1-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> ld.lld: error: relocation R_PPC_ADDR16_HA cannot be used against symbol 'virt_phys_offset'; recompile with -fPIC
>>> defined in vmlinux.a(arch/powerpc/mm/init_32.o)
>>> referenced by main.c
>>> init/main.o:(virt_to_pfn) in archive vmlinux.a
--
>> ld.lld: error: relocation R_PPC_ADDR16_LO cannot be used against symbol 'virt_phys_offset'; recompile with -fPIC
>>> defined in vmlinux.a(arch/powerpc/mm/init_32.o)
>>> referenced by main.c
>>> init/main.o:(virt_to_pfn) in archive vmlinux.a
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki