ANDROID: fix kernelci compressed kernel linking
Kernel versions 5.4 and below have several bogus relocations defined in arch/x86/boot/compressed/head_32.S that cause build errors like the following when linked with the llvm toolchain: ld.lld: error: relocation R_386_32 cannot be used against symbol '_bss'; recompile with -fPIC These errors only show up when linking with LLD because BFD allows relocations in read-only sections by default. Change ffb6c5f4 ("FROMLIST: x86/boot: allow a relocatable kernel to be linked with lld") was ported use the same linker flags as ld.bfd for ld.lld, but guards them with CONFIG_RELOCATABLE. However, the compressed kernel is built using position-independent code regardless of whether CONFIG_RELOCATABLE is true or not, causing errors when kernelci builds i386 with the allnoconfig. Remove the CONFIG_RELOCATABLE guard around "-z notext" to unblock kernelci builds for 5.4 branches. Bug: 430124841 Change-Id: I393174e264fbc0181abb5ecfd518055a7cb14162 Signed-off-by:Tiffany Yang <ynaffit@google.com>
Loading
Please sign in to comment