diff options
author | Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> | 2016-09-02 14:57:20 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-09-08 14:36:32 +0300 |
commit | f763e2dc88d04430dd2524a529eef91a2e517e4e (patch) | |
tree | 32de31ff7ff76234d1c60c5432cb7e21b4b9c45d /winsup/cygwin/fhandler.cc | |
parent | b37c3ed5e57e528adf73548882cf252a79c014dd (diff) |
dlopen: on x/lib search x/bin if exe is in x/binnewlib-snapshot-20160923
On 09/02/2016 11:03 AM, Corinna Vinschen wrote:
> On Sep 2 10:46, Michael Haubenwallner wrote:
>> On 09/01/2016 03:32 PM, Corinna Vinschen wrote:
>>> You could just use the global variable program_invocation_name. If in
>>> doubt, use the Windows path global_progname and convert it to full POSIX
>>> via cygwin_conv_path.
>>
>> Patch updated, using global_progname now.
>
> Looks good and you're right to do it this way since I just noticed
> that program_invocation_name may return a relative pathname.
Yep.
> Btw., in other calls which require the full POSIX path we use
> mount_table->conv_to_posix_path instead of cygwin_conv_path (see
> e. g. fillout_pinfo()). It's a bit faster. Maybe something for a
> followup patch.
No problem - attached.
This renders the original patch 4/4 valid again.
> Note for some later improvement: I really wonder why we don't store
> the absolute POSIX path of the current executable globally yet...
Same here.
Thanks!
/haubi/
>From f7255edd33cb4abe34f27188aab8dccdfa5dd2a0 Mon Sep 17 00:00:00 2001
From: Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
Date: Wed, 31 Aug 2016 18:05:11 +0200
Subject: [PATCH 3/4] dlopen: on x/lib search x/bin if exe is in x/bin
citing https://cygwin.com/ml/cygwin-developers/2016-08/msg00020.html
> Consider the file /usr/bin/cygz.dll:
> - dlopen (libz.so) success
> - dlopen (/usr/bin/libz.so) success
> - dlopen (/usr/lib/libz.so) fails
* dlfcn.c (dlopen): For dlopen("x/lib/N"), when the application
executable is in "x/bin/", search for "x/bin/N" before "x/lib/N".
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
0 files changed, 0 insertions, 0 deletions