glibc/sysdeps/riscv
H.J. Lu f42373f911 ld.so: Replace DL_RO_DYN_SECTION with dl_relocate_ld [BZ #28340]
We can't relocate entries in dynamic section if it is readonly:

1. Add a l_ld_readonly field to struct link_map to indicate if dynamic
section is readonly and set it based on p_flags of PT_DYNAMIC segment.
2. Replace DL_RO_DYN_SECTION with dl_relocate_ld to decide if dynamic
section should be relocated.
3. Remove DL_RO_DYN_TEMP_CNT.
4. Don't use a static dynamic section to make readonly dynamic section
in vDSO writable.
5. Remove the temp argument from elf_get_dynamic_info.

This fixes BZ #28340.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit b413280cfb)
2021-11-03 07:50:30 +01: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 nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rvf Update math: redirect roundeven function 2021-06-27 07:56:57 -07: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 riscv: Initialize $gp before resolving the IRELATIVE relocation 2021-01-10 21:25:16 -05:00
dl-relocate-ld.h ld.so: Replace DL_RO_DYN_SECTION with dl_relocate_ld [BZ #28340] 2021-11-03 07:50:30 +01: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-11-03 07:50:30 +01: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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08: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
tls-macros.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00