diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-10-05 12:09:54 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-10-05 12:09:54 -0400 |
commit | 5f88c0edd5db0916cbbcdec9042d4986ca778ae8 (patch) | |
tree | a9e9a236a57080915052499b6de4e5b56eee2fe0 /src/ldso/dynlink.c | |
parent | dcd60371500a74d489372cac7240674c992c2484 (diff) | |
download | musl-5f88c0edd5db0916cbbcdec9042d4986ca778ae8.tar.gz musl-5f88c0edd5db0916cbbcdec9042d4986ca778ae8.tar.xz musl-5f88c0edd5db0916cbbcdec9042d4986ca778ae8.zip |
small dynamic linker module search fix
libraries loaded more than once by pathname should not get shortnames that would cause them to later be used to satisfy non-pathname load requests.
Diffstat (limited to 'src/ldso/dynlink.c')
-rw-r--r-- | src/ldso/dynlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index f2bcd0f3..3f9bc145 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -483,7 +483,8 @@ static struct dso *load_library(const char *name) /* If this library was previously loaded with a * pathname but a search found the same inode, * setup its shortname so it can be found by name. */ - if (!p->shortname) p->shortname = strrchr(p->name, '/')+1; + if (!p->shortname && pathname != name) + p->shortname = strrchr(p->name, '/')+1; close(fd); p->refcnt++; return p; |