aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/compressed/Makefile
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2013-11-05 23:15:24 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-12-29 07:32:45 -0500
commit017f161a55b48807a73fc9dff0b69f081bf43ee3 (patch)
tree1c440562e87f4c394d483935486019cc9854ffe8 /arch/arm/boot/compressed/Makefile
parent03aa6580e336c19e923372a3b6b72a300f24880c (diff)
ARM: 7877/1: use built-in byte swap function
Enable the compiler intrinsic for byte swapping on arch ARM. This allows the compiler to detect and be able to optimize out byte swappings, and has a very modest benefit on vmlinux size (Linaro gcc 4.8): text data bss dec hex filename 2840310 123932 61960 3026202 2e2d1a vmlinux-lart #orig 2840152 123932 61960 3026044 2e2c7c vmlinux-lart #builtin-bswap 6473120 314840 5616016 12403976 bd4508 vmlinux-mxs #orig 6472586 314848 5616016 12403450 bd42fa vmlinux-mxs #builtin-bswap 7419872 318372 379556 8117800 7bde28 vmlinux-imx_v6_v7 #orig 7419170 318364 379556 8117090 7bdb62 vmlinux-imx_v6_v7 #builtin-bswap Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Reviewed-by: Nicolas Pitre <nico@linaro.org> Acked-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/boot/compressed/Makefile')
-rw-r--r--arch/arm/boot/compressed/Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index e7190bb5998e..4bb86d9a749d 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -108,12 +108,12 @@ endif
108 108
109targets := vmlinux vmlinux.lds \ 109targets := vmlinux vmlinux.lds \
110 piggy.$(suffix_y) piggy.$(suffix_y).o \ 110 piggy.$(suffix_y) piggy.$(suffix_y).o \
111 lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S \ 111 lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S bswapsdi2.o \
112 font.o font.c head.o misc.o $(OBJS) 112 bswapsdi2.S font.o font.c head.o misc.o $(OBJS)
113 113
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 $(libfdt) $(libfdt_hdrs) \ 116 lib1funcs.S ashldi3.S bswapsdi2.S $(libfdt) $(libfdt_hdrs) \
117 hyp-stub.S 117 hyp-stub.S
118 118
119ifeq ($(CONFIG_FUNCTION_TRACER),y) 119ifeq ($(CONFIG_FUNCTION_TRACER),y)
@@ -156,6 +156,12 @@ ashldi3 = $(obj)/ashldi3.o
156$(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S 156$(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S
157 $(call cmd,shipped) 157 $(call cmd,shipped)
158 158
159# For __bswapsi2, __bswapdi2
160bswapsdi2 = $(obj)/bswapsdi2.o
161
162$(obj)/bswapsdi2.S: $(srctree)/arch/$(SRCARCH)/lib/bswapsdi2.S
163 $(call cmd,shipped)
164
159# We need to prevent any GOTOFF relocs being used with references 165# We need to prevent any GOTOFF relocs being used with references
160# to symbols in the .bss section since we cannot relocate them 166# to symbols in the .bss section since we cannot relocate them
161# independently from the rest at run time. This can be achieved by 167# independently from the rest at run time. This can be achieved by
@@ -177,7 +183,8 @@ if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \
177fi 183fi
178 184
179$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ 185$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
180 $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) FORCE 186 $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) \
187 $(bswapsdi2) FORCE
181 @$(check_for_multiple_zreladdr) 188 @$(check_for_multiple_zreladdr)
182 $(call if_changed,ld) 189 $(call if_changed,ld)
183 @$(check_for_bad_syms) 190 @$(check_for_bad_syms)