[coreboot-gerrit] New patch to review for coreboot: f6491e5 x86: garbage collect SMM programs
Aaron Durbin (adurbin@chromium.org)
gerrit at coreboot.org
Fri May 15 22:57:35 CEST 2015
Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10219
-gerrit
commit f6491e52438d6803f825acdac6c16441c6179e26
Author: Aaron Durbin <adurbin at chromium.org>
Date: Fri May 15 15:23:39 2015 -0500
x86: garbage collect SMM programs
The non-module SMM programs were not being garbage collected
during link. Do this so that one doesn't have to add depednecies
for unused funtions in SMM.
Change-Id: I31991496d92191e540df6340c587eec09c7022b3
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
src/cpu/x86/smm/Makefile.inc | 2 +-
src/cpu/x86/smm/smm.ld | 2 +-
src/cpu/x86/smm/smm_tseg.ld | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/cpu/x86/smm/Makefile.inc b/src/cpu/x86/smm/Makefile.inc
index 5164970..a02be49 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
diff --git a/src/cpu/x86/smm/smm.ld b/src/cpu/x86/smm/smm.ld
index 6d33fbe..3fde36e 100644
--- a/src/cpu/x86/smm/smm.ld
+++ b/src/cpu/x86/smm/smm.ld
@@ -48,7 +48,7 @@ SECTIONS
*/
. = 0xa8000 - (( CPUS - 1) * 0x400);
.jumptable : {
- *(.jumptable)
+ KEEP(*(.jumptable));
}
/DISCARD/ : {
diff --git a/src/cpu/x86/smm/smm_tseg.ld b/src/cpu/x86/smm/smm_tseg.ld
index 4dedd2c..49c1a32 100644
--- a/src/cpu/x86/smm/smm_tseg.ld
+++ b/src/cpu/x86/smm/smm_tseg.ld
@@ -19,7 +19,7 @@ SECTIONS
*/
. = 0x8000 - (( CPUS - 1) * 0x400);
.jumptable : {
- *(.jumptable)
+ KEEP(*(.jumptable));
}
/* Data used in early SMM TSEG handler. */
More information about the coreboot-gerrit
mailing list