about summary refs log tree commit diff
path: root/elf/setup-vdso.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-15 14:35:31 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-18 09:51:56 -0300
commit5118dcac68c4eadfd6304bb33adde63d062dc07f (patch)
treea36d657aa4cf152f6eee05feac6d7171cb3816ad /elf/setup-vdso.h
parent1d3decee997ba2fc24af81803299b2f4f3c47063 (diff)
downloadglibc-5118dcac68c4eadfd6304bb33adde63d062dc07f.tar.gz
glibc-5118dcac68c4eadfd6304bb33adde63d062dc07f.tar.xz
glibc-5118dcac68c4eadfd6304bb33adde63d062dc07f.zip
elf: Fix elf_get_dynamic_info() for bootstrap
THe d6d89608ac8c broke powerpc for --enable-bind-now because it turned
out that different than patch assumption rtld elf_get_dynamic_info()
does require to handle RTLD_BOOTSTRAP to avoid DT_FLAGS and
DT_RUNPATH (more specially the GLRO usage which is not reallocate
yet).

This patch fixes by passing two arguments to elf_get_dynamic_info()
to inform that by rtld (bootstrap) or static pie initialization
(static_pie_bootstrap).  I think using explicit argument is way more
clear and burried C preprocessor, and compiler should remove the
dead code.

I checked on x86_64 and i686 with default options, --enable-bind-now,
and --enable-bind-now and --enable--static-pie.  I also check on
aarch64, armhf, powerpc64, and powerpc with default and
--enable-bind-now.
Diffstat (limited to 'elf/setup-vdso.h')
-rw-r--r--elf/setup-vdso.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/setup-vdso.h b/elf/setup-vdso.h
index f44748bc98..3f20578046 100644
--- a/elf/setup-vdso.h
+++ b/elf/setup-vdso.h
@@ -64,7 +64,7 @@ setup_vdso (struct link_map *main_map __attribute__ ((unused)),
       l->l_map_end += l->l_addr;
       l->l_text_end += l->l_addr;
       l->l_ld = (void *) ((ElfW(Addr)) l->l_ld + l->l_addr);
-      elf_get_dynamic_info (l);
+      elf_get_dynamic_info (l, false, false);
       _dl_setup_hash (l);
       l->l_relocated = 1;