]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
authorTom Rini <trini@ti.com>
Thu, 25 Apr 2013 07:40:22 +0000 (07:40 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 23 May 2013 10:09:56 +0000 (12:09 +0200)
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
arch/arm/cpu/ixp/config.mk

index 461899eabc741d2ce95b02d3112014556205bde5..dc64160789cc91527cc34d46cfbc31d2a93dbdbd 100644 (file)
@@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
 endif
 endif
 
+LDFLAGS_FINAL += --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+
 # Support generic board on ARM
 __HAVE_ARCH_GENERIC_BOARD := y
 
index b02e8af6ecbcae84a8d8784fa5bb138cc8a63c0b..fd3c29f62428a9931aab31ad6c1293107c663c59 100644 (file)
@@ -31,10 +31,6 @@ PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100
 PLATFORM_LDFLAGS += -EB
 USE_PRIVATE_LIBGCC = yes
 
-# -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error
-PLATFORM_RELFLAGS += -ffunction-sections
-LDFLAGS_u-boot += --gc-sections
-
 # =========================================================================
 #
 # Supply options according to compiler version