Patchwork [U-Boot,2/9] examples: enable gc-sections option

login
register
mail settings
Submitter Rob Herring
Date Sept. 8, 2013, 8:12 p.m.
Message ID <1378671174-18535-3-git-send-email-robherring2@gmail.com>
Download mbox | patch
Permalink /patch/273462/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

Rob Herring - Sept. 8, 2013, 8:12 p.m.
From: Rob Herring <rob.herring@calxeda.com>

This fixes building time.c when unreferenced functions are added.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 examples/api/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/examples/api/Makefile b/examples/api/Makefile
index 4d68340..33cc91b 100644
--- a/examples/api/Makefile
+++ b/examples/api/Makefile
@@ -53,7 +53,7 @@  all:	$(obj).depend $(OUTPUT)
 #########################################################################
 
 $(OUTPUT):	$(OBJS)
-		$(LD) -Ttext $(LOAD_ADDR) -o $@ $^ $(PLATFORM_LIBS)
+		$(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $^ $(PLATFORM_LIBS)
 		$(OBJCOPY) -O binary $@ $(OUTPUT).bin 2>/dev/null
 
 # Rule to build generic library C files