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

arm linux kernel: decompress_kernel() returns length, not pointer

This commit is contained in:
John Reiser 2009-02-25 13:50:55 -08:00
parent 7974ef80d7
commit 8e492d8798
5 changed files with 16 additions and 11 deletions

View File

@ -792,6 +792,10 @@ int PackVmlinuzARMEL::decompressKernel()
}
got_start = get_te32(5*4 + j + obuf);
got_end = get_te32(6*4 + j + obuf);
#if 0 /*{*/
printf("decompress_kernel=0x%x got_start=0x%x got_end=0x%x\n",
decompress_kernel, got_start, got_end);
#endif /*}*/
break;
}
if (0==decompress_kernel) {

View File

@ -32,8 +32,8 @@
#define STUB_ARM_LINUX_KERNEL_VMLINUX_SIZE 17053
#define STUB_ARM_LINUX_KERNEL_VMLINUX_ADLER32 0xf1b6dcef
#define STUB_ARM_LINUX_KERNEL_VMLINUX_CRC32 0x825e0301
#define STUB_ARM_LINUX_KERNEL_VMLINUX_ADLER32 0xaefddd0d
#define STUB_ARM_LINUX_KERNEL_VMLINUX_CRC32 0xfd094154
unsigned char stub_arm_linux_kernel_vmlinux[17053] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
@ -45,7 +45,7 @@ unsigned char stub_arm_linux_kernel_vmlinux[17053] = {
/* 0x0060 */ 8, 48,141,226,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, 3, 0,130,224, 14,240,160,225,255, 48, 3,226,
/* 0x0090 */ 15,112,157,232, 2, 0,160,225, 14,240,160,225,255, 48, 3,226,
/* 0x00a0 */ 80, 0, 83,227, 81, 0, 83,227, 14,240,160, 17, 33, 17,176,225,
/* 0x00b0 */ 0, 0, 80, 19, 14,240,160, 1, 1, 16, 65,226, 1, 33,144,231,
/* 0x00c0 */ 15, 52, 2,226, 11, 4, 83,227, 12, 0, 0, 26,255, 52, 2,226,

View File

@ -32,8 +32,8 @@
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_SIZE 17050
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_ADLER32 0x5e9bdb94
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_CRC32 0xc4201123
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_ADLER32 0x1bacdbb2
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_CRC32 0x6f6c29f7
unsigned char stub_armeb_linux_kernel_vmlinux[17050] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 2, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
@ -45,7 +45,7 @@ unsigned char stub_armeb_linux_kernel_vmlinux[17050] = {
/* 0x0060 */ 226,141, 48, 8,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,224,130, 0, 3,225,160,240, 14,226, 3, 48,255,
/* 0x0090 */ 232,157,112, 15,225,160, 0, 2,225,160,240, 14,226, 3, 48,255,
/* 0x00a0 */ 227, 83, 0, 80,227, 83, 0, 81, 17,160,240, 14,225,176, 17, 33,
/* 0x00b0 */ 19, 80, 0, 0, 1,160,240, 14,226, 65, 16, 1,231,144, 33, 1,
/* 0x00c0 */ 226, 2, 52, 15,227, 83, 4, 11, 26, 0, 0, 12,226, 2, 52,255,

View File

@ -32,8 +32,8 @@
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_SIZE 17053
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_ADLER32 0xf1b6dcef
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_CRC32 0x825e0301
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_ADLER32 0xaefddd0d
#define STUB_ARMEL_LINUX_KERNEL_VMLINUZ_CRC32 0xfd094154
unsigned char stub_armel_linux_kernel_vmlinuz[17053] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
@ -45,7 +45,7 @@ unsigned char stub_armel_linux_kernel_vmlinuz[17053] = {
/* 0x0060 */ 8, 48,141,226,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, 3, 0,130,224, 14,240,160,225,255, 48, 3,226,
/* 0x0090 */ 15,112,157,232, 2, 0,160,225, 14,240,160,225,255, 48, 3,226,
/* 0x00a0 */ 80, 0, 83,227, 81, 0, 83,227, 14,240,160, 17, 33, 17,176,225,
/* 0x00b0 */ 0, 0, 80, 19, 14,240,160, 1, 1, 16, 65,226, 1, 33,144,231,
/* 0x00c0 */ 15, 52, 2,226, 11, 4, 83,227, 12, 0, 0, 26,255, 52, 2,226,

View File

@ -43,7 +43,7 @@
to stop in gdb. You'll have to "set $pc+=4" by hand.
*/
section LINUX000
// bkpt // qemu DEBUG only
// bkpt // qemu DEBUG only // 'bkpt' == 0xe1200070
/* Calling sequence of equivalent code in arch/arm/boot/compressed/misc.c:
decompress_kernel: # (char *out, char *tmp, char *tmp_end, int arch_id)
lr= &indata; ip= retaddr # from arm-linux.kernel.vmlinux-head.S
@ -82,7 +82,8 @@ section LINUX010
section LINUX020
ldmia sp,{r0,r1,r2,r3,ip,sp,lr} // method, &indata, outsize, &outdata, arch_id, sp_in, retaddr
add r0,r2,r3 // rv= &outdata[outsize]
// See arch/arm/boot/compressed/misc.c/flush_window(): out = &output_data[output_ptr];
mov r0,r2 // rv= outsize
mov pc,lr // return
// =============