Add setup of COMPlus_UseDefaultBaseAddr environment variable
[platform/core/dotnet/launcher.git] / NativeLauncher / launcher / dotnet / dotnet_launcher.cc
index 38ebe27..57b6005 100644 (file)
@@ -320,6 +320,10 @@ int CoreRuntime::initialize(bool standalone)
        // Write Debug.WriteLine to stderr
        putenv(const_cast<char *>("COMPlus_DebugWriteToStdErr=1"));
 
+#ifdef USE_DEFAULT_BASE_ADDR
+       putenv(const_cast<char *>("COMPlus_UseDefaultBaseAddr=1"));
+#endif // USE_DEFAULT_BASE_ADDR
+
        // read string from external file and set them to environment value.
        setEnvFromFile();
 
@@ -382,9 +386,9 @@ int CoreRuntime::initialize(bool standalone)
        std::string appRoot = std::string("/proc/self/fd/") + std::to_string(fd);
        std::string appBin = concatPath(appRoot, "bin");
        std::string appLib = concatPath(appRoot, "lib");
-       std::string appTAC = concatPath(appBin, ".TAC.Release");
-       std::string probePath = appBin + ":" + appLib + ":" + appTAC;
-       std::string NIprobePath = concatPath(appBin, APP_NI_SUB_DIR) + ":" + concatPath(appLib, APP_NI_SUB_DIR) + ":" + appTAC;
+       std::string appTac = concatPath(appBin, TAC_SYMLINK_SUB_DIR);
+       std::string probePath = appBin + ":" + appLib + ":" + appTac;
+       std::string NIprobePath = concatPath(appBin, APP_NI_SUB_DIR) + ":" + concatPath(appLib, APP_NI_SUB_DIR) + ":" + appTac;
        std::string tpa = getTPA();
        std::string runtimeDir = getRuntimeDir();
        std::string nativeLibPath = getExtraNativeLibDirs(appRoot) + ":" + appBin + ":" + appLib + ":" + __nativeLibDirectory + ":" + runtimeDir;