From b983e29fb0726ea63f1718d3f9049ccc19197b26 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Mon, 3 Jul 2006 01:40:59 +0200 Subject: [PATCH] Fix compilation on big endian machines. Remove trailing whitespace. --- src/p_vmlinx.cpp | 8 ++++---- src/p_vmlinz.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/p_vmlinx.cpp b/src/p_vmlinx.cpp index 717590f6..17e892bf 100644 --- a/src/p_vmlinx.cpp +++ b/src/p_vmlinx.cpp @@ -125,7 +125,7 @@ bool PackVmlinuxI386::canPack() 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->readx(phdri, ehdri.e_phnum * sizeof(*phdri)); @@ -223,7 +223,7 @@ void PackVmlinuxI386::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 - compressWithFilters(&ft, 512, 0, NULL, &cconf); + compressWithFilters(&ft, 512, 0, NULL, &cconf); const unsigned lsize = getLoaderSize(); MemBuffer loader(lsize); @@ -360,8 +360,8 @@ int PackVmlinuxI386::canUnpack() // find the .shstrtab section char shstrtab[40]; - Elf32_Shdr *p, *p_shstrtab=0; - shdri = new Elf32_Shdr[(unsigned) ehdri.e_shnum]; + Elf_LE32_Shdr *p, *p_shstrtab=0; + shdri = new Elf_LE32_Shdr[(unsigned) ehdri.e_shnum]; fi->seek(ehdri.e_shoff, SEEK_SET); fi->readx(shdri, ehdri.e_shnum * sizeof(*shdri)); int j; diff --git a/src/p_vmlinz.cpp b/src/p_vmlinz.cpp index 13cf57c6..96e0bfae 100644 --- a/src/p_vmlinz.cpp +++ b/src/p_vmlinz.cpp @@ -281,7 +281,7 @@ void PackVmlinuzI386::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 - compressWithFilters(&ft, 512, 0, NULL, &cconf); + compressWithFilters(&ft, 512, 0, NULL, &cconf); freezeLoader(); const unsigned lsize = getLoaderSize(); @@ -362,7 +362,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 - compressWithFilters(&ft, 512, 0, NULL, &cconf); + compressWithFilters(&ft, 512, 0, NULL, &cconf); // align everything to dword boundary - it is easier to handle unsigned c_len = ph.c_len;