glibc/sysdeps/unix/sysv/linux/riscv
Fangrui Song 6838920383 riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
A non-local STV_DEFAULT defined symbol is by default preemptible in a
shared object. j/jal cannot target a preemptible symbol. On other
architectures, such a jump instruction either causes PLT [BZ #18822], or
if short-ranged, sometimes rejected by the linker (but not by GNU ld's
riscv port [ld PR/28509]).

Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead.

With this patch, ld.so and libc.so can be linked with LLD if source
files are compiled/assembled with -mno-relax/-Wa,-mno-relax.

Acked-by: Palmer Dabbelt <palmer@dabbelt.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-10-28 11:39:49 -07:00
..
bits
rv32 String: Add support for __memcmpeq() ABI on all targets 2021-10-26 16:51:29 -05:00
rv64 String: Add support for __memcmpeq() ABI on all targets 2021-10-26 16:51:29 -05:00
sys
Implies
Makefile
Versions
atomic-machine.h
clone.S
configure
configure.ac
dl-cache.h
flush-icache.c
getcontext.S
jmp_buf-macros.h
kernel-features.h
ldconfig.h
ldd-rewrite.sed
localplt.data mtrace: Wean away from malloc hooks 2021-07-22 18:38:06 +05:30
makecontext.c
readelflib.c
register-dump.h
setcontext.S riscv: Fix incorrect jal with HIDDEN_JUMPTARGET 2021-10-28 11:39:49 -07:00
shlib-versions
sigcontextinfo.h
swapcontext.S
syscall.c
sysconf.c
sysdep.S
sysdep.h
ucontext-macros.h
ucontext_i.sym
vfork.S