about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/riscv/swapcontext.S
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2022-09-16 21:31:27 +0200
committerDJ Delorie <dj@redhat.com>2022-09-16 23:25:45 -0400
commit22c96052acf78c5f4644117bece38715fc7210cf (patch)
tree578c52f2c9d03da45664759520d63df607acfc58 /sysdeps/unix/sysv/linux/riscv/swapcontext.S
parent5652e12cce80825297c3e0666991deb10310343c (diff)
downloadglibc-22c96052acf78c5f4644117bece38715fc7210cf.tar.gz
glibc-22c96052acf78c5f4644117bece38715fc7210cf.tar.xz
glibc-22c96052acf78c5f4644117bece38715fc7210cf.zip
RISC-V: Allow long jumps to __syscall_error
__syscall_error may end up farther than 1MiB away from a caller,
especially when linking statically large binaries. tail allows for
4GiB jumps and is reduced to j when a linked symbol is within range.

Fixes: 36960f0c76 ("RISC-V: Linux Syscall Interface")
Fixes: 7f33b09c65 ("RISC-V: Linux ABI")
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/riscv/swapcontext.S')
-rw-r--r--sysdeps/unix/sysv/linux/riscv/swapcontext.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/riscv/swapcontext.S b/sysdeps/unix/sysv/linux/riscv/swapcontext.S
index 4da615f6d4..287ba364cd 100644
--- a/sysdeps/unix/sysv/linux/riscv/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/riscv/swapcontext.S
@@ -118,7 +118,7 @@ LEAF (__swapcontext)
 	jr	t1
 
 
-99:	j	__syscall_error
+99:	tail	__syscall_error
 
 PSEUDO_END (__swapcontext)