aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-06-17 10:00:54 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-07-01 10:01:51 -0400
commitc79bf928d99a3b8cf1e8df75726f78e197b17eb6 (patch)
tree6542df50b43140e90cc4ea2322a1b8ae2194366a
parent33656d565da51bd01779600352ec28385ab806c8 (diff)
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>
-rw-r--r--arch/arm/boot/compressed/.gitignore1
-rw-r--r--arch/arm/boot/compressed/Makefile7
-rw-r--r--arch/arm/boot/compressed/vmlinux.lds.S (renamed from arch/arm/boot/compressed/vmlinux.lds.in)3
3 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
index 6a26e7bcb714..0714e0334e33 100644
--- a/arch/arm/boot/compressed/.gitignore
+++ b/arch/arm/boot/compressed/.gitignore
@@ -10,7 +10,6 @@ piggy.xzkern
10piggy.lz4 10piggy.lz4
11vmlinux 11vmlinux
12vmlinux.lds 12vmlinux.lds
13vmlinux.lds.S
14 13
15# borrowed libfdt files 14# borrowed libfdt files
16fdt.c 15fdt.c
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 8a8090694d89..76a50ecae1c3 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -81,7 +81,7 @@ ZTEXTADDR := 0
81ZBSSADDR := ALIGN(8) 81ZBSSADDR := ALIGN(8)
82endif 82endif
83 83
84SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ 84CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"
85 85
86suffix_$(CONFIG_KERNEL_GZIP) = gzip 86suffix_$(CONFIG_KERNEL_GZIP) = gzip
87suffix_$(CONFIG_KERNEL_LZO) = lzo 87suffix_$(CONFIG_KERNEL_LZO) = lzo
@@ -114,7 +114,7 @@ targets := vmlinux vmlinux.lds \
114# Make sure files are removed during clean 114# Make sure files are removed during clean
115extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \ 115extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
116 lib1funcs.S ashldi3.S bswapsdi2.S $(libfdt) $(libfdt_hdrs) \ 116 lib1funcs.S ashldi3.S bswapsdi2.S $(libfdt) $(libfdt_hdrs) \
117 hyp-stub.S vmlinux.lds.S 117 hyp-stub.S
118 118
119ifeq ($(CONFIG_FUNCTION_TRACER),y) 119ifeq ($(CONFIG_FUNCTION_TRACER),y)
120ORIG_CFLAGS := $(KBUILD_CFLAGS) 120ORIG_CFLAGS := $(KBUILD_CFLAGS)
@@ -199,8 +199,5 @@ CFLAGS_font.o := -Dstatic=
199$(obj)/font.c: $(FONTC) 199$(obj)/font.c: $(FONTC)
200 $(call cmd,shipped) 200 $(call cmd,shipped)
201 201
202$(obj)/vmlinux.lds.S: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KCONFIG_CONFIG)
203 @sed "$(SEDFLAGS)" < $< > $@
204
205$(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S 202$(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S
206 $(call cmd,shipped) 203 $(call cmd,shipped)
diff --git a/arch/arm/boot/compressed/vmlinux.lds.in b/arch/arm/boot/compressed/vmlinux.lds.S
index 60162231c7ea..2b60b843ac5e 100644
--- a/arch/arm/boot/compressed/vmlinux.lds.in
+++ b/arch/arm/boot/compressed/vmlinux.lds.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/arm/boot/compressed/vmlinux.lds.in
3 *
4 * Copyright (C) 2000 Russell King 2 * Copyright (C) 2000 Russell King
5 * 3 *
6 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
@@ -87,4 +85,3 @@ SECTIONS
87 .stab.indexstr 0 : { *(.stab.indexstr) } 85 .stab.indexstr 0 : { *(.stab.indexstr) }
88 .comment 0 : { *(.comment) } 86 .comment 0 : { *(.comment) }
89} 87}
90