summaryrefslogtreecommitdiff
path: root/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp
diff options
context:
space:
mode:
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 d7186d7..5ac7654 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);
}