summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-10-24 08:57:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-26 06:21:19 +0200
commit392ef1e9c0e27e5abc75fc41176ad0f25016921a (patch)
tree5cfcc8217edec3ccd1166c3f811b90641cd5c68b
parenteb8006c2e04e8410763c51120ea3d9989f704ad3 (diff)
downloadbarebox-392ef1e9c0e27e5abc75fc41176ad0f25016921a.tar.gz
barebox-392ef1e9c0e27e5abc75fc41176ad0f25016921a.tar.xz
pbl: have linker define __pbl_board_entry alias
We want the board-specific entry points to have control over what code comes first. So far, we solved this by setting the entry point on the linker command line and doing the early setup in inline assembly. As __attribute__((naked)) is not supported for arm64, we'll move there to out-of-line assembly and thus we'll need a way to portably reference the board-specific entry point. Define a new alias that points at it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221024065716.1215046-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--images/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/images/Makefile b/images/Makefile
index 218a24ff1d..aa5814710f 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -59,6 +59,7 @@ $(pbl-lds): $(obj)/../arch/$(SRCARCH)/lib/pbl.lds.S FORCE
quiet_cmd_elf__ ?= LD $@
cmd_elf__ ?= $(LD) $(LDFLAGS_pbl) --gc-sections \
-e $(2) -Map $@.map $(LDFLAGS_$(@F)) -o $@ \
+ --defsym=__pbl_board_entry=$(2) \
-T $(pbl-lds) \
--whole-archive $(BAREBOX_PBL_OBJS) $(obj)/piggy.o \
$(obj)/sha_sum.o