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.
This commit is contained in:
committed by
Rich Felker
parent
b418ea1b66
commit
54482898ab
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user