diff options
author | Mark Rutland <mark.rutland@arm.com> | 2016-07-19 06:23:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-08-12 11:47:01 -0400 |
commit | 3cb59581a860f5f542b37aed214f74b3f2ccfa32 (patch) | |
tree | 9eb0e68cb66c52ee1e6d7e05883e30081b012f65 | |
parent | bf31c5e07db81073aa7fedc5401afa967b177fe2 (diff) |
ARM: 8588/1: localise objcopy flags
We currently define OBJCOPYFLAGS in the top-level arm Makefile, and thus
these flags will be passed to all uses of objcopy, kernel-wide, for
which they are not explicitly overridden. The flags we set are intended
for converting a few ELF files into raw binaries, and thus the flags
chosen are problematic for some other uses which do not expect a raw
binary result, e.g. the upcoming lkdtm rodata test:
http://www.openwall.com/lists/kernel-hardening/2016/06/08/2
This patch localises the objcopy flags such that they are only used for
the cases we require them for today.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Kees Cook <keescook@chromium.org>
Tested-by: Laura Abbott <labbott@redhat.com>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boot/Makefile | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 56ea5c60b318..6e30b8bc21b9 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -23,7 +23,6 @@ ifeq ($(CONFIG_ARM_MODULE_PLTS),y) | |||
23 | LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds | 23 | LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds |
24 | endif | 24 | endif |
25 | 25 | ||
26 | OBJCOPYFLAGS :=-O binary -R .comment -S | ||
27 | GZFLAGS :=-9 | 26 | GZFLAGS :=-9 |
28 | #KBUILD_CFLAGS +=-pipe | 27 | #KBUILD_CFLAGS +=-pipe |
29 | 28 | ||
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index bdc1d5af03d2..50f8d1be7fcb 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -11,6 +11,8 @@ | |||
11 | # Copyright (C) 1995-2002 Russell King | 11 | # Copyright (C) 1995-2002 Russell King |
12 | # | 12 | # |
13 | 13 | ||
14 | OBJCOPYFLAGS :=-O binary -R .comment -S | ||
15 | |||
14 | ifneq ($(MACHINE),) | 16 | ifneq ($(MACHINE),) |
15 | include $(MACHINE)/Makefile.boot | 17 | include $(MACHINE)/Makefile.boot |
16 | endif | 18 | endif |