summaryrefslogtreecommitdiff
path: root/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-02-10 20:35:12 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2017-02-10 20:35:12 +0900
commit4b11dc566a5bbfa1378d6266525c281b028abcc8 (patch)
treeb48831a898906734f8884d08b6e18f1144ee2b82 /src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp
parentdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff)
downloadcoreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.gz
coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.bz2
coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.zip
Imported Upstream version 1.0.0.9910upstream/1.0.0.9910
Diffstat (limited to 'src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp')
-rw-r--r--src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp b/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp
index d7186d7a29..5ac7654780 100644
--- a/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp
+++ b/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp
@@ -313,6 +313,7 @@ int ExecuteManagedAssembly(
std::string appPath;
GetDirectory(managedAssemblyAbsolutePath, appPath);
+ std::string tpaList;
// Construct native search directory paths
std::string nativeDllSearchDirs(appPath);
char *coreLibraries = getenv("CORE_LIBRARIES");
@@ -320,11 +321,14 @@ int ExecuteManagedAssembly(
{
nativeDllSearchDirs.append(":");
nativeDllSearchDirs.append(coreLibraries);
+ if (std::strcmp(coreLibraries, clrFilesAbsolutePath) != 0)
+ {
+ AddFilesFromDirectoryToTpaList(coreLibraries, tpaList);
+ }
}
nativeDllSearchDirs.append(":");
nativeDllSearchDirs.append(clrFilesAbsolutePath);
- std::string tpaList;
AddFilesFromDirectoryToTpaList(clrFilesAbsolutePath, tpaList);
void* coreclrLib = dlopen(coreClrDllPath.c_str(), RTLD_NOW | RTLD_LOCAL);
@@ -443,7 +447,7 @@ int ExecuteManagedAssembly(
}
else
{
- char* error = dlerror();
+ const char* error = dlerror();
fprintf(stderr, "dlopen failed to open the libcoreclr.so with error %s\n", error);
}