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

Avoid stmdb with write-back register in stored list,

even when stored value is don't care.
This commit is contained in:
John Reiser 2013-09-21 09:52:21 -07:00
parent d7609088e5
commit 9d0f9e967f
7 changed files with 36 additions and 37 deletions

View File

@ -32,17 +32,17 @@
#define STUB_ARM_LINUX_KERNEL_VMLINUX_SIZE 15163
#define STUB_ARM_LINUX_KERNEL_VMLINUX_ADLER32 0xed19325c
#define STUB_ARM_LINUX_KERNEL_VMLINUX_CRC32 0xfb489939
#define STUB_ARM_LINUX_KERNEL_VMLINUX_ADLER32 0x690d3249
#define STUB_ARM_LINUX_KERNEL_VMLINUX_CRC32 0x579d826c
unsigned char stub_arm_linux_kernel_vmlinux[15163] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 1, 0, 40, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 244, 18, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 40, 0,
/* 0x0030 */ 29, 0, 26, 0, 2, 16,160,225, 0, 32,160,225, 14, 0,160,225,
/* 0x0040 */ 4,192, 33,229, 15, 32, 33,233, 0, 48,160,227, 1,208,160,225,
/* 0x0050 */ 20, 16,159,229, 4, 48, 45,229, 16, 48,159,229, 8, 48,141,229,
/* 0x0060 */ 8, 48,141,226,254,255,255,235, 14, 0, 0,234, 0, 0, 0, 0,
/* 0x0030 */ 29, 0, 26, 0, 4,192, 34,229, 9, 32, 34,233, 4, 32, 66,226,
/* 0x0040 */ 0, 48,160,227, 8, 64, 34,233, 2,208,160,225, 28, 48,159,229,
/* 0x0050 */ 8, 48,141,229, 8, 48,141,226, 0, 32,160,225, 8, 16,159,229,
/* 0x0060 */ 14, 0,160,225,254,255,255,235, 14, 0, 0,234, 0, 0, 0, 0,
/* 0x0070 */ 0, 0, 0, 0, 0, 0, 80,227, 14, 0, 0, 26, 12, 0,157,229,
/* 0x0080 */ 8, 16,157,229, 0, 32,160,227, 0, 48,160,227,254,255,255,235,
/* 0x0090 */ 15,112,157,232, 2, 0,160,225, 14,240,160,225,255, 48, 3,226,
@ -497,7 +497,7 @@ unsigned char stub_arm_linux_kernel_vmlinux[15163] = {
/* 0x1ca0 */ 76, 73, 78, 85, 88, 48, 48, 48, 93, 58, 10, 79, 70, 70, 83, 69,
/* 0x1cb0 */ 84, 32, 32, 32, 84, 89, 80, 69, 32, 32, 32, 32, 32, 32, 32, 32,
/* 0x1cc0 */ 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 10, 48, 48, 48, 48,
/* 0x1cd0 */ 48, 48, 49, 52, 32, 82, 95, 65, 82, 77, 95, 65, 66, 83, 51, 50,
/* 0x1cd0 */ 48, 48, 48, 99, 32, 82, 95, 65, 82, 77, 95, 65, 66, 83, 51, 50,
/* 0x1ce0 */ 32, 32, 32, 32, 32, 32, 32, 77, 69, 84, 72, 79, 68, 10, 48, 48,
/* 0x1cf0 */ 48, 48, 48, 48, 51, 48, 32, 82, 95, 65, 82, 77, 95, 80, 67, 50,
/* 0x1d00 */ 52, 32, 32, 32, 32, 32, 32, 32, 32, 76, 73, 78, 85, 88, 48, 51,

View File

@ -32,17 +32,17 @@
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_SIZE 15160
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_ADLER32 0xfc1b3101
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_CRC32 0x40d1de90
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_ADLER32 0x785730ee
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_CRC32 0x7efd8186
unsigned char stub_armeb_linux_kernel_vmlinux[15160] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 2, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 0, 1, 0, 40, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 0, 0, 18,244, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 40,
/* 0x0030 */ 0, 29, 0, 26,225,160, 16, 2,225,160, 32, 0,225,160, 0, 14,
/* 0x0040 */ 229, 33,192, 4,233, 33, 32, 15,227,160, 48, 0,225,160,208, 1,
/* 0x0050 */ 229,159, 16, 20,229, 45, 48, 4,229,159, 48, 16,229,141, 48, 8,
/* 0x0060 */ 226,141, 48, 8,235,255,255,254,234, 0, 0, 14, 0, 0, 0, 0,
/* 0x0030 */ 0, 29, 0, 26,229, 34,192, 4,233, 34, 32, 9,226, 66, 32, 4,
/* 0x0040 */ 227,160, 48, 0,233, 34, 64, 8,225,160,208, 2,229,159, 48, 28,
/* 0x0050 */ 229,141, 48, 8,226,141, 48, 8,225,160, 32, 0,229,159, 16, 8,
/* 0x0060 */ 225,160, 0, 14,235,255,255,254,234, 0, 0, 14, 0, 0, 0, 0,
/* 0x0070 */ 0, 0, 0, 0,227, 80, 0, 0, 26, 0, 0, 14,229,157, 0, 12,
/* 0x0080 */ 229,157, 16, 8,227,160, 32, 0,227,160, 48, 0,235,255,255,254,
/* 0x0090 */ 232,157,112, 15,225,160, 0, 2,225,160,240, 14,226, 3, 48,255,
@ -496,8 +496,8 @@ unsigned char stub_armeb_linux_kernel_vmlinux[15160] = {
/* 0x1c90 */ 82, 69, 67, 79, 82, 68, 83, 32, 70, 79, 82, 32, 91, 76, 73, 78,
/* 0x1ca0 */ 85, 88, 48, 48, 48, 93, 58, 10, 79, 70, 70, 83, 69, 84, 32, 32,
/* 0x1cb0 */ 32, 84, 89, 80, 69, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
/* 0x1cc0 */ 32, 32, 32, 86, 65, 76, 85, 69, 10, 48, 48, 48, 48, 48, 48, 49,
/* 0x1cd0 */ 52, 32, 82, 95, 65, 82, 77, 95, 65, 66, 83, 51, 50, 32, 32, 32,
/* 0x1cc0 */ 32, 32, 32, 86, 65, 76, 85, 69, 10, 48, 48, 48, 48, 48, 48, 48,
/* 0x1cd0 */ 99, 32, 82, 95, 65, 82, 77, 95, 65, 66, 83, 51, 50, 32, 32, 32,
/* 0x1ce0 */ 32, 32, 32, 32, 77, 69, 84, 72, 79, 68, 10, 48, 48, 48, 48, 48,
/* 0x1cf0 */ 48, 51, 48, 32, 82, 95, 65, 82, 77, 95, 80, 67, 50, 52, 32, 32,
/* 0x1d00 */ 32, 32, 32, 32, 32, 32, 76, 73, 78, 85, 88, 48, 51, 48, 10, 48,

View File

@ -32,17 +32,17 @@
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_SIZE 15163
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_ADLER32 0xed19325c
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_CRC32 0xfb489939
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_ADLER32 0x690d3249
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_CRC32 0x579d826c
unsigned char stub_armel_linux_kernel_vmlinuz[15163] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 1, 0, 40, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 244, 18, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 40, 0,
/* 0x0030 */ 29, 0, 26, 0, 2, 16,160,225, 0, 32,160,225, 14, 0,160,225,
/* 0x0040 */ 4,192, 33,229, 15, 32, 33,233, 0, 48,160,227, 1,208,160,225,
/* 0x0050 */ 20, 16,159,229, 4, 48, 45,229, 16, 48,159,229, 8, 48,141,229,
/* 0x0060 */ 8, 48,141,226,254,255,255,235, 14, 0, 0,234, 0, 0, 0, 0,
/* 0x0030 */ 29, 0, 26, 0, 4,192, 34,229, 9, 32, 34,233, 4, 32, 66,226,
/* 0x0040 */ 0, 48,160,227, 8, 64, 34,233, 2,208,160,225, 28, 48,159,229,
/* 0x0050 */ 8, 48,141,229, 8, 48,141,226, 0, 32,160,225, 8, 16,159,229,
/* 0x0060 */ 14, 0,160,225,254,255,255,235, 14, 0, 0,234, 0, 0, 0, 0,
/* 0x0070 */ 0, 0, 0, 0, 0, 0, 80,227, 14, 0, 0, 26, 12, 0,157,229,
/* 0x0080 */ 8, 16,157,229, 0, 32,160,227, 0, 48,160,227,254,255,255,235,
/* 0x0090 */ 15,112,157,232, 2, 0,160,225, 14,240,160,225,255, 48, 3,226,
@ -497,7 +497,7 @@ unsigned char stub_armel_linux_kernel_vmlinuz[15163] = {
/* 0x1ca0 */ 76, 73, 78, 85, 88, 48, 48, 48, 93, 58, 10, 79, 70, 70, 83, 69,
/* 0x1cb0 */ 84, 32, 32, 32, 84, 89, 80, 69, 32, 32, 32, 32, 32, 32, 32, 32,
/* 0x1cc0 */ 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 10, 48, 48, 48, 48,
/* 0x1cd0 */ 48, 48, 49, 52, 32, 82, 95, 65, 82, 77, 95, 65, 66, 83, 51, 50,
/* 0x1cd0 */ 48, 48, 48, 99, 32, 82, 95, 65, 82, 77, 95, 65, 66, 83, 51, 50,
/* 0x1ce0 */ 32, 32, 32, 32, 32, 32, 32, 77, 69, 84, 72, 79, 68, 10, 48, 48,
/* 0x1cf0 */ 48, 48, 48, 48, 51, 48, 32, 82, 95, 65, 82, 77, 95, 80, 67, 50,
/* 0x1d00 */ 52, 32, 32, 32, 32, 32, 32, 32, 32, 76, 73, 78, 85, 88, 48, 51,

View File

@ -48,20 +48,19 @@ section LINUX000
decompress_kernel: # (char *out, char *tmp, char *tmp_end, int arch_id)
lr= &indata; ip= retaddr # from arm-linux.kernel.vmlinux-head.S
*/
mov r1,r2 // tmp_end
mov r2,r0 // &outdata
mov r0,lr // &indata
str ip,[r1,#-4]! // push retaddr on new stack
str ip,[r2,#-4]! // push retaddr on new stack
stmdb r2!,{r0,r3,sp} // &outdata, arch_id, sp_in
sub r2,r2,#4 // space for outsize
loadcon8 3,METHOD // mov r3,#METHOD
stmdb r2!,{r3,lr} // METHOD, &indata
mov sp, r2 // method,&indata,space,&outdata,arch_id,sp_in,retaddr
// Value stored from r1 to memory will be overwritten by outsize.
stmdb r1!,{r0,r1,r2,r3,sp} // &indata, space, &outdata, arch_id, sp_in
loadcon8 3,METHOD // mov r3,#METHOD
mov sp,r1 // switch stacks to tmp_end area (64 KiB)
ldr r1,1f // insize
str r3,[sp,#-4]! // method
ldr r3,2f // outsize
str r3,[sp,#2*4] // outsize
add r3,sp, #2*4 // &outsize
str r3,[sp,#2*4] // outsize
add r3, sp,#2*4 // &outsize
mov r2,r0 // &outdata
ldr r1,1f // insize
mov r0,lr // &indata
bl decompressor // (&indata, insize, &outdata, &outsize, method)
b 3f
1:

View File

@ -47,7 +47,7 @@ SYMBOL TABLE:
RELOCATION RECORDS FOR [LINUX000]:
OFFSET TYPE VALUE
00000014 R_ARM_ABS32 METHOD
0000000c R_ARM_ABS32 METHOD
00000030 R_ARM_PC24 LINUX030
00000034 R_ARM_PC24 LINUX000
00000038 R_ARM_ABS32 COMPRESSED_LENGTH

View File

@ -47,7 +47,7 @@ SYMBOL TABLE:
RELOCATION RECORDS FOR [LINUX000]:
OFFSET TYPE VALUE
00000014 R_ARM_ABS32 METHOD
0000000c R_ARM_ABS32 METHOD
00000030 R_ARM_PC24 LINUX030
00000034 R_ARM_PC24 LINUX000
00000038 R_ARM_ABS32 COMPRESSED_LENGTH

View File

@ -47,7 +47,7 @@ SYMBOL TABLE:
RELOCATION RECORDS FOR [LINUX000]:
OFFSET TYPE VALUE
00000014 R_ARM_ABS32 METHOD
0000000c R_ARM_ABS32 METHOD
00000030 R_ARM_PC24 LINUX030
00000034 R_ARM_PC24 LINUX000
00000038 R_ARM_ABS32 COMPRESSED_LENGTH