From 54482898abe8d6d937ee67ea5974cd8eae859c37 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Mon, 25 Jul 2016 22:52:58 -0500 Subject: 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. --- ldso/dynlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldso') 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; -- cgit v1.2.1