1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Cleanups.

committer: mfx <mfx> 978563615 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2001-01-03 23:13:35 +00:00
parent 823ac11eb3
commit 7766b08f08
7 changed files with 31 additions and 20 deletions

View File

@ -62,7 +62,9 @@ const int *PackCom::getCompressionMethods(int method, int level) const
const int *PackCom::getFilters() const
{
static const int filters[] = { 0x06, 0x03, 0x04, 0x01, 0x05, 0x02, -1 };
static const int filters[] = {
0x06, 0x03, 0x04, 0x01, 0x05, 0x02,
-1 };
return filters;
}
@ -138,21 +140,23 @@ void PackCom::patchLoader(OutputFile *fo,
int PackCom::buildLoader(const Filter *ft)
{
const int filter_id = ft->id;
initLoader(nrv2b_loader,sizeof(nrv2b_loader));
addLoader("COMMAIN1""COMSUBSI",
ph.first_offset_found == 1 ? "COMSBBBP" : "",
"COMPSHDI",
filter_id ? "COMCALLT" : "",
ft->id ? "COMCALLT" : "",
"COMMAIN2""UPX1HEAD""COMCUTPO""NRV2B160",
filter_id ? "NRVDDONE" : "NRVDRETU",
ft->id ? "NRVDDONE" : "NRVDRETU",
"NRVDECO1",
ph.max_offset_found <= 0xd00 ? "NRVLED00" : "NRVGTD00",
"NRVDECO2""NRV2B169",
NULL
);
if (filter_id)
addFilter16(filter_id);
if (ft->id)
{
assert(ft->calls > 0);
addFilter16(ft->id);
}
return getLoaderSize();
}

View File

@ -67,8 +67,9 @@ const int *PackDjgpp2::getCompressionMethods(int method, int level) const
const int *PackDjgpp2::getFilters() const
{
static const int filters[] = { 0x26, 0x24, 0x11, 0x14, 0x13, 0x16,
0x25, 0x15, 0x12, -1 };
static const int filters[] = {
0x26, 0x24, 0x11, 0x14, 0x13, 0x16, 0x25, 0x15, 0x12,
-1 };
return filters;
}

View File

@ -104,20 +104,22 @@ void PackSys::patchLoader(OutputFile *fo,
int PackSys::buildLoader(const Filter *ft)
{
const int filter_id = ft->id;
initLoader(nrv2b_loader,sizeof(nrv2b_loader));
addLoader("SYSMAIN1",
opt->cpu == opt->CPU_8086 ? "SYSI0861" : "SYSI2861",
"SYSMAIN2""SYSSUBSI",
ph.first_offset_found == 1 ? "SYSSBBBP" : "",
filter_id ? "SYSCALLT" : "",
ft->id ? "SYSCALLT" : "",
"SYSMAIN3""UPX1HEAD""SYSCUTPO""NRV2B160""NRVDDONE""NRVDECO1",
ph.max_offset_found <= 0xd00 ? "NRVLED00" : "NRVGTD00",
"NRVDECO2""NRV2B169",
NULL
);
if (filter_id)
addFilter16(filter_id);
if (ft->id)
{
assert(ft->calls > 0);
addFilter16(ft->id);
}
addLoader("SYSMAIN5",
opt->cpu == opt->CPU_8086 ? "SYSI0862" : "SYSI2862",
"SYSJUMP1",

View File

@ -64,8 +64,9 @@ const int *PackTmt::getCompressionMethods(int method, int level) const
const int *PackTmt::getFilters() const
{
static const int filters[] = { 0x26, 0x24, 0x11, 0x14, 0x13, 0x16,
0x25, 0x12, 0x15, -1 };
static const int filters[] = {
0x26, 0x24, 0x11, 0x14, 0x13, 0x16, 0x25, 0x12, 0x15,
-1 };
return filters;
}

View File

@ -73,8 +73,9 @@ const int *PackVmlinuzI386::getCompressionMethods(int method, int level) const
const int *PackVmlinuzI386::getFilters() const
{
static const int filters[] = { 0x26, 0x24, 0x11, 0x14, 0x13, 0x16,
0x25, 0x15, 0x12, -1 };
static const int filters[] = {
0x26, 0x24, 0x11, 0x14, 0x13, 0x16, 0x25, 0x15, 0x12,
-1 };
return filters;
}

View File

@ -115,8 +115,9 @@ const int *PackW32Pe::getCompressionMethods(int method, int level) const
const int *PackW32Pe::getFilters() const
{
static const int filters[] = { 0x26, 0x24, 0x16, 0x13, 0x14, 0x11,
0x25, 0x15, 0x12, -1 };
static const int filters[] = {
0x26, 0x24, 0x16, 0x13, 0x14, 0x11, 0x25, 0x15, 0x12,
-1 };
return filters;
}

View File

@ -83,8 +83,9 @@ const int *PackWcle::getCompressionMethods(int method, int level) const
const int *PackWcle::getFilters() const
{
static const int filters[] = { 0x26, 0x24, 0x14, 0x11, 0x16, 0x13,
0x25, 0x12, 0x15, -1 };
static const int filters[] = {
0x26, 0x24, 0x14, 0x11, 0x16, 0x13, 0x25, 0x12, 0x15,
-1 };
return filters;
}