mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-12 06:10:10 +00:00
f42373f911
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
)
44 lines
1.5 KiB
C
44 lines
1.5 KiB
C
/* Run-time dynamic linker data structures for loaded ELF shared objects.
|
|
Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library. If not, see
|
|
<https://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef _RISCV_LDSODEFS_H
|
|
#define _RISCV_LDSODEFS_H 1
|
|
|
|
#include <elf.h>
|
|
|
|
struct La_riscv_regs;
|
|
struct La_riscv_retval;
|
|
|
|
#define ARCH_PLTENTER_MEMBERS \
|
|
ElfW(Addr) (*riscv_gnu_pltenter) (ElfW(Sym) *, unsigned int, \
|
|
uintptr_t *, uintptr_t *, \
|
|
const struct La_riscv_regs *, \
|
|
unsigned int *, const char *name, \
|
|
long int *framesizep);
|
|
|
|
#define ARCH_PLTEXIT_MEMBERS \
|
|
unsigned int (*riscv_gnu_pltexit) (ElfW(Sym) *, unsigned int, \
|
|
uintptr_t *, uintptr_t *, \
|
|
const struct La_riscv_regs *, \
|
|
struct La_riscv_retval *, \
|
|
const char *);
|
|
|
|
#include_next <ldsodefs.h>
|
|
|
|
#endif
|