about summary refs log tree commit diff
path: root/ldso
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2016-07-25 22:52:58 -0500
committerRich Felker <dalias@aerifal.cx>2016-11-11 12:58:27 -0500
commit54482898abe8d6d937ee67ea5974cd8eae859c37 (patch)
tree400a5d1fbfee1cb3b90f3a215f3da7b771dca3c9 /ldso
parentb418ea1b66d0d5a08640d4edf3b65d4619c6ef7f (diff)
downloadmusl-54482898abe8d6d937ee67ea5974cd8eae859c37.tar.gz
musl-54482898abe8d6d937ee67ea5974cd8eae859c37.tar.xz
musl-54482898abe8d6d937ee67ea5974cd8eae859c37.zip
treat null vdso base same as missing
On s390x, the kernel provides AT_SYSINFO_EHDR, but sets it to zero, if the
program being run does not have a program interpreter.  This causes
problems when running the dynamic linker directly.
Diffstat (limited to 'ldso')
-rw-r--r--ldso/dynlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldso/dynlink.c b/ldso/dynlink.c
index ad49cac2..c6890845 100644
--- a/ldso/dynlink.c
+++ b/ldso/dynlink.c
@@ -1550,7 +1550,7 @@ _Noreturn void __dls3(size_t *sp)
 	}
 
 	/* Attach to vdso, if provided by the kernel */
-	if (search_vec(auxv, &vdso_base, AT_SYSINFO_EHDR)) {
+	if (search_vec(auxv, &vdso_base, AT_SYSINFO_EHDR) && vdso_base) {
 		Ehdr *ehdr = (void *)vdso_base;
 		Phdr *phdr = vdso.phdr = (void *)(vdso_base + ehdr->e_phoff);
 		vdso.phnum = ehdr->e_phnum;