aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86/smm/Makefile.inc
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-05-15 15:23:39 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-05-19 10:36:48 +0200
commit58d5e21851ced6b475a87e3a4114b2c7e1125921 (patch)
treee40e3600e246bfd5d0639184ed6470d478a6b5c8 /src/cpu/x86/smm/Makefile.inc
parente645bcae7ccf1d7e4e75aa7d9149df5dae1d19c4 (diff)
x86: garbage collect SMM programs
The non-module SMM programs were not being garbage collected during linking. Do this so that one doesn't have to add dependencies for unused functions in SMM. TEST=Interrogated readelf -e smm.elf on both builds as well as diffed the symbol table. Runtime testing was not done. Change-Id: I31991496d92191e540df6340c587eec09c7022b3 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/10219 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/cpu/x86/smm/Makefile.inc')
-rw-r--r--src/cpu/x86/smm/Makefile.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpu/x86/smm/Makefile.inc b/src/cpu/x86/smm/Makefile.inc
index 5164970441..a02be49ef4 100644
--- a/src/cpu/x86/smm/Makefile.inc
+++ b/src/cpu/x86/smm/Makefile.inc
@@ -82,7 +82,7 @@ endif
else # CONFIG_SMM_MODULES
$(obj)/cpu/x86/smm/smm_wrap: $(obj)/cpu/x86/smm/smm.o $(src)/cpu/x86/smm/$(SMM_LDSCRIPT)
- $(LD_smm) $(SMM_LDFLAGS) -nostdlib -nostartfiles -static -o $(obj)/cpu/x86/smm/smm.elf -T $(src)/cpu/x86/smm/$(SMM_LDSCRIPT) $(obj)/cpu/x86/smm/smm.o
+ $(LD_smm) $(SMM_LDFLAGS) -nostdlib -nostartfiles --gc-sections -static -o $(obj)/cpu/x86/smm/smm.elf -T $(src)/cpu/x86/smm/$(SMM_LDSCRIPT) $(obj)/cpu/x86/smm/smm.o
$(NM_smm) -n $(obj)/cpu/x86/smm/smm.elf | sort > $(obj)/cpu/x86/smm/smm.map
$(OBJCOPY_smm) -O binary $(obj)/cpu/x86/smm/smm.elf $(obj)/cpu/x86/smm/smm