From b58e4e79ff081e1cc4d54208dde4a30c4a776d67 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 22 Feb 2007 10:05:39 +0000 Subject: [PATCH] Use -ffunction-sections and -fdata-sections for all bootloaders git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12449 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/Makefile | 2 +- tools/configure | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bootloader/Makefile b/bootloader/Makefile index 134187d521..342cdc5861 100644 --- a/bootloader/Makefile +++ b/bootloader/Makefile @@ -59,7 +59,7 @@ $(MAXOUTFILE): $(SILENT)rm $(MAXINFILE) $(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) - $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map $(OBJDIR)/bootloader.bin : $(OBJDIR)/bootloader.elf $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ diff --git a/tools/configure b/tools/configure index f2626492fb..0dc191a920 100755 --- a/tools/configure +++ b/tools/configure @@ -1261,11 +1261,9 @@ fi if test -n "$archosrom"; then # Archos SH-based players do this somewhat differently for # some reason - extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections" appsdir='\$(ROOTDIR)/flash/bootbox' apps="bootbox" else - extradefines="-DBOOTLOADER" # for target makefile symbol EXTRA_DEFINES appsdir='\$(ROOTDIR)/bootloader' apps="bootloader" flash="" @@ -1276,6 +1274,7 @@ fi output=$bootoutput fi fi + extradefines="-DBOOTLOADER -ffunction-sections -fdata-sections" bootloader="1" echo "Bootloader build selected" ;;