all: canonicalize win32 and win64 file names
This commit is contained in:
+24
-36
@@ -93,6 +93,28 @@ const int *Packer::getDefaultCompressionMethods_le32(int method, int level, int
|
||||
// loader util
|
||||
**************************************************************************/
|
||||
|
||||
static bool callsManyTimes(int format) {
|
||||
return
|
||||
UPX_F_LINUX_ELF_i386 ==format
|
||||
|| UPX_F_LINUX_ELFI_i386 ==format
|
||||
|| UPX_F_LINUX_ELF64_AMD64==format
|
||||
|| UPX_F_LINUX_ELF32_ARM ==format
|
||||
|| UPX_F_LINUX_ELF32_PPC32 ==format
|
||||
|| UPX_F_LINUX_ELF64_PPC64LE ==format
|
||||
|| UPX_F_LINUX_ELF32_ARMEB==format
|
||||
|| UPX_F_BSD_ELF_i386 ==format
|
||||
|| UPX_F_VMLINUX_ARM ==format
|
||||
|| UPX_F_VMLINUX_ARMEB ==format
|
||||
|| UPX_F_VMLINUX_PPC32 ==format
|
||||
|| UPX_F_VMLINUX_PPC64LE ==format
|
||||
|| UPX_F_VMLINUZ_ARM ==format
|
||||
|| UPX_F_MACH_PPC32 ==format
|
||||
|| UPX_F_MACH_PPC64 ==format
|
||||
|| UPX_F_MACH_i386 ==format
|
||||
|| UPX_F_DYLIB_i386 ==format
|
||||
;
|
||||
}
|
||||
|
||||
const char *Packer::getDecompressorSections() const
|
||||
{
|
||||
static const char nrv2b_le32_small[] =
|
||||
@@ -197,24 +219,7 @@ const char *Packer::getDecompressorSections() const
|
||||
// if (ph.method == M_CL1B_LE32)
|
||||
// return opt->small ? cl1b_le32_small : cl1b_le32_fast;
|
||||
if (M_IS_LZMA(ph.method)) {
|
||||
if (UPX_F_LINUX_ELF_i386 ==ph.format
|
||||
|| UPX_F_LINUX_ELFI_i386 ==ph.format
|
||||
|| UPX_F_LINUX_ELF64_AMD ==ph.format
|
||||
|| UPX_F_LINUX_ELF32_ARMEL==ph.format
|
||||
|| UPX_F_LINUX_ELFPPC32 ==ph.format
|
||||
|| UPX_F_LINUX_ELFPPC64LE ==ph.format
|
||||
|| UPX_F_LINUX_ELF32_ARMEB==ph.format
|
||||
|| UPX_F_BSD_ELF_i386 ==ph.format
|
||||
|| UPX_F_VMLINUZ_ARMEL ==ph.format
|
||||
|| UPX_F_VMLINUX_ARMEL ==ph.format
|
||||
|| UPX_F_VMLINUX_ARMEB ==ph.format
|
||||
|| UPX_F_VMLINUX_PPC32 ==ph.format
|
||||
|| UPX_F_VMLINUX_PPC64LE ==ph.format
|
||||
|| UPX_F_MACH_PPC32 ==ph.format
|
||||
|| UPX_F_MACH_PPC64 ==ph.format
|
||||
|| UPX_F_MACH_i386 ==ph.format
|
||||
|| UPX_F_DYLIB_i386 ==ph.format
|
||||
) {
|
||||
if (callsManyTimes(ph.format)) {
|
||||
return opt->small ? lzma_elf_small : lzma_elf_fast;
|
||||
}
|
||||
return opt->small ? lzma_small : lzma_fast;
|
||||
@@ -240,24 +245,7 @@ unsigned Packer::getDecompressorWrkmemSize() const
|
||||
|
||||
void Packer::defineDecompressorSymbols()
|
||||
{
|
||||
if (UPX_F_LINUX_ELF_i386 ==ph.format
|
||||
|| UPX_F_LINUX_ELFI_i386 ==ph.format
|
||||
|| UPX_F_LINUX_ELF64_AMD ==ph.format
|
||||
|| UPX_F_LINUX_ELF32_ARMEL==ph.format
|
||||
|| UPX_F_LINUX_ELFPPC32 ==ph.format
|
||||
|| UPX_F_LINUX_ELFPPC64LE ==ph.format
|
||||
|| UPX_F_LINUX_ELF32_ARMEB==ph.format
|
||||
|| UPX_F_BSD_ELF_i386 ==ph.format
|
||||
|| UPX_F_VMLINUZ_ARMEL ==ph.format
|
||||
|| UPX_F_VMLINUX_ARMEL ==ph.format
|
||||
|| UPX_F_VMLINUX_ARMEB ==ph.format
|
||||
|| UPX_F_VMLINUX_PPC32 ==ph.format
|
||||
|| UPX_F_VMLINUX_PPC64LE ==ph.format
|
||||
|| UPX_F_MACH_PPC32 ==ph.format
|
||||
|| UPX_F_MACH_PPC64 ==ph.format
|
||||
|| UPX_F_MACH_i386 ==ph.format
|
||||
|| UPX_F_DYLIB_i386 ==ph.format
|
||||
) {
|
||||
if (callsManyTimes(ph.format)) {
|
||||
// ELF calls the decompressor many times; the parameters change!
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user