]> git.ipfire.org Git - thirdparty/glibc.git/commit
ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340]
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 23 Sep 2021 16:06:49 +0000 (09:06 -0700)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 3 Nov 2021 06:53:12 +0000 (07:53 +0100)
commit5f36e5c70107ecb59281ef57f9f1c0e37ec3076d
treee423895929ae4c120a637dee7b2002be0b282e2d
parentf42373f911a28d34325a5bfc1ed5a962c89da7eb
ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340]

1. Define DL_RO_DYN_SECTION to initalize bootstrap_map.l_ld_readonly
before calling elf_get_dynamic_info to get dynamic info in bootstrap_map,
2. Define a single

static inline bool
dl_relocate_ld (const struct link_map *l)
{
  /* Don't relocate dynamic section if it is readonly  */
  return !(l->l_ld_readonly || DL_RO_DYN_SECTION);
}

This updates BZ #28340 fix.

(cherry picked from commit 2ec99d8c42b2ff1a1231e4df462a0910a9b7fdef)
elf/rtld.c
sysdeps/generic/dl-relocate-ld.h
sysdeps/generic/ldsodefs.h
sysdeps/mips/dl-relocate-ld.h
sysdeps/riscv/dl-relocate-ld.h