diff options
author | Thomas Chou <thomas@wytron.com.tw> | 2010-05-28 12:08:10 +0800 |
---|---|---|
committer | Scott McNutt <smcnutt@psyent.com> | 2010-07-12 11:30:51 -0400 |
commit | cb2da50f0f7b62f2ef806bdc61ec34d103542fbb (patch) | |
tree | 0bf401bd30feb85d871398395ed1e00a6e8b9745 /arch | |
parent | 54841ab50c20d6fa6c9cc3eb826989da3a22d934 (diff) | |
download | u-boot-midas-cb2da50f0f7b62f2ef806bdc61ec34d103542fbb.tar.gz u-boot-midas-cb2da50f0f7b62f2ef806bdc61ec34d103542fbb.tar.bz2 u-boot-midas-cb2da50f0f7b62f2ef806bdc61ec34d103542fbb.zip |
nios2: use gc sections to reduce image size
Follow the discussion of Charles Manning and Mike Frysinger.
Using gc_sections helps reduce image size.
Configuring for nios2-generic board...
Before,
text data bss dec hex filename
123979 3724 22892 150595 24c43 /tmp/u-boot/u-boot
After,
text data bss dec hex filename
115983 3800 22732 142515 22cb3 /tmp/u-boot/u-boot
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/nios2/config.mk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk index 793cc43a1c..aba96b3019 100644 --- a/arch/nios2/config.mk +++ b/arch/nios2/config.mk @@ -30,3 +30,6 @@ PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__ PLATFORM_CPPFLAGS += -G0 LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds + +LDFLAGS += --gc-sections +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections |