]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Blackfin: enable --gc-sections
authorMike Frysinger <vapier@gentoo.org>
Fri, 24 Oct 2008 22:18:16 +0000 (18:18 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 2 Feb 2009 17:24:40 +0000 (12:24 -0500)
Start building all Blackfin boards with -ffunction-sections/-fdata-sections
and linking with --gc-sections.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
blackfin_config.mk
cpu/blackfin/Makefile

index 7bde449263497c0ffc378e0e7e76c89794e674c6..b2d94d5562fb970f077ca2aa003a6d871c7f1f16 100644 (file)
@@ -27,6 +27,9 @@ CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
 PLATFORM_RELFLAGS += -ffixed-P5 -fomit-frame-pointer
 PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
 
+LDFLAGS += --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+
 ifneq (,$(CONFIG_BFIN_CPU))
 PLATFORM_RELFLAGS += -mcpu=$(CONFIG_BFIN_CPU)
 endif
index b4049ff874b7675e3e01bd97b29f42280fc12938..1378fd12bbe9b9292ee22a250070aaf49542c3af 100644 (file)
@@ -47,6 +47,7 @@ $(obj)bootrom-asm-offsets.h: $(obj)bootrom-asm-offsets.s
 
 # make sure our initcode (which goes into LDR) does not
 # have relocs or external references
+$(obj)initcode.o: CFLAGS += -fno-function-sections -fno-data-sections
 READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $<
 check_initcode: $(obj)initcode.o
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)