Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/70161?usp=email )
Change subject: soc/ti/am335x: Use Linker instead of compiler to link ......................................................................
soc/ti/am335x: Use Linker instead of compiler to link
Clang does not work that well as a linker for the header as it will default to other linkers which do not work well here. Instead just use the linker directly.
Change-Id: Id6ba42b470349a4b138a65b2a037f16a65982ef7 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/70161 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/soc/ti/am335x/Makefile.mk 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/soc/ti/am335x/Makefile.mk b/src/soc/ti/am335x/Makefile.mk index e09a0f7..66192f3 100644 --- a/src/soc/ti/am335x/Makefile.mk +++ b/src/soc/ti/am335x/Makefile.mk @@ -26,6 +26,7 @@
real-target: $(obj)/MLO
+omap-header-y += header.ld header_ld := $(call src-to-obj,omap-header,$(dir)/header.ld)
get_header_size= \ @@ -33,11 +34,10 @@
$(obj)/omap-header.bin: $$(omap-header-objs) $(objcbfs)/bootblock.bin @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC_omap-header) -nostdlib -nostartfiles -static -include $(obj)/config.h \ - -Wl,--defsym,header_load_size=$(strip \ + $(LD_omap-header) --defsym header_load_size=$(strip \ $(call get_header_size,$(obj)/coreboot.rom) \ - ) \ - -o $@.tmp $< -T $(header_ld) + ) -L$(obj) --whole-archive --start-group $(filter-out %.ld,$(omap-header-objs)) --end-group \ + -o $@.tmp -T $(header_ld) $(OBJCOPY_omap-header) --only-section=".header" -O binary $@.tmp $@
$(obj)/MLO: $(obj)/coreboot.rom $(obj)/omap-header.bin