This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
About the dll search algorithm of dlopen
- From: Michael Haubenwallner <michael dot haubenwallner at ssi-schaefer dot com>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 1 Jun 2016 08:40:30 +0200
- Subject: About the dll search algorithm of dlopen
- Authentication-results: sourceware.org; auth=none
Hi,
two issues with dlopen here (I'm about to prepare patches):
*) The algorithm to combine dll file name variants with the search path
entries needs to be reordered, as in:
- for each dll file name variant:
- for each search path:
+ for each search path entry:
+ for each dll file name variant:
check if useable
*) The directory of the current main executable should be searched
after LD_LIBRARY_PATH and before /usr/bin:/usr/lib.
And PATH should be searched before /usr/bin:/usr/lib as well.
For consistency, IMO, when any searched path ends in either
x/bin or x/lib, we should search x/bin:x/lib.
Thoughts?
Thanks!
/haubi/