|
@@ -40,8 +40,8 @@ GCOV_PROFILE := n
|
|
|
UBSAN_SANITIZE :=n
|
|
|
|
|
|
LDFLAGS := -m elf_$(UTS_MACHINE)
|
|
|
-ifeq ($(CONFIG_RELOCATABLE),y)
|
|
|
-# If kernel is relocatable, build compressed kernel as PIE.
|
|
|
+# Compressed kernel should be built as PIE since it may be loaded at any
|
|
|
+# address by the bootloader.
|
|
|
ifeq ($(CONFIG_X86_32),y)
|
|
|
LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker)
|
|
|
else
|
|
@@ -51,7 +51,6 @@ else
|
|
|
LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
|
|
|
&& echo "-z noreloc-overflow -pie --no-dynamic-linker")
|
|
|
endif
|
|
|
-endif
|
|
|
LDFLAGS_vmlinux := -T
|
|
|
|
|
|
hostprogs-y := mkpiggy
|