mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-23 15:27:52 +00:00
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>
This commit is contained in:
parent
54841ab50c
commit
cb2da50f0f
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue