From 5438a4837b76e41a1cfa7d92423e0b1936fc67d5 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Fri, 15 Feb 2013 16:32:51 -0800 Subject: [PATCH] more AT_PHDR trouble --- src/stub/arm-linux.elf-fold.h | 28 ++++++------- src/stub/armeb-linux.elf-fold.h | 28 ++++++------- src/stub/armel-eabi-linux.elf-fold.h | 32 +++++++-------- src/stub/i386-linux.elf-fold.h | 44 ++++++++++---------- src/stub/mips.r3000-linux.elf-fold.h | 56 +++++++++++++------------- src/stub/mipsel.r3000-linux.elf-fold.h | 56 +++++++++++++------------- src/stub/src/i386-linux.elf-main.c | 7 +++- 7 files changed, 127 insertions(+), 124 deletions(-) diff --git a/src/stub/arm-linux.elf-fold.h b/src/stub/arm-linux.elf-fold.h index 31ad8bde..bee49037 100644 --- a/src/stub/arm-linux.elf-fold.h +++ b/src/stub/arm-linux.elf-fold.h @@ -32,8 +32,8 @@ #define STUB_ARM_LINUX_ELF_FOLD_SIZE 2216 -#define STUB_ARM_LINUX_ELF_FOLD_ADLER32 0xd4fc9615 -#define STUB_ARM_LINUX_ELF_FOLD_CRC32 0xf93ce731 +#define STUB_ARM_LINUX_ELF_FOLD_ADLER32 0xeba4963b +#define STUB_ARM_LINUX_ELF_FOLD_CRC32 0xaa23006f unsigned char stub_arm_linux_elf_fold[2216] = { /* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, @@ -155,24 +155,24 @@ unsigned char stub_arm_linux_elf_fold[2216] = { /* 0x0740 */ 3,160,160,225, 0, 48,160,227, 44, 96,157,229, 2,128,160,225, /* 0x0750 */ 48, 64,157,229,196,254,255,235, 52, 48,157,229, 5, 16,160,227, /* 0x0760 */ 3, 48,100,224,188, 34,214,225, 7, 0,160,225, 52, 48,141,229, -/* 0x0770 */ 48, 80,141,229,156,254,255,235,186, 34,214,225, 7, 0,160,225, -/* 0x0780 */ 4, 16,160,227,152,254,255,235, 6, 32,160,225, 52, 48,146,229, -/* 0x0790 */ 1, 0, 83,227, 32, 32,130,226,251,255,255, 26, 20, 64,130,226, -/* 0x07a0 */ 56, 32,157,229, 8, 48,148,229, 52, 32,130,226, 3, 32,130,224, +/* 0x0770 */ 48, 80,141,229,156,254,255,235, 4, 16,160,227, 7, 0,160,225, +/* 0x0780 */ 186, 34,214,225,152,254,255,235, 52, 80,134,226, 6, 16,160,225, +/* 0x0790 */ 52, 48,145,229, 1, 0, 83,227, 32, 16,129,226,251,255,255, 26, +/* 0x07a0 */ 56, 32,157,229, 28, 48,145,229, 52, 32,130,226, 3, 32,130,224, /* 0x07b0 */ 7, 0,160,225, 3, 16,160,227,139,254,255,235, 60, 48,157,229, /* 0x07c0 */ 12,192,141,226, 4, 48, 44,229, 6, 16,160,225, 48, 32,141,226, /* 0x07d0 */ 7, 48,160,225, 8, 0,160,225, 0,192,141,229, 4,160,141,229, -/* 0x07e0 */ 243,254,255,235, 0, 80,160,225, 9, 16,160,227, 5, 32,160,225, +/* 0x07e0 */ 243,254,255,235, 0, 64,160,225, 9, 16,160,227, 4, 32,160,225, /* 0x07f0 */ 7, 0,160,225,124,254,255,235,188, 18,214,225, 0, 32,160,227, -/* 0x0800 */ 35, 0, 0,234, 0, 48,148,229, 3, 0, 83,227, 30, 0, 0, 26, -/* 0x0810 */ 8, 48,148,229, 8, 0,157,229, 0, 16,160,227, 0, 0,131,224, -/* 0x0820 */ 1, 32,160,225, 86,254,255,235, 0, 64, 80,226, 4, 0, 0,186, +/* 0x0800 */ 35, 0, 0,234, 0, 48,149,229, 3, 0, 83,227, 30, 0, 0, 26, +/* 0x0810 */ 8, 48,149,229, 8, 0,157,229, 0, 16,160,227, 0, 0,131,224, +/* 0x0820 */ 1, 32,160,225, 86,254,255,235, 0, 80, 80,226, 4, 0, 0,186, /* 0x0830 */ 6, 16,160,225, 2, 44,160,227, 77,254,255,235, 2, 12, 80,227, /* 0x0840 */ 1, 0, 0, 10,127, 0,160,227, 72,254,255,235, 0,224,160,227, /* 0x0850 */ 14, 32,160,225, 8,192,141,226, 6, 16,160,225, 7, 48,160,225, -/* 0x0860 */ 4, 0,160,225, 0, 80,141,232,209,254,255,235, 7, 16,160,227, -/* 0x0870 */ 0, 80,160,225, 8, 32,157,229, 7, 0,160,225, 90,254,255,235, -/* 0x0880 */ 4, 0,160,225, 64,254,255,235, 3, 0, 0,234, 32, 64,132,226, -/* 0x0890 */ 1, 32,130,226, 1, 0, 82,225,217,255,255,186, 5, 0,160,225, +/* 0x0860 */ 5, 0,160,225, 0, 80,141,232,209,254,255,235, 7, 16,160,227, +/* 0x0870 */ 0, 64,160,225, 8, 32,157,229, 7, 0,160,225, 90,254,255,235, +/* 0x0880 */ 5, 0,160,225, 64,254,255,235, 3, 0, 0,234, 32, 80,133,226, +/* 0x0890 */ 1, 32,130,226, 1, 0, 82,225,217,255,255,186, 4, 0,160,225, /* 0x08a0 */ 12,208,141,226,240,133,189,232 }; diff --git a/src/stub/armeb-linux.elf-fold.h b/src/stub/armeb-linux.elf-fold.h index 5c905c9f..be674d5d 100644 --- a/src/stub/armeb-linux.elf-fold.h +++ b/src/stub/armeb-linux.elf-fold.h @@ -32,8 +32,8 @@ #define STUB_ARMEB_LINUX_ELF_FOLD_SIZE 2216 -#define STUB_ARMEB_LINUX_ELF_FOLD_ADLER32 0x407c9617 -#define STUB_ARMEB_LINUX_ELF_FOLD_CRC32 0x130d5fbd +#define STUB_ARMEB_LINUX_ELF_FOLD_ADLER32 0x569a963d +#define STUB_ARMEB_LINUX_ELF_FOLD_CRC32 0xd8f67761 unsigned char stub_armeb_linux_elf_fold[2216] = { /* 0x0000 */ 127, 69, 76, 70, 1, 2, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, @@ -155,24 +155,24 @@ unsigned char stub_armeb_linux_elf_fold[2216] = { /* 0x0740 */ 225,160,160, 3,227,160, 48, 0,229,157, 96, 44,225,160,128, 2, /* 0x0750 */ 229,157, 64, 48,235,255,254,196,229,157, 48, 52,227,160, 16, 5, /* 0x0760 */ 224,100, 48, 3,225,214, 34,188,225,160, 0, 7,229,141, 48, 52, -/* 0x0770 */ 229,141, 80, 48,235,255,254,156,225,214, 34,186,225,160, 0, 7, -/* 0x0780 */ 227,160, 16, 4,235,255,254,152,225,160, 32, 6,229,146, 48, 52, -/* 0x0790 */ 227, 83, 0, 1,226,130, 32, 32, 26,255,255,251,226,130, 64, 20, -/* 0x07a0 */ 229,157, 32, 56,229,148, 48, 8,226,130, 32, 52,224,130, 32, 3, +/* 0x0770 */ 229,141, 80, 48,235,255,254,156,227,160, 16, 4,225,160, 0, 7, +/* 0x0780 */ 225,214, 34,186,235,255,254,152,226,134, 80, 52,225,160, 16, 6, +/* 0x0790 */ 229,145, 48, 52,227, 83, 0, 1,226,129, 16, 32, 26,255,255,251, +/* 0x07a0 */ 229,157, 32, 56,229,145, 48, 28,226,130, 32, 52,224,130, 32, 3, /* 0x07b0 */ 225,160, 0, 7,227,160, 16, 3,235,255,254,139,229,157, 48, 60, /* 0x07c0 */ 226,141,192, 12,229, 44, 48, 4,225,160, 16, 6,226,141, 32, 48, /* 0x07d0 */ 225,160, 48, 7,225,160, 0, 8,229,141,192, 0,229,141,160, 4, -/* 0x07e0 */ 235,255,254,243,225,160, 80, 0,227,160, 16, 9,225,160, 32, 5, +/* 0x07e0 */ 235,255,254,243,225,160, 64, 0,227,160, 16, 9,225,160, 32, 4, /* 0x07f0 */ 225,160, 0, 7,235,255,254,124,225,214, 18,188,227,160, 32, 0, -/* 0x0800 */ 234, 0, 0, 35,229,148, 48, 0,227, 83, 0, 3, 26, 0, 0, 30, -/* 0x0810 */ 229,148, 48, 8,229,157, 0, 8,227,160, 16, 0,224,131, 0, 0, -/* 0x0820 */ 225,160, 32, 1,235,255,254, 86,226, 80, 64, 0,186, 0, 0, 4, +/* 0x0800 */ 234, 0, 0, 35,229,149, 48, 0,227, 83, 0, 3, 26, 0, 0, 30, +/* 0x0810 */ 229,149, 48, 8,229,157, 0, 8,227,160, 16, 0,224,131, 0, 0, +/* 0x0820 */ 225,160, 32, 1,235,255,254, 86,226, 80, 80, 0,186, 0, 0, 4, /* 0x0830 */ 225,160, 16, 6,227,160, 44, 2,235,255,254, 77,227, 80, 12, 2, /* 0x0840 */ 10, 0, 0, 1,227,160, 0,127,235,255,254, 72,227,160,224, 0, /* 0x0850 */ 225,160, 32, 14,226,141,192, 8,225,160, 16, 6,225,160, 48, 7, -/* 0x0860 */ 225,160, 0, 4,232,141, 80, 0,235,255,254,209,227,160, 16, 7, -/* 0x0870 */ 225,160, 80, 0,229,157, 32, 8,225,160, 0, 7,235,255,254, 90, -/* 0x0880 */ 225,160, 0, 4,235,255,254, 64,234, 0, 0, 3,226,132, 64, 32, -/* 0x0890 */ 226,130, 32, 1,225, 82, 0, 1,186,255,255,217,225,160, 0, 5, +/* 0x0860 */ 225,160, 0, 5,232,141, 80, 0,235,255,254,209,227,160, 16, 7, +/* 0x0870 */ 225,160, 64, 0,229,157, 32, 8,225,160, 0, 7,235,255,254, 90, +/* 0x0880 */ 225,160, 0, 5,235,255,254, 64,234, 0, 0, 3,226,133, 80, 32, +/* 0x0890 */ 226,130, 32, 1,225, 82, 0, 1,186,255,255,217,225,160, 0, 4, /* 0x08a0 */ 226,141,208, 12,232,189,133,240 }; diff --git a/src/stub/armel-eabi-linux.elf-fold.h b/src/stub/armel-eabi-linux.elf-fold.h index b36b4e57..a6e02b81 100644 --- a/src/stub/armel-eabi-linux.elf-fold.h +++ b/src/stub/armel-eabi-linux.elf-fold.h @@ -32,8 +32,8 @@ #define STUB_ARMEL_EABI_LINUX_ELF_FOLD_SIZE 2316 -#define STUB_ARMEL_EABI_LINUX_ELF_FOLD_ADLER32 0x6c83c1ae -#define STUB_ARMEL_EABI_LINUX_ELF_FOLD_CRC32 0x230ad642 +#define STUB_ARMEL_EABI_LINUX_ELF_FOLD_ADLER32 0x82e7c1d4 +#define STUB_ARMEL_EABI_LINUX_ELF_FOLD_CRC32 0x3d72476c unsigned char stub_armel_eabi_linux_elf_fold[2316] = { /* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, @@ -161,24 +161,24 @@ unsigned char stub_armel_eabi_linux_elf_fold[2316] = { /* 0x07a0 */ 40, 16,141,226, 3,160,160,225, 0, 48,160,227, 44, 96,157,229, /* 0x07b0 */ 2,128,160,225, 48, 64,157,229,198,254,255,235, 52, 48,157,229, /* 0x07c0 */ 5, 16,160,227, 3, 48,100,224,188, 34,214,225, 7, 0,160,225, -/* 0x07d0 */ 52, 48,141,229, 48, 80,141,229,158,254,255,235,186, 34,214,225, -/* 0x07e0 */ 7, 0,160,225, 4, 16,160,227,154,254,255,235, 6, 32,160,225, -/* 0x07f0 */ 52, 48,146,229, 32, 32,130,226, 1, 0, 83,227,251,255,255, 26, -/* 0x0800 */ 20, 64,130,226, 56, 32,157,229, 8, 48,148,229, 52, 32,130,226, +/* 0x07d0 */ 52, 48,141,229, 48, 80,141,229,158,254,255,235, 4, 16,160,227, +/* 0x07e0 */ 7, 0,160,225,186, 34,214,225,154,254,255,235, 52, 80,134,226, +/* 0x07f0 */ 6, 16,160,225, 52, 48,145,229, 32, 16,129,226, 1, 0, 83,227, +/* 0x0800 */ 251,255,255, 26, 56, 32,157,229, 28, 48,145,229, 52, 32,130,226, /* 0x0810 */ 3, 32,130,224, 7, 0,160,225, 3, 16,160,227,141,254,255,235, /* 0x0820 */ 60, 48,157,229, 12,192,141,226, 4, 48, 44,229, 6, 16,160,225, /* 0x0830 */ 48, 32,141,226, 7, 48,160,225, 8, 0,160,225, 0,192,141,229, -/* 0x0840 */ 4,160,141,229,243,254,255,235, 0, 80,160,225, 9, 16,160,227, -/* 0x0850 */ 5, 32,160,225, 7, 0,160,225,126,254,255,235,188, 18,214,225, -/* 0x0860 */ 0, 32,160,227, 35, 0, 0,234, 0, 48,148,229, 3, 0, 83,227, -/* 0x0870 */ 30, 0, 0, 26, 8, 48,148,229, 8, 0,157,229, 0, 16,160,227, -/* 0x0880 */ 0, 0,131,224, 1, 32,160,225, 70,254,255,235, 0, 64, 80,226, +/* 0x0840 */ 4,160,141,229,243,254,255,235, 0, 64,160,225, 9, 16,160,227, +/* 0x0850 */ 4, 32,160,225, 7, 0,160,225,126,254,255,235,188, 18,214,225, +/* 0x0860 */ 0, 32,160,227, 35, 0, 0,234, 0, 48,149,229, 3, 0, 83,227, +/* 0x0870 */ 30, 0, 0, 26, 8, 48,149,229, 8, 0,157,229, 0, 16,160,227, +/* 0x0880 */ 0, 0,131,224, 1, 32,160,225, 70,254,255,235, 0, 80, 80,226, /* 0x0890 */ 4, 0, 0,186, 6, 16,160,225, 2, 44,160,227, 55,254,255,235, /* 0x08a0 */ 2, 12, 80,227, 1, 0, 0, 10,127, 0,160,227, 47,254,255,235, /* 0x08b0 */ 0,224,160,227, 14, 32,160,225, 8,192,141,226, 6, 16,160,225, -/* 0x08c0 */ 7, 48,160,225, 4, 0,160,225, 0, 80,141,232,209,254,255,235, -/* 0x08d0 */ 7, 16,160,227, 0, 80,160,225, 8, 32,157,229, 7, 0,160,225, -/* 0x08e0 */ 92,254,255,235, 4, 0,160,225, 51,254,255,235, 3, 0, 0,234, -/* 0x08f0 */ 32, 64,132,226, 1, 32,130,226, 1, 0, 82,225,217,255,255,186, -/* 0x0900 */ 5, 0,160,225, 12,208,141,226,240,133,189,232 +/* 0x08c0 */ 7, 48,160,225, 5, 0,160,225, 0, 80,141,232,209,254,255,235, +/* 0x08d0 */ 7, 16,160,227, 0, 64,160,225, 8, 32,157,229, 7, 0,160,225, +/* 0x08e0 */ 92,254,255,235, 5, 0,160,225, 51,254,255,235, 3, 0, 0,234, +/* 0x08f0 */ 32, 80,133,226, 1, 32,130,226, 1, 0, 82,225,217,255,255,186, +/* 0x0900 */ 4, 0,160,225, 12,208,141,226,240,133,189,232 }; diff --git a/src/stub/i386-linux.elf-fold.h b/src/stub/i386-linux.elf-fold.h index a05f20e6..0f72005b 100644 --- a/src/stub/i386-linux.elf-fold.h +++ b/src/stub/i386-linux.elf-fold.h @@ -1,5 +1,5 @@ /* i386-linux.elf-fold.h - created from i386-linux.elf-fold.bin, 1745 (0x6d1) bytes + created from i386-linux.elf-fold.bin, 1747 (0x6d3) bytes This file is part of the UPX executable compressor. @@ -31,17 +31,17 @@ */ -#define STUB_I386_LINUX_ELF_FOLD_SIZE 1745 -#define STUB_I386_LINUX_ELF_FOLD_ADLER32 0x9446f17a -#define STUB_I386_LINUX_ELF_FOLD_CRC32 0xce0aaca3 +#define STUB_I386_LINUX_ELF_FOLD_SIZE 1747 +#define STUB_I386_LINUX_ELF_FOLD_ADLER32 0xeabff2db +#define STUB_I386_LINUX_ELF_FOLD_CRC32 0xb6120da4 -unsigned char stub_i386_linux_elf_fold[1745] = { +unsigned char stub_i386_linux_elf_fold[1747] = { /* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0010 */ 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0, /* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0, -/* 0x0040 */ 0, 16,192, 0,209, 6, 0, 0,212, 6, 0, 0, 5, 0, 0, 0, -/* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0,209, 6, 0, 0, 0, 0, 0, 0, +/* 0x0040 */ 0, 16,192, 0,211, 6, 0, 0,212, 6, 0, 0, 5, 0, 0, 0, +/* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0,211, 6, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0080 */ 87, 83, 41,201,186,120, 2, 0, 0,137,230,137,231, 41,219,232, @@ -131,19 +131,19 @@ unsigned char stub_i386_linux_elf_fold[1745] = { /* 0x05c0 */ 52,232,247,251,255,255,139, 69, 12, 15,183, 79, 44,186, 5, 0, /* 0x05d0 */ 0, 0,137, 69, 32,139, 69,236, 41, 93, 36,232,189,252,255,255, /* 0x05e0 */ 15,183, 79, 42,139, 69,236,186, 4, 0, 0, 0,232,172,252,255, -/* 0x05f0 */ 255, 89, 91,131,127, 52, 1,116, 8,131,198, 32,131, 62, 1,235, -/* 0x0600 */ 246,139, 77, 40,186, 3, 0, 0, 0, 3, 78, 8,139, 69,236,131, -/* 0x0610 */ 193, 52,232,134,252,255,255,141, 77,240,255,117,228,137,250, 81, -/* 0x0620 */ 141, 69, 32,255,117,236, 80,139, 69,232,232,137,252,255,255,186, -/* 0x0630 */ 9, 0, 0, 0,137,193,137, 69,224,139, 69,236,232, 92,252,255, -/* 0x0640 */ 255,102,139, 79, 44,131,196, 16, 49,210,102,133,201,116,119,131, -/* 0x0650 */ 62, 3,117,103,139, 93,240, 49,201, 3, 94, 8,137,202,106, 5, -/* 0x0660 */ 88,205,128,133,192,137,198,120, 21,186, 0, 2, 0, 0,137,195, -/* 0x0670 */ 137,249,106, 3, 88,205,128, 61, 0, 2, 0, 0,116, 10,106,127, -/* 0x0680 */ 91,106, 1, 88,205,128,235,254,141, 69,240,137,250,106, 0,137, -/* 0x0690 */ 243, 80,137,240,255,117,236,106, 0,232, 26,252,255,255,139, 77, -/* 0x06a0 */ 240,137, 69,224,139, 69,236,186, 7, 0, 0, 0,232,236,251,255, -/* 0x06b0 */ 255,131,196, 16,106, 6, 88,205,128,235, 11, 66, 15,183,193,131, -/* 0x06c0 */ 198, 32, 57,194,124,137,139, 69,224,141,101,244, 91, 94, 95,201, -/* 0x06d0 */ 195 +/* 0x05f0 */ 255, 89,137,240, 91,131,127, 52, 1,116, 8,131,192, 32,131, 56, +/* 0x0600 */ 1,235,246,139, 77, 40,186, 3, 0, 0, 0, 3, 72, 8,139, 69, +/* 0x0610 */ 236,131,193, 52,232,132,252,255,255,141, 77,240,255,117,228,137, +/* 0x0620 */ 250, 81,141, 69, 32,255,117,236, 80,139, 69,232,232,135,252,255, +/* 0x0630 */ 255,186, 9, 0, 0, 0,137,193,137, 69,224,139, 69,236,232, 90, +/* 0x0640 */ 252,255,255,102,139, 79, 44,131,196, 16, 49,210,102,133,201,116, +/* 0x0650 */ 119,131, 62, 3,117,103,139, 93,240, 49,201, 3, 94, 8,137,202, +/* 0x0660 */ 106, 5, 88,205,128,133,192,137,198,120, 21,186, 0, 2, 0, 0, +/* 0x0670 */ 137,195,137,249,106, 3, 88,205,128, 61, 0, 2, 0, 0,116, 10, +/* 0x0680 */ 106,127, 91,106, 1, 88,205,128,235,254,141, 69,240,137,250,106, +/* 0x0690 */ 0,137,243, 80,137,240,255,117,236,106, 0,232, 24,252,255,255, +/* 0x06a0 */ 139, 77,240,137, 69,224,139, 69,236,186, 7, 0, 0, 0,232,234, +/* 0x06b0 */ 251,255,255,131,196, 16,106, 6, 88,205,128,235, 11, 66, 15,183, +/* 0x06c0 */ 193,131,198, 32, 57,194,124,137,139, 69,224,141,101,244, 91, 94, +/* 0x06d0 */ 95,201,195 }; diff --git a/src/stub/mips.r3000-linux.elf-fold.h b/src/stub/mips.r3000-linux.elf-fold.h index 4725547f..5b391813 100644 --- a/src/stub/mips.r3000-linux.elf-fold.h +++ b/src/stub/mips.r3000-linux.elf-fold.h @@ -1,5 +1,5 @@ /* mips.r3000-linux.elf-fold.h - created from mips.r3000-linux.elf-fold.bin, 2584 (0xa18) bytes + created from mips.r3000-linux.elf-fold.bin, 2588 (0xa1c) bytes This file is part of the UPX executable compressor. @@ -31,17 +31,17 @@ */ -#define STUB_MIPS_R3000_LINUX_ELF_FOLD_SIZE 2584 -#define STUB_MIPS_R3000_LINUX_ELF_FOLD_ADLER32 0x1bad3784 -#define STUB_MIPS_R3000_LINUX_ELF_FOLD_CRC32 0xbed3e5f4 +#define STUB_MIPS_R3000_LINUX_ELF_FOLD_SIZE 2588 +#define STUB_MIPS_R3000_LINUX_ELF_FOLD_ADLER32 0x16fe391d +#define STUB_MIPS_R3000_LINUX_ELF_FOLD_CRC32 0xba6eb3ea -unsigned char stub_mips_r3000_linux_elf_fold[2584] = { +unsigned char stub_mips_r3000_linux_elf_fold[2588] = { /* 0x0000 */ 127, 69, 76, 70, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0010 */ 0, 2, 0, 8, 0, 0, 0, 1, 0, 16, 0,128, 0, 0, 0, 52, /* 0x0020 */ 0, 0, 0, 0, 0, 0, 48, 1, 0, 52, 0, 32, 0, 2, 0, 0, /* 0x0030 */ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 16, 0, 0, -/* 0x0040 */ 0, 16, 0, 0, 0, 0, 10, 24, 0, 0, 10, 32, 0, 0, 0, 5, -/* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 1, 0, 0, 10, 24, 0, 0, 0, 0, +/* 0x0040 */ 0, 16, 0, 0, 0, 0, 10, 28, 0, 0, 10, 32, 0, 0, 0, 5, +/* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 1, 0, 0, 10, 28, 0, 0, 0, 0, /* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0070 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0080 */ 39,162, 0, 32, 39,189,240, 24, 3,160, 24, 33,140, 65, 0, 0, @@ -177,25 +177,25 @@ unsigned char stub_mips_r3000_linux_elf_fold[2584] = { /* 0x08a0 */ 175,168, 0, 20, 1, 32,160, 33,175,162, 0, 16,175,168, 0, 12, /* 0x08b0 */ 4, 17,254,102,175,177, 0, 8,150, 38, 0, 44, 2, 96, 32, 33, /* 0x08c0 */ 4, 17,254,211, 36, 5, 0, 5,150, 38, 0, 42, 2, 96, 32, 33, -/* 0x08d0 */ 4, 17,254,207, 36, 5, 0, 4, 38, 48, 0, 52, 36, 3, 0, 1, -/* 0x08e0 */ 142, 2, 0, 0, 0, 0, 0, 0, 20, 67,255,253, 38, 16, 0, 32, -/* 0x08f0 */ 38, 16,255,224,142, 6, 0, 8, 2, 96, 32, 33, 36,198, 0, 52, -/* 0x0900 */ 4, 17,254,195, 36, 5, 0, 3, 2, 64, 32, 33, 2, 32, 40, 33, -/* 0x0910 */ 2,128, 72, 33, 39,166, 0, 12, 2, 96, 56, 33, 4, 17,254,200, -/* 0x0920 */ 3,160, 64, 33, 0, 64, 48, 33, 2, 96, 32, 33, 36, 5, 0, 9, -/* 0x0930 */ 4, 17,254,183, 0, 64,144, 33,150, 37, 0, 44, 16, 0, 0, 42, -/* 0x0940 */ 0, 0, 32, 33,142, 3, 0, 0, 36, 2, 0, 3, 20, 98, 0, 38, -/* 0x0950 */ 38, 16, 0, 32, 38, 16,255,224,142, 2, 0, 8,143,164, 0, 0, -/* 0x0960 */ 0, 0, 40, 33, 0, 68, 32, 33, 0, 0, 48, 33, 4, 17,254, 19, -/* 0x0970 */ 36, 2, 15,165, 4, 64, 0, 9, 0, 64,128, 33, 0, 64, 32, 33, -/* 0x0980 */ 2, 32, 40, 33, 36, 6, 2, 0, 4, 17,254, 12, 36, 2, 15,163, -/* 0x0990 */ 36, 3, 2, 0, 16, 67, 0, 6, 2, 96, 56, 33, 36, 4, 0,127, -/* 0x09a0 */ 4, 17,254, 6, 36, 2, 15,161, 16, 0,255,255, 0, 0, 0, 0, -/* 0x09b0 */ 3,160, 64, 33, 0, 0, 72, 33, 4, 17,254,161, 0, 0, 48, 33, -/* 0x09c0 */ 143,166, 0, 0, 2, 96, 32, 33, 36, 5, 0, 7, 4, 17,254,144, -/* 0x09d0 */ 0, 64,144, 33, 2, 0, 32, 33, 4, 17,253,248, 36, 2, 15,166, -/* 0x09e0 */ 16, 0, 0, 5, 2, 64, 16, 33, 0,133, 16, 42, 20, 64,255,213, -/* 0x09f0 */ 36,132, 0, 1, 2, 64, 16, 33,143,191, 0, 52,143,180, 0, 48, -/* 0x0a00 */ 143,179, 0, 44,143,178, 0, 40,143,177, 0, 36,143,176, 0, 32, -/* 0x0a10 */ 3,224, 0, 8, 39,189, 0, 56 +/* 0x08d0 */ 38, 48, 0, 52, 4, 17,254,206, 36, 5, 0, 4, 2, 0, 24, 33, +/* 0x08e0 */ 36, 4, 0, 1,140, 98, 0, 0, 0, 0, 0, 0, 20, 68,255,253, +/* 0x08f0 */ 36, 99, 0, 32, 36, 99,255,224,140,102, 0, 8, 2, 96, 32, 33, +/* 0x0900 */ 36,198, 0, 52, 4, 17,254,194, 36, 5, 0, 3, 2, 64, 32, 33, +/* 0x0910 */ 2, 32, 40, 33, 2,128, 72, 33, 39,166, 0, 12, 2, 96, 56, 33, +/* 0x0920 */ 4, 17,254,199, 3,160, 64, 33, 0, 64, 48, 33, 2, 96, 32, 33, +/* 0x0930 */ 36, 5, 0, 9, 4, 17,254,182, 0, 64,144, 33,150, 37, 0, 44, +/* 0x0940 */ 16, 0, 0, 42, 0, 0, 32, 33,142, 3, 0, 0, 36, 2, 0, 3, +/* 0x0950 */ 20, 98, 0, 38, 38, 16, 0, 32, 38, 16,255,224,142, 2, 0, 8, +/* 0x0960 */ 143,164, 0, 0, 0, 0, 40, 33, 0, 68, 32, 33, 0, 0, 48, 33, +/* 0x0970 */ 4, 17,254, 18, 36, 2, 15,165, 4, 64, 0, 9, 0, 64,128, 33, +/* 0x0980 */ 0, 64, 32, 33, 2, 32, 40, 33, 36, 6, 2, 0, 4, 17,254, 11, +/* 0x0990 */ 36, 2, 15,163, 36, 3, 2, 0, 16, 67, 0, 6, 2, 96, 56, 33, +/* 0x09a0 */ 36, 4, 0,127, 4, 17,254, 5, 36, 2, 15,161, 16, 0,255,255, +/* 0x09b0 */ 0, 0, 0, 0, 3,160, 64, 33, 0, 0, 72, 33, 4, 17,254,160, +/* 0x09c0 */ 0, 0, 48, 33,143,166, 0, 0, 2, 96, 32, 33, 36, 5, 0, 7, +/* 0x09d0 */ 4, 17,254,143, 0, 64,144, 33, 2, 0, 32, 33, 4, 17,253,247, +/* 0x09e0 */ 36, 2, 15,166, 16, 0, 0, 5, 2, 64, 16, 33, 0,133, 16, 42, +/* 0x09f0 */ 20, 64,255,213, 36,132, 0, 1, 2, 64, 16, 33,143,191, 0, 52, +/* 0x0a00 */ 143,180, 0, 48,143,179, 0, 44,143,178, 0, 40,143,177, 0, 36, +/* 0x0a10 */ 143,176, 0, 32, 3,224, 0, 8, 39,189, 0, 56 }; diff --git a/src/stub/mipsel.r3000-linux.elf-fold.h b/src/stub/mipsel.r3000-linux.elf-fold.h index 0ec525e9..1cb64831 100644 --- a/src/stub/mipsel.r3000-linux.elf-fold.h +++ b/src/stub/mipsel.r3000-linux.elf-fold.h @@ -1,5 +1,5 @@ /* mipsel.r3000-linux.elf-fold.h - created from mipsel.r3000-linux.elf-fold.bin, 2584 (0xa18) bytes + created from mipsel.r3000-linux.elf-fold.bin, 2588 (0xa1c) bytes This file is part of the UPX executable compressor. @@ -31,17 +31,17 @@ */ -#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_SIZE 2584 -#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_ADLER32 0x90d53783 -#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_CRC32 0x0c816bad +#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_SIZE 2588 +#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_ADLER32 0x8b41391c +#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_CRC32 0x1f1ce6c6 -unsigned char stub_mipsel_r3000_linux_elf_fold[2584] = { +unsigned char stub_mipsel_r3000_linux_elf_fold[2588] = { /* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0010 */ 2, 0, 8, 0, 1, 0, 0, 0,128, 0, 16, 0, 52, 0, 0, 0, /* 0x0020 */ 0, 0, 0, 0, 1, 48, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, -/* 0x0040 */ 0, 0, 16, 0, 24, 10, 0, 0, 32, 10, 0, 0, 5, 0, 0, 0, -/* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0, 24, 10, 0, 0, 0, 0, 0, 0, +/* 0x0040 */ 0, 0, 16, 0, 28, 10, 0, 0, 32, 10, 0, 0, 5, 0, 0, 0, +/* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0, 28, 10, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0080 */ 32, 0,162, 39, 24,240,189, 39, 33, 24,160, 3, 0, 0, 65,140, @@ -177,25 +177,25 @@ unsigned char stub_mipsel_r3000_linux_elf_fold[2584] = { /* 0x08a0 */ 20, 0,168,175, 33,160, 32, 1, 16, 0,162,175, 12, 0,168,175, /* 0x08b0 */ 102,254, 17, 4, 8, 0,177,175, 44, 0, 38,150, 33, 32, 96, 2, /* 0x08c0 */ 211,254, 17, 4, 5, 0, 5, 36, 42, 0, 38,150, 33, 32, 96, 2, -/* 0x08d0 */ 207,254, 17, 4, 4, 0, 5, 36, 52, 0, 48, 38, 1, 0, 3, 36, -/* 0x08e0 */ 0, 0, 2,142, 0, 0, 0, 0,253,255, 67, 20, 32, 0, 16, 38, -/* 0x08f0 */ 224,255, 16, 38, 8, 0, 6,142, 33, 32, 96, 2, 52, 0,198, 36, -/* 0x0900 */ 195,254, 17, 4, 3, 0, 5, 36, 33, 32, 64, 2, 33, 40, 32, 2, -/* 0x0910 */ 33, 72,128, 2, 12, 0,166, 39, 33, 56, 96, 2,200,254, 17, 4, -/* 0x0920 */ 33, 64,160, 3, 33, 48, 64, 0, 33, 32, 96, 2, 9, 0, 5, 36, -/* 0x0930 */ 183,254, 17, 4, 33,144, 64, 0, 44, 0, 37,150, 42, 0, 0, 16, -/* 0x0940 */ 33, 32, 0, 0, 0, 0, 3,142, 3, 0, 2, 36, 38, 0, 98, 20, -/* 0x0950 */ 32, 0, 16, 38,224,255, 16, 38, 8, 0, 2,142, 0, 0,164,143, -/* 0x0960 */ 33, 40, 0, 0, 33, 32, 68, 0, 33, 48, 0, 0, 19,254, 17, 4, -/* 0x0970 */ 165, 15, 2, 36, 9, 0, 64, 4, 33,128, 64, 0, 33, 32, 64, 0, -/* 0x0980 */ 33, 40, 32, 2, 0, 2, 6, 36, 12,254, 17, 4,163, 15, 2, 36, -/* 0x0990 */ 0, 2, 3, 36, 6, 0, 67, 16, 33, 56, 96, 2,127, 0, 4, 36, -/* 0x09a0 */ 6,254, 17, 4,161, 15, 2, 36,255,255, 0, 16, 0, 0, 0, 0, -/* 0x09b0 */ 33, 64,160, 3, 33, 72, 0, 0,161,254, 17, 4, 33, 48, 0, 0, -/* 0x09c0 */ 0, 0,166,143, 33, 32, 96, 2, 7, 0, 5, 36,144,254, 17, 4, -/* 0x09d0 */ 33,144, 64, 0, 33, 32, 0, 2,248,253, 17, 4,166, 15, 2, 36, -/* 0x09e0 */ 5, 0, 0, 16, 33, 16, 64, 2, 42, 16,133, 0,213,255, 64, 20, -/* 0x09f0 */ 1, 0,132, 36, 33, 16, 64, 2, 52, 0,191,143, 48, 0,180,143, -/* 0x0a00 */ 44, 0,179,143, 40, 0,178,143, 36, 0,177,143, 32, 0,176,143, -/* 0x0a10 */ 8, 0,224, 3, 56, 0,189, 39 +/* 0x08d0 */ 52, 0, 48, 38,206,254, 17, 4, 4, 0, 5, 36, 33, 24, 0, 2, +/* 0x08e0 */ 1, 0, 4, 36, 0, 0, 98,140, 0, 0, 0, 0,253,255, 68, 20, +/* 0x08f0 */ 32, 0, 99, 36,224,255, 99, 36, 8, 0,102,140, 33, 32, 96, 2, +/* 0x0900 */ 52, 0,198, 36,194,254, 17, 4, 3, 0, 5, 36, 33, 32, 64, 2, +/* 0x0910 */ 33, 40, 32, 2, 33, 72,128, 2, 12, 0,166, 39, 33, 56, 96, 2, +/* 0x0920 */ 199,254, 17, 4, 33, 64,160, 3, 33, 48, 64, 0, 33, 32, 96, 2, +/* 0x0930 */ 9, 0, 5, 36,182,254, 17, 4, 33,144, 64, 0, 44, 0, 37,150, +/* 0x0940 */ 42, 0, 0, 16, 33, 32, 0, 0, 0, 0, 3,142, 3, 0, 2, 36, +/* 0x0950 */ 38, 0, 98, 20, 32, 0, 16, 38,224,255, 16, 38, 8, 0, 2,142, +/* 0x0960 */ 0, 0,164,143, 33, 40, 0, 0, 33, 32, 68, 0, 33, 48, 0, 0, +/* 0x0970 */ 18,254, 17, 4,165, 15, 2, 36, 9, 0, 64, 4, 33,128, 64, 0, +/* 0x0980 */ 33, 32, 64, 0, 33, 40, 32, 2, 0, 2, 6, 36, 11,254, 17, 4, +/* 0x0990 */ 163, 15, 2, 36, 0, 2, 3, 36, 6, 0, 67, 16, 33, 56, 96, 2, +/* 0x09a0 */ 127, 0, 4, 36, 5,254, 17, 4,161, 15, 2, 36,255,255, 0, 16, +/* 0x09b0 */ 0, 0, 0, 0, 33, 64,160, 3, 33, 72, 0, 0,160,254, 17, 4, +/* 0x09c0 */ 33, 48, 0, 0, 0, 0,166,143, 33, 32, 96, 2, 7, 0, 5, 36, +/* 0x09d0 */ 143,254, 17, 4, 33,144, 64, 0, 33, 32, 0, 2,247,253, 17, 4, +/* 0x09e0 */ 166, 15, 2, 36, 5, 0, 0, 16, 33, 16, 64, 2, 42, 16,133, 0, +/* 0x09f0 */ 213,255, 64, 20, 1, 0,132, 36, 33, 16, 64, 2, 52, 0,191,143, +/* 0x0a00 */ 48, 0,180,143, 44, 0,179,143, 40, 0,178,143, 36, 0,177,143, +/* 0x0a10 */ 32, 0,176,143, 8, 0,224, 3, 56, 0,189, 39 }; diff --git a/src/stub/src/i386-linux.elf-main.c b/src/stub/src/i386-linux.elf-main.c index d6f0ae90..d9fb4420 100644 --- a/src/stub/src/i386-linux.elf-main.c +++ b/src/stub/src/i386-linux.elf-main.c @@ -756,8 +756,11 @@ void *upx_main( //auxv_up(av, AT_PAGESZ, PAGE_SIZE); /* ld-linux.so.2 does not need this */ auxv_up(av, AT_PHNUM , ehdr->e_phnum); auxv_up(av, AT_PHENT , ehdr->e_phentsize); - while (PT_LOAD!=phdr->p_type) ++phdr; // skip ARM PT_EXIDX and others - auxv_up(av, AT_PHDR , dynbase + (unsigned)(1+(Elf32_Ehdr *)phdr->p_vaddr)); + { + Elf32_Phdr const *zhdr = phdr; + while (PT_LOAD!=zhdr->p_type) ++zhdr; // skip ARM PT_EXIDX and others + auxv_up(av, AT_PHDR , dynbase + (unsigned)(1+(Elf32_Ehdr *)zhdr->p_vaddr)); + } // AT_PHDR.a_un.a_val is set again by do_xmap if PT_PHDR is present. // This is necessary for ET_DYN if|when we override a prelink address.