merge
This commit is contained in:
+5
-5
@@ -202,14 +202,14 @@ int PackVmlinuzI386::decompressKernel()
|
||||
}
|
||||
// Find "ljmp $__BOOT_CS,$__PHYSICAL_START" if any.
|
||||
if (0==memcmp("\xEA\x00\x00", p, 3) && 0==(0xf & p[3]) && 0==p[4]) {
|
||||
/* whole megabyte < 16MB */
|
||||
/* whole megabyte < 16 MiB */
|
||||
physical_start = get_te32(1+ p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (base && relocated) {
|
||||
p = base + relocated;
|
||||
for (int j= 0; j < 0x200; ++j, ++p) {
|
||||
for (j = 0; j < 0x200; ++j, ++p) {
|
||||
if (0==memcmp("\x01\x9c\x0b", p, 3) // addl %ebx,d32(%ebx,%ecx)
|
||||
) {
|
||||
page_offset = 0u - get_te32(3+ p);
|
||||
@@ -401,7 +401,7 @@ void PackVmlinuzI386::pack(OutputFile *fo)
|
||||
// compress
|
||||
upx_compress_config_t cconf; cconf.reset();
|
||||
// limit stack size needed for runtime decompression
|
||||
cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack
|
||||
cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack
|
||||
compressWithFilters(&ft, 512, &cconf);
|
||||
|
||||
const unsigned lsize = getLoaderSize();
|
||||
@@ -516,7 +516,7 @@ void PackBvmlinuzI386::pack(OutputFile *fo)
|
||||
|
||||
upx_compress_config_t cconf; cconf.reset();
|
||||
// limit stack size needed for runtime decompression
|
||||
cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack
|
||||
cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack
|
||||
|
||||
// FIXME: new stub allows most of low memory as stack for Bvmlinuz ?
|
||||
//cconf.conf_lzma.max_num_probs = (0x99000 - 0x10250)>>1; // ushort: 560560 stack
|
||||
@@ -624,7 +624,7 @@ int PackVmlinuzI386::canUnpack()
|
||||
void PackVmlinuzI386::unpack(OutputFile *fo)
|
||||
{
|
||||
// no uncompression support for this format, so that
|
||||
// it is possible to remove the original deflate code (>10KB)
|
||||
// it is possible to remove the original deflate code (>10 KiB)
|
||||
|
||||
// FIXME: but we could write the uncompressed "vmlinux" image
|
||||
|
||||
|
||||
Reference in New Issue
Block a user