[PATCH 3/8] pbl: have linker define __pbl_board_entry alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 images/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/images/Makefile b/images/Makefile
index 218a24ff1ddd..aa5814710f28 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
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux