From 8882192fac52d6625301eca89f285c86b3bce92e Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Thu, 29 Jun 2006 14:38:18 +0200 Subject: [PATCH] Minor cleanups. --- src/p_djgpp2.cpp | 4 +--- src/p_vmlinx.cpp | 4 +--- src/p_vmlinz.cpp | 4 ---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/p_djgpp2.cpp b/src/p_djgpp2.cpp index 17258ef1..bcda7a0a 100644 --- a/src/p_djgpp2.cpp +++ b/src/p_djgpp2.cpp @@ -294,10 +294,8 @@ void PackDjgpp2::pack(OutputFile *fo) ft.addvalue = text->vaddr - hdrsize; // compress upx_compress_config_t cconf; cconf.reset(); -#if 1 // limit stack size needed for runtime decompression - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ~28 kB stack -#endif + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack compressWithFilters(&ft, 512, 0, NULL, &cconf); // patch coff header #2 diff --git a/src/p_vmlinx.cpp b/src/p_vmlinx.cpp index 19d2562c..8a26889b 100644 --- a/src/p_vmlinx.cpp +++ b/src/p_vmlinx.cpp @@ -221,10 +221,8 @@ void PackVmlinuxI386::pack(OutputFile *fo) ft.addvalue = 0; // we are independent of actual runtime address; see ckt32 upx_compress_config_t cconf; cconf.reset(); -#if 1 //{ // limit stack size needed for runtime decompression cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack -#endif //} compressWithFilters(&ft, 512, 0, NULL, &cconf); const unsigned lsize = getLoaderSize(); @@ -285,7 +283,7 @@ void PackVmlinuxI386::pack(OutputFile *fo) ph.level = 1; } } - compress(ibuf, obuf); + compress(ibuf, obuf, &cconf); ph.level = old_level; // while (0!=*p++) ; // name is the same diff --git a/src/p_vmlinz.cpp b/src/p_vmlinz.cpp index 6ffb87e9..5cf4f266 100644 --- a/src/p_vmlinz.cpp +++ b/src/p_vmlinz.cpp @@ -279,10 +279,8 @@ void PackVmlinuzI386::pack(OutputFile *fo) // compress upx_compress_config_t cconf; cconf.reset(); -#if 1 //{ // limit stack size needed for runtime decompression cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack -#endif //} compressWithFilters(&ft, 512, 0, NULL, &cconf); const unsigned lsize = getLoaderSize(); @@ -360,10 +358,8 @@ void PackBvmlinuzI386::pack(OutputFile *fo) ft.addvalue = kernel_entry; // saves 4 bytes in unfilter code upx_compress_config_t cconf; cconf.reset(); -#if 1 //{ // limit stack size needed for runtime decompression cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack -#endif //} compressWithFilters(&ft, 512, 0, NULL, &cconf); // align everything to dword boundary - it is easier to handle