From fb39d6304a41e5de5cbafc5ad874fbbe5cbdb90f Mon Sep 17 00:00:00 2001 From: John Reiser Date: Wed, 7 Feb 2007 11:23:21 -0800 Subject: [PATCH] Enable --lzma for PackMach*. --- src/p_mach.cpp | 7 +++---- src/packer_c.cpp | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/p_mach.cpp b/src/p_mach.cpp index 8b44c8f1..8dbf2b93 100644 --- a/src/p_mach.cpp +++ b/src/p_mach.cpp @@ -63,11 +63,10 @@ PackMachBase::~PackMachBase() } template -const int *PackMachBase::getCompressionMethods(int /*method*/, int /*level*/) const +const int *PackMachBase::getCompressionMethods(int method, int level) const { - // There really is no LE bias in M_NRV2E_LE32. - static const int m_nrv2e[] = { M_NRV2E_LE32, M_END }; - return m_nrv2e; + // There really is no LE bias. + return Packer::getDefaultCompressionMethods_le32(method, level); } diff --git a/src/packer_c.cpp b/src/packer_c.cpp index 561b081e..d888703c 100644 --- a/src/packer_c.cpp +++ b/src/packer_c.cpp @@ -213,6 +213,8 @@ const char *Packer::getDecompressorSections() const || UPX_F_LINUX_ELF32_ARMBE==ph.format || UPX_F_BSD_ELF_i386 ==ph.format || UPX_F_VMLINUX_ARM ==ph.format + || UPX_F_MACH_PPC32 ==ph.format + || UPX_F_MACH_i386 ==ph.format ) { return opt->small ? lzma_elf_small : lzma_elf_fast; } @@ -247,6 +249,8 @@ void Packer::defineDecompressorSymbols() || UPX_F_LINUX_ELF32_ARMBE==ph.format || UPX_F_BSD_ELF_i386 ==ph.format || UPX_F_VMLINUX_ARM ==ph.format + || UPX_F_MACH_PPC32 ==ph.format + || UPX_F_MACH_i386 ==ph.format ) { // ELF calls the decompressor many times; the parameters change! return;