This commit is contained in:
John Reiser
2006-07-02 19:28:19 -07:00
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -125,7 +125,7 @@ bool PackVmlinuxI386::canPack()
return false; return false;
} }
phdri = new Elf32_Phdr[(unsigned) ehdri.e_phnum]; phdri = new Elf_LE32_Phdr[(unsigned) ehdri.e_phnum];
fi->seek(ehdri.e_phoff, SEEK_SET); fi->seek(ehdri.e_phoff, SEEK_SET);
fi->readx(phdri, ehdri.e_phnum * sizeof(*phdri)); fi->readx(phdri, ehdri.e_phnum * sizeof(*phdri));
@@ -223,7 +223,7 @@ void PackVmlinuxI386::pack(OutputFile *fo)
upx_compress_config_t cconf; cconf.reset(); upx_compress_config_t cconf; cconf.reset();
// limit stack size needed for runtime decompression // 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: ~28KB stack
compressWithFilters(&ft, 512, 0, NULL, &cconf); compressWithFilters(&ft, 512, 0, NULL, &cconf);
const unsigned lsize = getLoaderSize(); const unsigned lsize = getLoaderSize();
MemBuffer loader(lsize); MemBuffer loader(lsize);
@@ -360,8 +360,8 @@ int PackVmlinuxI386::canUnpack()
// find the .shstrtab section // find the .shstrtab section
char shstrtab[40]; char shstrtab[40];
Elf32_Shdr *p, *p_shstrtab=0; Elf_LE32_Shdr *p, *p_shstrtab=0;
shdri = new Elf32_Shdr[(unsigned) ehdri.e_shnum]; shdri = new Elf_LE32_Shdr[(unsigned) ehdri.e_shnum];
fi->seek(ehdri.e_shoff, SEEK_SET); fi->seek(ehdri.e_shoff, SEEK_SET);
fi->readx(shdri, ehdri.e_shnum * sizeof(*shdri)); fi->readx(shdri, ehdri.e_shnum * sizeof(*shdri));
int j; int j;
+2 -2
View File
@@ -281,7 +281,7 @@ void PackVmlinuzI386::pack(OutputFile *fo)
upx_compress_config_t cconf; cconf.reset(); upx_compress_config_t cconf; cconf.reset();
// limit stack size needed for runtime decompression // 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: ~28KB stack
compressWithFilters(&ft, 512, 0, NULL, &cconf); compressWithFilters(&ft, 512, 0, NULL, &cconf);
freezeLoader(); freezeLoader();
const unsigned lsize = getLoaderSize(); const unsigned lsize = getLoaderSize();
@@ -362,7 +362,7 @@ void PackBvmlinuzI386::pack(OutputFile *fo)
upx_compress_config_t cconf; cconf.reset(); upx_compress_config_t cconf; cconf.reset();
// limit stack size needed for runtime decompression // 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: ~28KB stack
compressWithFilters(&ft, 512, 0, NULL, &cconf); compressWithFilters(&ft, 512, 0, NULL, &cconf);
// align everything to dword boundary - it is easier to handle // align everything to dword boundary - it is easier to handle
unsigned c_len = ph.c_len; unsigned c_len = ph.c_len;