From b413280cfb16834450f66f554bc0d618bb513851 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 16 Sep 2021 08:15:29 -0700 Subject: 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 --- sysdeps/riscv/ldsodefs.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sysdeps/riscv/ldsodefs.h') diff --git a/sysdeps/riscv/ldsodefs.h b/sysdeps/riscv/ldsodefs.h index 0c696714a7..8947ffe4b5 100644 --- a/sysdeps/riscv/ldsodefs.h +++ b/sysdeps/riscv/ldsodefs.h @@ -38,11 +38,6 @@ struct La_riscv_retval; struct La_riscv_retval *, \ const char *); -/* Although the RISC-V ABI does not specify that the dynamic section has - to be read-only, it needs to be kept for ABI compatibility. */ - -#define DL_RO_DYN_SECTION 1 - #include_next #endif -- cgit 1.4.1