提交 5f88c0ed 编写于 作者: R Rich Felker

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.
上级 dcd60371
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册