[coreboot-gerrit] New patch to review for coreboot: arch/x86/bootblock: Link in object files selected with bootblock-y

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Fri Oct 2 20:28:26 CET 2015


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11783

-gerrit

commit 02a8d1af7a8c02fd4d5a19743900e26a1e2bc30b
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date:   Fri Oct 2 12:17:56 2015 -0700

    arch/x86/bootblock: Link in object files selected with bootblock-y
    
    As part of preparing for systems with non-memory-mapped media, we want
    to be able to call into C code. This change allows us to link C code
    directly into the bootblock. The steps of going from bootblock main()
    to CAR setup to C code will be implemented in subsequent patches.
    
    Note that a few files selected with bootblock-y will now be compiled
    for the bootblock as well, but since we enabled garbage collection,
    they will not be included in the final binary.
    
    Change-Id: I5ca6dcaf176f5469c6a3bb925859399123493bc6
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 src/arch/x86/Makefile.inc | 7 +++++--
 src/arch/x86/failover.ld  | 3 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index fba07c7..7c07de2 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -110,10 +110,13 @@ $(objgenerated)/bootblock.inc: $(src)/arch/x86/$(subst ",,$(CONFIG_BOOTBLOCK_SOU
 		$< > $(objgenerated)/bootblock.inc.d
 	$(ROMCC) -c -S $(bootblock_romccflags) -I. $(CPPFLAGS_bootblock) $< -o $@
 
-$(objcbfs)/bootblock.debug: $(obj)/arch/x86/bootblock.bootblock.o $(obj)/arch/x86/bootblock.bootblock.ld
+# $(obj)/arch/x86/bootblock.bootblock.ld is part of $(bootblock-objs)
+$(objcbfs)/bootblock.debug: $$(bootblock-objs)
 	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
 	$(LD_bootblock) $(LDFLAGS_common) $(LDFLAGS_x86) -static \
-		-o $@ -L$(obj) $< -T $(obj)/arch/x86/bootblock.bootblock.ld
+		-o $@ -L$(obj) \
+		$(filter %.o,$(bootblock-objs)) \
+		-T $(obj)/arch/x86/bootblock.bootblock.ld \
 
 
 endif # CONFIG_ARCH_BOOTBLOCK_X86_32 / CONFIG_ARCH_BOOTBLOCK_X86_64
diff --git a/src/arch/x86/failover.ld b/src/arch/x86/failover.ld
index d7aa47e..89d5449 100644
--- a/src/arch/x86/failover.ld
+++ b/src/arch/x86/failover.ld
@@ -41,6 +41,8 @@ SECTIONS
 		*(.rom.text);
 		*(.rom.data);
 		*(.rom.data.*);
+		*(.text);
+		*(.text.*);
 		*(.rodata.*);
 		_erom = .;
 	} >rom = 0xff
@@ -63,6 +65,7 @@ SECTIONS
 		*(.note)
 		*(.comment.*)
 		*(.note.*)
+		*(.eh_frame)
 		*(.iplt)
 		*(.rel.*)
 		*(.igot.*)



More information about the coreboot-gerrit mailing list