From: Rich Felker Date: Sat, 25 Aug 2012 21:30:59 +0000 (-0400) Subject: use new search_vec function to find vdso in dynamic linker X-Git-Tag: v0.9.5~74 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=08b3c71410e2e4dcbb32d8c6a4fb7c4a8b20ad87;p=oweals%2Fmusl.git use new search_vec function to find vdso in dynamic linker --- diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 6ffda49c..7c1bd890 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -701,9 +701,8 @@ void *__dynlink(int argc, char **argv) decode_dyn(app); /* Attach to vdso, if provided by the kernel */ - for (i=0; auxv[i]; i+=2) { - size_t vdso_base = auxv[i+1]; - if (auxv[i] != AT_SYSINFO_EHDR) continue; + if (search_vec(auxv, aux, AT_SYSINFO_EHDR)) { + size_t vdso_base = *aux; ehdr = (void *)vdso_base; phdr = (void *)(vdso_base + ehdr->e_phoff); for (i=ehdr->e_phnum; i; i--, phdr=(void *)((char *)phdr + ehdr->e_phentsize)) { @@ -717,7 +716,6 @@ void *__dynlink(int argc, char **argv) decode_dyn(vdso); vdso->prev = lib; lib->next = vdso; - break; } /* Initial dso chain consists only of the app. We temporarily