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. Add "-z notext" to
KBUILD_LDFLAGS to replicate that behavior with ld.lld and unblock
kernelci builds for 5.4 branches.
Bug: 430124841
Change-Id: I393174e264fbc0181abb5ecfd518055a7cb14162
Signed-off-by:
Tiffany Yang <ynaffit@google.com>
Loading
Please register or sign in to comment