aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc85xx/config.mk
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2010-09-29 14:05:56 -0500
committerKumar Gala <galak@kernel.crashing.org>2010-10-20 02:38:41 -0500
commitfbe53f59bd40b3b1ab66dc98859e26589d64d1b7 (patch)
tree5d9d508e595b7a80848ef304deb4f7b6f3d3ff58 /arch/powerpc/cpu/mpc85xx/config.mk
parent68337fb5f6f811cd4485ec14c469551f874d535b (diff)
85xx: Use gc-sections to reduce image size
On an XPedite5370 over 11KBytes were saved: Before: text data bss dec hex filename 332456 33364 33476 399296 617c0 ./u-boot After: text data bss dec hex filename 321075 33836 33476 388387 5ed23 ./u-boot Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/config.mk')
-rw-r--r--arch/powerpc/cpu/mpc85xx/config.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/config.mk b/arch/powerpc/cpu/mpc85xx/config.mk
index f07d9209a..ce4376b10 100644
--- a/arch/powerpc/cpu/mpc85xx/config.mk
+++ b/arch/powerpc/cpu/mpc85xx/config.mk
@@ -25,6 +25,10 @@ PLATFORM_RELFLAGS += -fPIC -meabi
PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
+# Enable gc-sections to enable generation of smaller images.
+PLATFORM_LDFLAGS += --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+
# -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
# see "[PATCH,rs6000] make -mno-spe work as expected" on
# http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html