qemu/common-user/host
Icenowy Zheng 22b448ccc6 common-user/host/riscv: use tail pseudoinstruction for calling tail
The j pseudoinstruction maps to a JAL instruction, which can only handle
a jump to somewhere with a signed 20-bit destination. In case of static
linking and LTO'ing this easily leads to "relocation truncated to fit"
error.

Switch to use tail pseudoinstruction, which is the standard way to
tail-call a function in medium code model (emits AUIPC+JALR).

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250417072206.364008-1-uwu@icenowy.me>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Cc: qemu-stable@nongnu.org
2025-05-19 13:38:04 +10:00
..
aarch64 common-user: Adjust system call return on FreeBSD 2021-12-20 10:12:29 -08:00
arm common-user: Adjust system call return on FreeBSD 2021-12-20 10:12:29 -08:00
i386 common-user: Really fix i386 calls to safe_syscall_set_errno_tail 2022-01-04 21:14:23 -08:00
loongarch64 common-user: Add safe syscall handling for loongarch64 hosts 2021-12-21 13:17:06 -08:00
mips common-user: Fix tail calls to safe_syscall_set_errno_tail 2022-01-04 15:41:03 -08:00
ppc common-user/host/ppc: Implement safe-syscall.inc.S 2023-01-23 14:39:48 -10:00
ppc64 common-user: Move safe-syscall.* from linux-user 2021-12-20 10:12:24 -08:00
riscv common-user/host/riscv: use tail pseudoinstruction for calling tail 2025-05-19 13:38:04 +10:00
s390x common-user: Move safe-syscall.* from linux-user 2021-12-20 10:12:24 -08:00
sparc64 common-user/host/sparc64: Fix safe_syscall_base 2022-02-09 08:46:23 +11:00
x86_64 common-user: Fix tail calls to safe_syscall_set_errno_tail 2022-01-04 15:41:03 -08:00