LDFLAGS_vmlinux += $(call ld-option, --gc-sections,)
endif
-+KBUILD_LDFLAGS += -z noexecstack
++LDFLAGS += -z noexecstack
+ifeq ($(CONFIG_LD_IS_BFD),y)
-+KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
++LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
+endif
+
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/boot/Makefile | 2 +-
- arch/x86/boot/compressed/Makefile | 4 ++++
+ arch/x86/boot/compressed/Makefile | 6 ++++++
arch/x86/entry/vdso/Makefile | 2 +-
- 3 files changed, 6 insertions(+), 2 deletions(-)
+ 3 files changed, 8 insertions(+), 2 deletions(-)
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
-@@ -54,6 +54,10 @@ else
+@@ -54,6 +54,12 @@ else
LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
&& echo "-z noreloc-overflow -pie --no-dynamic-linker")
endif
-+LDFLAGS_vmlinux += -z noexecstack
++
++LDFLAGS += -z noexecstack
+ifeq ($(CONFIG_LD_IS_BFD),y)
-+LDFLAGS_vmlinux += $(call ld-option,--no-warn-rwx-segments)
++LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
+endif
++
LDFLAGS_vmlinux := -T
hostprogs-y := mkpiggy