Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84057?usp=email )
Change subject: cpu/x86/64bit: Compile and link separately ......................................................................
cpu/x86/64bit: Compile and link separately
When clang supports linking bare metal targets it has troubles doing so for page tables. So instead compile and link in separate phases.
Change-Id: I66fb374a456ea752a97a41426c5a98e6747f3a92 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/64bit/Makefile.mk 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/84057/1
diff --git a/src/cpu/x86/64bit/Makefile.mk b/src/cpu/x86/64bit/Makefile.mk index 1fda087..e1d6f32 100644 --- a/src/cpu/x86/64bit/Makefile.mk +++ b/src/cpu/x86/64bit/Makefile.mk @@ -13,9 +13,10 @@
# Add --defsym=_start=0 to suppress a linker warning. $(objcbfs)/pt: $(dir)/$(PAGETABLE_SRC) $(obj)/config.h - $(CC_bootblock) $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) -o $@.tmp $< -Wl,--section-start=.rodata=$(CONFIG_ARCH_X86_64_PGTBL_LOC),--defsym=_start=0 + $(CC_bootblock) $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) -c -o $@.o $< + $(LD_bootblock) $@.o -o $@.tmp --section-start=.rodata=$(CONFIG_ARCH_X86_64_PGTBL_LOC) --defsym=_start=0 $(OBJCOPY_ramstage) -Obinary -j .rodata $@.tmp $@ - rm $@.tmp + rm $@.o
cbfs-files-$(CONFIG_PAGE_TABLES_IN_CBFS) += pagetables pagetables-file := $(objcbfs)/pt