Skip to content
Snippets Groups Projects
Commit cb2da50f authored by Thomas Chou's avatar Thomas Chou Committed by Scott McNutt
Browse files

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: default avatarThomas Chou <thomas@wytron.com.tw>
Signed-off-by: default avatarScott McNutt <smcnutt@psyent.com>
parent 54841ab5
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment