From c2fe1e0a0999f65f7954ba88b69e63c3d2737291 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Thu, 14 Mar 2013 17:53:19 -0700 Subject: 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 Reviewed-on: http://review.coreboot.org/2727 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/cpu/x86/smm/Makefile.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cpu/x86/smm/Makefile.inc') diff --git a/src/cpu/x86/smm/Makefile.inc b/src/cpu/x86/smm/Makefile.inc index ee4dbeaae0..b595a36924 100644 --- a/src/cpu/x86/smm/Makefile.inc +++ b/src/cpu/x86/smm/Makefile.inc @@ -18,7 +18,6 @@ ## ifeq ($(CONFIG_SMM_MODULES),y) - 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))) -- cgit v1.2.3