mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Removed options_t::win32_pe::strip_loadconf.
For compatibility reasons the option is still accepted (but ignored) during commandline parsing. committer: mfx <mfx> 1139866279 +0000
This commit is contained in:
parent
5d45ce5cf7
commit
891d6be4a6
|
@ -869,9 +869,6 @@ Extra options available for this executable format:
|
|||
unexpected value in a header field.
|
||||
Use with care.
|
||||
|
||||
--strip-loadconf=0 Don't strip Structured Exception Handling load config [DEFAULT].
|
||||
--strip-loadconf=1 Strip Structured Exception Handling load config.
|
||||
|
||||
--strip-relocs=0 Don't strip relocation records.
|
||||
--strip-relocs=1 Strip relocation records. [DEFAULT]
|
||||
This option only works on executables with base
|
||||
|
|
|
@ -229,8 +229,6 @@ void show_help(int x)
|
|||
" --compress-icons=1 compress all but the first icon\n"
|
||||
" --compress-icons=2 compress all but the first icon directory [default]\n"
|
||||
" --compress-resources=0 do not compress any resources at all\n"
|
||||
" --strip-loadconf=0 do not strip SEH load config [default]\n"
|
||||
" --strip-loadconf=1 strip SEH load config [DANGEROUS]\n"
|
||||
" --strip-relocs=0 do not strip relocations\n"
|
||||
" --strip-relocs=1 strip relocations [default]\n"
|
||||
" --all-methods try all available compression methods\n"
|
||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -71,7 +71,6 @@ void init_options(struct options_t *o)
|
|||
for (unsigned i = 0; i < TABLESIZE(o->win32_pe.compress_rt); i++)
|
||||
o->win32_pe.compress_rt[i] = -1;
|
||||
o->win32_pe.compress_rt[24] = false; // 24 == RT_MANIFEST
|
||||
o->win32_pe.strip_loadconf = -1;
|
||||
o->win32_pe.strip_relocs = -1;
|
||||
}
|
||||
|
||||
|
@ -688,10 +687,7 @@ static int do_option(int optc, const char *arg)
|
|||
//printf("compress_resources: %d\n", opt->win32_pe.compress_resources);
|
||||
break;
|
||||
case 633:
|
||||
opt->win32_pe.strip_loadconf = 1;
|
||||
if (mfx_optarg && strcmp(mfx_optarg,"0") == 0)
|
||||
opt->win32_pe.strip_loadconf = 0;
|
||||
//printf("strip_loadconf: %d\n", opt->win32_pe.strip_loadconf);
|
||||
// opt->win32_pe.strip_loadconf - OBSOLETE - IGNORED
|
||||
break;
|
||||
case 634:
|
||||
opt->win32_pe.strip_relocs = 1;
|
||||
|
@ -851,7 +847,7 @@ static const struct mfx_option longopts[] =
|
|||
{"compress-exports", 2, 0, 630},
|
||||
{"compress-icons", 2, 0, 631},
|
||||
{"compress-resources", 2, 0, 632},
|
||||
{"strip-loadconf", 0x12, 0, 633},
|
||||
{"strip-loadconf", 0x12, 0, 633}, // OBSOLETE - IGNORED
|
||||
{"strip-relocs", 0x12, 0, 634},
|
||||
// ps1/exe
|
||||
{"boot-only", 0x10, 0, 670},
|
||||
|
@ -933,7 +929,7 @@ static const struct mfx_option longopts[] =
|
|||
{"compress-exports", 2, 0, 630},
|
||||
{"compress-icons", 2, 0, 631},
|
||||
{"compress-resources", 2, 0, 632},
|
||||
{"strip-loadconf", 0x12, 0, 633},
|
||||
{"strip-loadconf", 0x12, 0, 633}, // OBSOLETE - IGNORED
|
||||
{"strip-relocs", 0x12, 0, 634},
|
||||
|
||||
{ NULL, 0, NULL, 0 }
|
||||
|
|
|
@ -133,7 +133,6 @@ struct options_t {
|
|||
int compress_icons;
|
||||
int compress_resources;
|
||||
signed char compress_rt[25]; // 25 == RT_LAST
|
||||
int strip_loadconf;
|
||||
int strip_relocs;
|
||||
} win32_pe;
|
||||
};
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
This file is part of the UPX executable compressor.
|
||||
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Laszlo Molnar
|
||||
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2006 Laszlo Molnar
|
||||
All Rights Reserved.
|
||||
|
||||
UPX and the UCL library are free software; you can redistribute them
|
||||
|
@ -1550,9 +1550,6 @@ int PackArmPe::buildLoader(const Filter *ft)
|
|||
|
||||
void PackArmPe::pack(OutputFile *fo)
|
||||
{
|
||||
if (opt->win32_pe.strip_loadconf < 0)
|
||||
opt->win32_pe.strip_loadconf = false;
|
||||
|
||||
const unsigned objs = ih.objects;
|
||||
isection = new pe_section_t[objs];
|
||||
fi->seek(pe_offset+sizeof(ih),SEEK_SET);
|
||||
|
@ -1589,10 +1586,6 @@ void PackArmPe::pack(OutputFile *fo)
|
|||
if (IDSIZE(PEDIR_RELOC))
|
||||
throwCantPack("relocations not yet supported");
|
||||
|
||||
// Structured Exception Handling
|
||||
if (!opt->win32_pe.strip_loadconf && IDSIZE(PEDIR_LOADCONF))
|
||||
throwCantPack("Structured Exception Handling present (try --strip-loadconf)");
|
||||
|
||||
if (isdll)
|
||||
opt->win32_pe.strip_relocs = false;
|
||||
else if (opt->win32_pe.strip_relocs < 0)
|
||||
|
@ -1882,12 +1875,6 @@ void PackArmPe::pack(OutputFile *fo)
|
|||
ODADDR(PEDIR_BOUNDIM) = 0;
|
||||
ODSIZE(PEDIR_BOUNDIM) = 0;
|
||||
|
||||
if (opt->win32_pe.strip_loadconf)
|
||||
{
|
||||
ODADDR(PEDIR_LOADCONF) = 0;
|
||||
ODSIZE(PEDIR_LOADCONF) = 0;
|
||||
}
|
||||
|
||||
// tls is put into section 1
|
||||
|
||||
ic = s1addr + s1size - sotls;
|
||||
|
@ -2047,7 +2034,8 @@ int PackArmPe::canUnpack()
|
|||
}
|
||||
|
||||
void PackArmPe::unpack(OutputFile *)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
vi:ts=4:et
|
||||
|
|
|
@ -1657,9 +1657,6 @@ int PackW32Pe::buildLoader(const Filter *ft)
|
|||
|
||||
void PackW32Pe::pack(OutputFile *fo)
|
||||
{
|
||||
if (opt->win32_pe.strip_loadconf < 0)
|
||||
opt->win32_pe.strip_loadconf = false;
|
||||
|
||||
const unsigned objs = ih.objects;
|
||||
isection = new pe_section_t[objs];
|
||||
fi->seek(pe_offset+sizeof(ih),SEEK_SET);
|
||||
|
@ -1688,12 +1685,6 @@ void PackW32Pe::pack(OutputFile *fo)
|
|||
if (IDSIZE(PEDIR_COMRT))
|
||||
throwCantPack(".NET files (win32/net) are not yet supported");
|
||||
|
||||
#if 0
|
||||
// Structured Exception Handling
|
||||
if (!opt->win32_pe.strip_loadconf && IDSIZE(PEDIR_LOADCONF))
|
||||
throwCantPack("Structured Exception Handling present (try --strip-loadconf)");
|
||||
#endif
|
||||
|
||||
if (isdll)
|
||||
opt->win32_pe.strip_relocs = false;
|
||||
else if (opt->win32_pe.strip_relocs < 0)
|
||||
|
@ -1985,14 +1976,6 @@ void PackW32Pe::pack(OutputFile *fo)
|
|||
ODADDR(PEDIR_BOUNDIM) = 0;
|
||||
ODSIZE(PEDIR_BOUNDIM) = 0;
|
||||
|
||||
#if 0
|
||||
if (opt->win32_pe.strip_loadconf)
|
||||
{
|
||||
ODADDR(PEDIR_LOADCONF) = 0;
|
||||
ODSIZE(PEDIR_LOADCONF) = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// tls is put into section 1
|
||||
|
||||
ic = s1addr + s1size - sotls;
|
||||
|
|
Loading…
Reference in New Issue
Block a user