From: Mark Rutland Date: Tue, 19 Jul 2016 10:23:37 +0000 (+0100) Subject: ARM: 8588/1: localise objcopy flags X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3cb59581a860f5f542b37aed214f74b3f2ccfa32;p=linux-beck.git 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 Acked-by: Kees Cook Tested-by: Laura Abbott Cc: Russell King Signed-off-by: Russell King --- 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) LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds endif -OBJCOPYFLAGS :=-O binary -R .comment -S GZFLAGS :=-9 #KBUILD_CFLAGS +=-pipe 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 @@ # Copyright (C) 1995-2002 Russell King # +OBJCOPYFLAGS :=-O binary -R .comment -S + ifneq ($(MACHINE),) include $(MACHINE)/Makefile.boot endif