glibc/sysdeps/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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nofpu Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nptl elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
rv32 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rv64 RISC-V: Update rv64 ULPs 2021-07-21 08:44:09 +02:00
rvd Add narrowing fma functions 2021-09-22 21:25:31 +00:00
rvf Redirect fma calls to __fma in libm 2021-09-15 22:57:35 +00:00
sys Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__longjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bsd-_setjmp.c RISC-V: ABI Implementation 2018-01-29 10:25:29 -08:00
bsd-setjmp.c RISC-V: ABI Implementation 2018-01-29 10:25:29 -08:00
configure RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
configure.ac RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
dl-irel.h riscv: support GNU indirect function 2021-01-10 21:25:13 -05:00
dl-machine.h elf: Fix dynamic-link.h usage on rtld.c 2021-10-14 14:52:07 -03:00
dl-relocate-ld.h ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340] 2021-10-19 06:40:38 -07:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_sqrtl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fpu_control.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gccframe.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies Introduce <elf-initfini.h> and ELF_INITFINI for all architectures 2020-02-18 15:12:25 +01:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldsodefs.h ld.so: Replace DL_RO_DYN_SECTION with dl_relocate_ld [BZ #28340] 2021-09-22 11:12:43 -07:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
linkmap.h RISC-V: ABI Implementation 2018-01-29 10:25:29 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile RISC-V: Build Infastructure 2018-01-29 10:43:15 -08:00
math-tests-snan-payload.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math-tests-trap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memusage.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
preconfigure RISC-V: Build infrastructure for 32-bit port 2020-08-27 08:17:43 -07:00
setjmp.S riscv: Fix incorrect jal with HIDDEN_JUMPTARGET 2021-10-28 11:39:49 -07:00
sfp-machine.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stackinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
start.S Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
tininess.h RISC-V: Generic <math.h> and soft-fp Routines 2018-01-29 10:26:35 -08:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00