cpu/x86/64bit: Specify linker to be used for cbfs PT

When clang supports linking bare metal targets it defaults to LLD for
linking which linking those raw data structures used to generate CBFS
page tables does not fare well.

Change-Id: I66fb374a456ea752a97a41426c5a98e6747f3a92
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84057
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Arthur Heymans 2024-08-23 13:37:39 +02:00 committed by Felix Held
commit f48bf2e5e6

View file

@ -13,7 +13,7 @@ all_x86-y += $(PAGETABLE_SRC)
# 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) -o $@.tmp $< -Wl,--section-start=.rodata=$(CONFIG_ARCH_X86_64_PGTBL_LOC),--defsym=_start=0 -fuse-ld=bfd
$(OBJCOPY_ramstage) -Obinary -j .rodata $@.tmp $@
rm $@.tmp