summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-08-25 17:30:59 -0400
committerRich Felker <dalias@aerifal.cx>2012-08-25 17:30:59 -0400
commit08b3c71410e2e4dcbb32d8c6a4fb7c4a8b20ad87 (patch)
tree960182f97d521267eecb67c234a5a2b58f52bf0d /src
parent731e8ffdcf6877c04092aa9fbd2b17907b8846c7 (diff)
downloadmusl-08b3c71410e2e4dcbb32d8c6a4fb7c4a8b20ad87.tar.gz
musl-08b3c71410e2e4dcbb32d8c6a4fb7c4a8b20ad87.tar.bz2
musl-08b3c71410e2e4dcbb32d8c6a4fb7c4a8b20ad87.tar.xz
musl-08b3c71410e2e4dcbb32d8c6a4fb7c4a8b20ad87.zip
use new search_vec function to find vdso in dynamic linker
Diffstat (limited to 'src')
-rw-r--r--src/ldso/dynlink.c6
1 files changed, 2 insertions, 4 deletions
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