Skip to content

Commit 3978fb3

Browse files
authored
SymbolResolver: Use filename when path cannot be found (#1752)
Uses bare filename to pass to `dlopen` when the full path cannot be detected. This helps on systems where library paths are not the same as $PATH.
1 parent 626a362 commit 3978fb3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Runtime/SymbolResolver.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/* Copyright (c) 2013 Xamarin, Inc and contributors
2-
*
2+
*
33
* Permission is hereby granted, free of charge, to any person obtaining
44
* a copy of this software and associated documentation files (the
55
* "Software"), to deal in the Software without restriction, including
66
* without limitation the rights to use, copy, modify, merge, publish,
77
* distribute, sublicense, and/or sell copies of the Software, and to
88
* permit persons to whom the Software is furnished to do so, subject to
99
* the following conditions:
10-
*
10+
*
1111
* The above copyright notice and this permission notice shall be
1212
* included in all copies or substantial portions of the Software.
13-
*
13+
*
1414
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1515
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1616
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -80,8 +80,8 @@ public static IntPtr LoadImage(ref string name)
8080
break;
8181
}
8282
}
83-
if (!File.Exists(attempted))
84-
continue;
83+
if (attempted == null)
84+
attempted = filename;
8585

8686
var ptr = loadImage(attempted);
8787

0 commit comments

Comments
 (0)