From 1bfe5342744cc6f3f487627fb28b273eea7f4b27 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 12 May 2023 12:56:54 -0700 Subject: [PATCH] riscv64: don't use jalr when we can just say call. We don't actually care about the length of this jump, and lld will relax it to a jal when possible anyway. Better to have people copy & paste call and tail than jal and j. Test: treehugger Change-Id: I889044b95fbb5567189a0d6ef31f81df0e0383cd --- linker/arch/riscv64/begin.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linker/arch/riscv64/begin.S b/linker/arch/riscv64/begin.S index f7509c6dd..21665cbe9 100644 --- a/linker/arch/riscv64/begin.S +++ b/linker/arch/riscv64/begin.S @@ -33,7 +33,7 @@ ENTRY(_start) .cfi_undefined ra mv a0, sp - jal __linker_init + call __linker_init // __linker_init returns the address of the entry point in the main image. jr a0