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>
This commit is contained in:
parent
5652e12cce
commit
22c96052ac
|
@ -63,7 +63,7 @@ L (invalid):
|
|||
li a0, -EINVAL
|
||||
/* Something bad happened -- no child created. */
|
||||
L (error):
|
||||
j __syscall_error
|
||||
tail __syscall_error
|
||||
END (__clone)
|
||||
|
||||
/* Load up the arguments to the function. Put this block of code in
|
||||
|
|
|
@ -70,7 +70,7 @@ LEAF (__getcontext)
|
|||
|
||||
ret
|
||||
|
||||
99: j __syscall_error
|
||||
99: tail __syscall_error
|
||||
|
||||
PSEUDO_END (__getcontext)
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ LEAF (__setcontext)
|
|||
|
||||
jr t1
|
||||
|
||||
99: j __syscall_error
|
||||
99: tail __syscall_error
|
||||
|
||||
END (__setcontext)
|
||||
libc_hidden_def (__setcontext)
|
||||
|
|
|
@ -118,7 +118,7 @@ LEAF (__swapcontext)
|
|||
jr t1
|
||||
|
||||
|
||||
99: j __syscall_error
|
||||
99: tail __syscall_error
|
||||
|
||||
PSEUDO_END (__swapcontext)
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
# else
|
||||
# define SYSCALL_ERROR_HANDLER(name) \
|
||||
.Lsyscall_error ## name: \
|
||||
j __syscall_error;
|
||||
tail __syscall_error;
|
||||
# endif
|
||||
|
||||
/* Performs a system call, not setting errno. */
|
||||
|
|
|
@ -39,7 +39,7 @@ LEAF (__libc_vfork)
|
|||
bltz a0, 1f
|
||||
ret
|
||||
|
||||
1: j __syscall_error
|
||||
1: tail __syscall_error
|
||||
END (__libc_vfork)
|
||||
|
||||
weak_alias (__libc_vfork, vfork)
|
||||
|
|
Loading…
Reference in New Issue