Enable generation of unique default base address for system dlls by default
authorGleb Balykov <g.balykov@samsung.com>
Thu, 4 Jul 2019 10:30:19 +0000 (13:30 +0300)
committer조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Tue, 16 Jul 2019 05:05:17 +0000 (14:05 +0900)
This behavior can be changed manually in source code: nitool.cc -> doGenUniqueBaseSystem

NativeLauncher/tool/nitool.cc

index 39aedda..cadb864 100644 (file)
@@ -47,9 +47,6 @@ static void help(const char *argv0)
                "       --reset-system      - Remove System NI files\n"
                "       --reset-pkg         - Remove App NI files\n"
                "       --regen-all-app     - Re-generate All App NI files\n"
-#ifdef UNIQUE_DEFAULT_BASE_ADDR_SUPPORT
-               "       --gen-unique-baddr-system - Generate unique base addr for dll\n"
-#endif
                "\n"
                "Example:\n"
                "1. Create native image for dlls and exes under platform directories\n"
@@ -59,13 +56,8 @@ static void help(const char *argv0)
                "3. Create native image under the package's bin and lib directory\n"
                "   # %s --pkg org.tizen.FormsGallery\n"
                "4. Regenerate native images for all installed .net packages with ready-to-run option\n"
-               "   # %s --r2r --regen-all-app\n\n"
-#ifdef UNIQUE_DEFAULT_BASE_ADDR_SUPPORT
-               "5. Generate unique base addr for system dll\n"
-               "   # %s --gen-unique-baddr-system --dll /usr/bin/Tizen.Runtime.dll\n\n"
-#endif
-               ;
-       printf(helpDesc, argv0, argv0, argv0, argv0, argv0, argv0);
+               "   # %s --r2r --regen-all-app\n\n";
+       printf(helpDesc, argv0, argv0, argv0, argv0, argv0);
 }
 
 int main(int argc, char* argv[])
@@ -77,7 +69,7 @@ int main(int argc, char* argv[])
        bool enableR2R = false;
        bool pkgDllMode = false;
 
-       bool doGenUniqueBaseSystem = false;
+       bool doGenUniqueBaseSystem = true;
 
        NiCommonOption option = {std::string(), std::string(), std::string()};
        if (initNICommon(&option) != NI_ERROR_NONE) {
@@ -89,14 +81,6 @@ int main(int argc, char* argv[])
                enableR2R = true;
        }
 
-       if (cmdOptionExists(argv, argv+argc, "--gen-unique-baddr-system")) {
-#ifdef UNIQUE_DEFAULT_BASE_ADDR_SUPPORT
-               doGenUniqueBaseSystem = true;
-#else
-               fprintf(stderr, "--gen-unique-baddr-system is not supported\n");
-#endif
-       }
-
        if (cmdOptionExists(argv, argv+argc, "--help")) {
                help(argv[0]);
                return 0;