1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Enable --lzma for PackMach*.

This commit is contained in:
John Reiser 2007-02-07 11:23:21 -08:00
parent 4cb57d9059
commit fb39d6304a
2 changed files with 7 additions and 4 deletions

View File

@ -63,11 +63,10 @@ PackMachBase<T>::~PackMachBase()
} }
template <class T> template <class T>
const int *PackMachBase<T>::getCompressionMethods(int /*method*/, int /*level*/) const const int *PackMachBase<T>::getCompressionMethods(int method, int level) const
{ {
// There really is no LE bias in M_NRV2E_LE32. // There really is no LE bias.
static const int m_nrv2e[] = { M_NRV2E_LE32, M_END }; return Packer::getDefaultCompressionMethods_le32(method, level);
return m_nrv2e;
} }

View File

@ -213,6 +213,8 @@ const char *Packer::getDecompressorSections() const
|| UPX_F_LINUX_ELF32_ARMBE==ph.format || UPX_F_LINUX_ELF32_ARMBE==ph.format
|| UPX_F_BSD_ELF_i386 ==ph.format || UPX_F_BSD_ELF_i386 ==ph.format
|| UPX_F_VMLINUX_ARM ==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; 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_LINUX_ELF32_ARMBE==ph.format
|| UPX_F_BSD_ELF_i386 ==ph.format || UPX_F_BSD_ELF_i386 ==ph.format
|| UPX_F_VMLINUX_ARM ==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! // ELF calls the decompressor many times; the parameters change!
return; return;