Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: simplify generation of compressed vmlinux.lds file

As we are now using the C preprocessor, we do not need to use sed to
edit constants in this file, and then pass the resulting file through
the C preprocessor. Instead, rely solely on the C preprocessor to
rewrite TEXT_START and BSS_ADDR.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+2 -9
-1
arch/arm/boot/compressed/.gitignore
··· 10 10 piggy.lz4 11 11 vmlinux 12 12 vmlinux.lds 13 - vmlinux.lds.S 14 13 15 14 # borrowed libfdt files 16 15 fdt.c
+2 -5
arch/arm/boot/compressed/Makefile
··· 81 81 ZBSSADDR := ALIGN(8) 82 82 endif 83 83 84 - SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ 84 + CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)" 85 85 86 86 suffix_$(CONFIG_KERNEL_GZIP) = gzip 87 87 suffix_$(CONFIG_KERNEL_LZO) = lzo ··· 114 114 # Make sure files are removed during clean 115 115 extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \ 116 116 lib1funcs.S ashldi3.S bswapsdi2.S $(libfdt) $(libfdt_hdrs) \ 117 - hyp-stub.S vmlinux.lds.S 117 + hyp-stub.S 118 118 119 119 ifeq ($(CONFIG_FUNCTION_TRACER),y) 120 120 ORIG_CFLAGS := $(KBUILD_CFLAGS) ··· 198 198 199 199 $(obj)/font.c: $(FONTC) 200 200 $(call cmd,shipped) 201 - 202 - $(obj)/vmlinux.lds.S: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KCONFIG_CONFIG) 203 - @sed "$(SEDFLAGS)" < $< > $@ 204 201 205 202 $(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S 206 203 $(call cmd,shipped)
-3
arch/arm/boot/compressed/vmlinux.lds.in arch/arm/boot/compressed/vmlinux.lds.S
··· 1 1 /* 2 - * linux/arch/arm/boot/compressed/vmlinux.lds.in 3 - * 4 2 * Copyright (C) 2000 Russell King 5 3 * 6 4 * This program is free software; you can redistribute it and/or modify ··· 85 87 .stab.indexstr 0 : { *(.stab.indexstr) } 86 88 .comment 0 : { *(.comment) } 87 89 } 88 -