mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
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>
This commit is contained in:
parent
d72ce6ed64
commit
5287b166b7
1 changed files with 2 additions and 0 deletions
|
|
@ -58,6 +58,8 @@ KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
|
|||
&& echo "-z noreloc-overflow -pie --no-dynamic-linker")
|
||||
endif
|
||||
|
||||
KBUILD_LDFLAGS += -z notext
|
||||
|
||||
KBUILD_LDFLAGS += -z noexecstack
|
||||
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue