]> git.sur5r.net Git - u-boot/commitdiff
examples: enable gc-sections option
authorRob Herring <rob.herring@calxeda.com>
Fri, 4 Oct 2013 15:22:40 +0000 (10:22 -0500)
committerTom Rini <trini@ti.com>
Mon, 4 Nov 2013 16:06:16 +0000 (11:06 -0500)
This fixes building time.c when unreferenced functions are added.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
examples/api/Makefile

index 4d683400e14a1cc8b7da23ea4408356f5353b8b2..33cc91ba711b345613ff4b41ab01746e6d0955ad 100644 (file)
@@ -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