From b8326bf52e0894004c790183228c1ec18aae7f72 Mon Sep 17 00:00:00 2001 From: Vasily Gorbik Date: Tue, 12 Jun 2018 21:59:13 +0200 Subject: s390/decompressor: allow preprocessor in piggy.o linker script Rename vmlinux.scr to vmlinux.scr.lds.S and add it to build rules to enable preprocessor for it. Also add vmlinux.scr.lds to local .gitignore Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky --- arch/s390/boot/compressed/.gitignore | 1 + arch/s390/boot/compressed/Makefile | 4 ++-- arch/s390/boot/compressed/vmlinux.scr | 11 ----------- arch/s390/boot/compressed/vmlinux.scr.lds.S | 11 +++++++++++ 4 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 arch/s390/boot/compressed/vmlinux.scr create mode 100644 arch/s390/boot/compressed/vmlinux.scr.lds.S (limited to 'arch/s390/boot/compressed') diff --git a/arch/s390/boot/compressed/.gitignore b/arch/s390/boot/compressed/.gitignore index 2088cc140629..45aeb4f08752 100644 --- a/arch/s390/boot/compressed/.gitignore +++ b/arch/s390/boot/compressed/.gitignore @@ -1,4 +1,5 @@ sizes.h vmlinux vmlinux.lds +vmlinux.scr.lds vmlinux.bin.full diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile index 9665131b3cb2..704c1f4dd802 100644 --- a/arch/s390/boot/compressed/Makefile +++ b/arch/s390/boot/compressed/Makefile @@ -12,7 +12,7 @@ UBSAN_SANITIZE := n obj-y := head.o misc.o piggy.o targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4 -targets += sizes.h $(obj-y) +targets += vmlinux.scr.lds sizes.h $(obj-y) KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR) KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR) @@ -72,7 +72,7 @@ $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) $(call if_changed,xzkern) LDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) +$(obj)/piggy.o: $(obj)/vmlinux.scr.lds $(obj)/vmlinux.bin.$(suffix-y) $(call if_changed,ld) chkbss := $(filter-out $(obj)/misc.o $(obj)/piggy.o,$(OBJECTS)) diff --git a/arch/s390/boot/compressed/vmlinux.scr b/arch/s390/boot/compressed/vmlinux.scr deleted file mode 100644 index 42a242597f34..000000000000 --- a/arch/s390/boot/compressed/vmlinux.scr +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -SECTIONS -{ - .rodata.compressed : { - input_len = .; - LONG(input_data_end - input_data) input_data = .; - *(.data) - output_len = . - 4; - input_data_end = .; - } -} diff --git a/arch/s390/boot/compressed/vmlinux.scr.lds.S b/arch/s390/boot/compressed/vmlinux.scr.lds.S new file mode 100644 index 000000000000..42a242597f34 --- /dev/null +++ b/arch/s390/boot/compressed/vmlinux.scr.lds.S @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +SECTIONS +{ + .rodata.compressed : { + input_len = .; + LONG(input_data_end - input_data) input_data = .; + *(.data) + output_len = . - 4; + input_data_end = .; + } +} -- cgit v1.2.3-59-g8ed1b