[coreboot-gerrit] New patch to review for coreboot: 4fb0077 arm: add missing gc-sections for ramstage

Isaac Christensen (isaac.christensen@se-eng.com) gerrit at coreboot.org
Tue Sep 23 01:55:01 CEST 2014


Isaac Christensen (isaac.christensen at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6956

-gerrit

commit 4fb007704a59bcce1a7d342afceb3cb80f213e4e
Author: Isaac Christensen <isaac.christensen at se-eng.com>
Date:   Mon Sep 22 17:18:11 2014 -0600

    arm: add missing gc-sections for ramstage
    
    This is a fix up for recent patch:
    c505837 arm: Have the linker garbage-collect unused functions and variables
    
    I missed adding --gc-sections to a couple of the ramstage lines.
    
    Change-Id: I81178eb99fddbd99c603c79ba506db51af975b27
    Signed-off-by: Isaac Christensen <isaac.christensen at se-eng.com>
---
 src/arch/arm/Makefile.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/arch/arm/Makefile.inc b/src/arch/arm/Makefile.inc
index 0c1cfc6..427e3a4 100644
--- a/src/arch/arm/Makefile.inc
+++ b/src/arch/arm/Makefile.inc
@@ -114,9 +114,9 @@ ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c)
 $(objcbfs)/ramstage.debug: $$(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage) $(src)/arch/arm/ramstage.ld $(obj)/ldoptions
 	@printf "    CC         $(subst $(obj)/,,$(@))\n"
 ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
-	$(LD_ramstage) -m armelf_linux_eabi -o $@ -L$(obj) $< -T $(src)/arch/arm/ramstage.ld
+	$(LD_ramstage) -m armelf_linux_eabi --gc-sections -o $@ -L$(obj) $< -T $(src)/arch/arm/ramstage.ld
 else
-	$(CC_ramstage) $(CFLAGS_ramstage) -nostdlib -nostartfiles -static -o $@ -L$(obj) -Wl,--start-group $(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage) -Wl,--end-group -T $(src)/arch/arm/ramstage.ld
+	$(CC_ramstage) $(CFLAGS_ramstage) -nostdlib -Wl,--gc-sections -static -o $@ -L$(obj) -Wl,--start-group $(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage) -Wl,--end-group -T $(src)/arch/arm/ramstage.ld
 endif
 
 $(objgenerated)/ramstage.o: $(stages_o) $$(ramstage-objs) $(LIBGCC_FILE_NAME_ramstage)



More information about the coreboot-gerrit mailing list