Linux preserve /proc/self/exe; --unmap-all-pages option

This commit is contained in:
John Reiser
2010-02-28 15:58:08 -08:00
parent 79783abeb1
commit f03f42ca4d
27 changed files with 5755 additions and 5540 deletions
+9 -2
View File
@@ -365,6 +365,9 @@ void
PackLinuxElf::addStubEntrySections(Filter const *)
{
addLoader("ELFMAINX", NULL);
if (hasLoaderSection("ELFMAINXu")) {
addLoader((opt->o_unix.unmap_all_pages ? "LUNMP000" : "LUNMP001"), "ELFMAINXu", NULL);
}
//addLoader(getDecompressorSections(), NULL);
addLoader(
( M_IS_NRV2E(ph.method) ? "NRV_HEAD,NRV2E,NRV_TAIL"
@@ -374,7 +377,11 @@ PackLinuxElf::addStubEntrySections(Filter const *)
: NULL), NULL);
if (hasLoaderSection("CFLUSH"))
addLoader("CFLUSH");
addLoader("ELFMAINY,IDENTSTR,+40,ELFMAINZ,FOLDEXEC", NULL);
addLoader("ELFMAINY,IDENTSTR,+40,ELFMAINZ", NULL);
if (hasLoaderSection("ELFMAINZu")) {
addLoader((opt->o_unix.unmap_all_pages ? "LUNMP000" : "LUNMP001"), "ELFMAINZu", NULL);
}
addLoader("FOLDEXEC", NULL);
}
@@ -618,7 +625,7 @@ void PackLinuxElf32x86::addStubEntrySections(Filter const *ft)
}
addLoader("IDENTSTR", NULL);
addLoader("LEXEC020", NULL);
addLoader("LEXEC020", (opt->o_unix.unmap_all_pages ? "LUNMP000" : "LUNMP001"), "LEXEC025", NULL);
addLoader("FOLDEXEC", NULL);
}