summaryrefslogtreecommitdiff
path: root/src/ldso/dynlink.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-26 21:50:01 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-26 21:50:01 -0400
commit97507bde474b0091a28628a7dae943c377758d49 (patch)
tree31e25a8460d8fcdcb176107bfe7f74d510eeee0e /src/ldso/dynlink.c
parent0e4dae3d77f67bed0cd29c98b67b86c7d9853ac9 (diff)
downloadmusl-97507bde474b0091a28628a7dae943c377758d49.tar.gz
add RTLD_DEFAULT support
Diffstat (limited to 'src/ldso/dynlink.c')
-rw-r--r--src/ldso/dynlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index a23390e1..1cab8d12 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -541,7 +541,8 @@ static void *do_dlsym(struct dso *p, const char *s)
size_t i;
uint32_t h;
Sym *sym;
- if (p == head) return find_sym(head, s, 0);
+ if (p == head || p == RTLD_DEFAULT)
+ return find_sym(head, s, 0);
h = hash(s);
sym = lookup(s, h, p->syms, p->hashtab, p->strings);
if (sym && sym->st_value && (1<<(sym->st_info&0xf) & OK_TYPES))