[coreboot] Patch set updated for coreboot: 9b69e39 SMM: link against libgcc

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Fri Mar 15 20:29:07 CET 2013

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2727


commit 9b69e39d197345c063c84581da217edf2f39b0e6
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Thu Mar 14 17:53:19 2013 -0700

    SMM: link against libgcc
    The non-relocatable SMM code was changed to link against libgcc a while back
    so that printk could use built-in division instead of a hand crafted div()
    function. However, the relocatable SMM code was not adapted by mistake.
    This patch links the relocatable SMM against libgcc, too, so we can enable it
    for Haswell.
    Change-Id: Ia64a78e2e62348d115ae4ded52d1a02c74c5cea4
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
 src/cpu/x86/smm/Makefile.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cpu/x86/smm/Makefile.inc b/src/cpu/x86/smm/Makefile.inc
index ee4dbea..b595a36 100644
--- a/src/cpu/x86/smm/Makefile.inc
+++ b/src/cpu/x86/smm/Makefile.inc
@@ -18,7 +18,6 @@
 smmstub-y += smm_stub.S
 smmstub-y += smm_module_header.c
@@ -48,8 +47,9 @@ $(obj)/cpu/x86/smm/smmstub.ramstage.o: $(obj)/cpu/x86/smm/smmstub
 # C-based SMM handler.
-$(obj)/cpu/x86/smm/smm.o: $$(smm-objs)
-	$(CC) $(LDFLAGS) -nostdlib -r -o $@ $^
+$(obj)/cpu/x86/smm/smm.o: $$(smm-objs) $(LIBGCC_FILE_NAME)
+	$(CC) $(LDFLAGS) -nostdlib -r -o $@ -Wl,--wrap,__divdi3 -Wl,--wrap,__udivdi3 -Wl,--wrap,__moddi3 -Wl,--wrap,__umoddi3 -Wl,--start-group $(smm-objs) $(LIBGCC_FILE_NAME) -Wl,--end-group
 $(eval $(call rmodule_link,$(obj)/cpu/x86/smm/smm.elf, $(obj)/cpu/x86/smm/smm.o, $(CONFIG_SMM_MODULE_HEAP_SIZE)))

More information about the coreboot mailing list