arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
authorTom Rini <trini@ti.com>
Thu, 25 Apr 2013 07:40:22 +0000 (07:40 +0000)
committernotaz <notasas@gmail.com>
Sat, 2 Jul 2016 21:27:08 +0000 (00:27 +0300)
While other architectures have enabled these gcc / ld options for some
time on U-Boot itself, ARM has only been doing this on SPL.  Enable this
on full U-Boot as well now.

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Tom Rini <trini@ti.com>
arch/arm/config.mk

index 24b9d7c..c43ebdd 100644 (file)
@@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
 endif
 endif
 
+LDFLAGS_FINAL += --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 # Choose between ARM/Thumb instruction sets