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

Typo in .bss bzeroing

Signed-off-by: Thierry Fauck <tfauck@free.fr>

	modified:   src/stub/powerpc64le-linux.elf-fold.h
	modified:   src/stub/src/powerpc64le-linux.elf-fold.S
	modified:   src/stub/src/powerpc64le-linux.elf-main.c
	modified:   src/stub/tmp/powerpc64le-linux.elf-fold.map
This commit is contained in:
Thierry Fauck 2017-01-30 18:53:34 +01:00
parent 685953f6a5
commit c4e835266c
4 changed files with 184 additions and 197 deletions

View File

@ -1,5 +1,5 @@
/* powerpc64le-linux.elf-fold.h /* powerpc64le-linux.elf-fold.h
created from powerpc64le-linux.elf-fold.bin, 2419 (0x973) bytes created from powerpc64le-linux.elf-fold.bin, 2451 (0x993) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@ -31,21 +31,21 @@
*/ */
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_SIZE 2419 #define STUB_POWERPC64LE_LINUX_ELF_FOLD_SIZE 2451
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_ADLER32 0xf9a25df4 #define STUB_POWERPC64LE_LINUX_ELF_FOLD_ADLER32 0x2f346e13
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_CRC32 0xc3ec26a2 #define STUB_POWERPC64LE_LINUX_ELF_FOLD_CRC32 0xff705e3b
unsigned char stub_powerpc64le_linux_elf_fold[2419] = { unsigned char stub_powerpc64le_linux_elf_fold[2451] = {
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 2, 0, 21, 0, 1, 0, 0, 0, 40, 9, 16, 0, 0, 0, 0, 0, /* 0x0010 */ 2, 0, 21, 0, 1, 0, 0, 0, 72, 9, 16, 0, 0, 0, 0, 0,
/* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0030 */ 1, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0, /* 0x0030 */ 1, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0,
/* 0x0040 */ 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0040 */ 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, /* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
/* 0x0060 */ 40, 9, 0, 0, 0, 0, 0, 0, 40, 9, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 72, 9, 0, 0, 0, 0, 0, 0, 72, 9, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, /* 0x0070 */ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0,
/* 0x0080 */ 40, 9, 0, 0, 0, 0, 0, 0, 40, 9, 16, 0, 0, 0, 0, 0, /* 0x0080 */ 72, 9, 0, 0, 0, 0, 0, 0, 72, 9, 16, 0, 0, 0, 0, 0,
/* 0x0090 */ 40, 9, 16, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, /* 0x0090 */ 72, 9, 16, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0,
/* 0x00a0 */ 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* 0x00a0 */ 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
/* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,125, 0, 0, 72, /* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,125, 0, 0, 72,
/* 0x00c0 */ 208, 0, 6, 40, 32, 0,194, 76,191,240,132, 84, 32, 0,194, 77, /* 0x00c0 */ 208, 0, 6, 40, 32, 0,194, 76,191,240,132, 84, 32, 0,194, 77,
@ -59,133 +59,135 @@ unsigned char stub_powerpc64le_linux_elf_fold[2419] = {
/* 0x0140 */ 0, 0, 33,233,225,255,255, 75,221,255,255, 75,248,255,159,128, /* 0x0140 */ 0, 0, 33,233,225,255,255, 75,221,255,255, 75,248,255,159,128,
/* 0x0150 */ 38, 0, 30, 85,120,251,231,127, 80,248,164,127, 0,248,161, 56, /* 0x0150 */ 38, 0, 30, 85,120,251,231,127, 80,248,164,127, 0,248,161, 56,
/* 0x0160 */ 248,255,189, 59, 80,255,132, 56,176, 0,125, 56,208,247, 33, 56, /* 0x0160 */ 248,255,189, 59, 80,255,132, 56,176, 0,125, 56,208,247, 33, 56,
/* 0x0170 */ 24, 0,195,128,181, 5, 0, 72,120, 27,127,124,120,235,163,127, /* 0x0170 */ 24, 0,195,128,197, 5, 0, 72,120, 27,127,124,120,235,163,127,
/* 0x0180 */ 80,240,157,124,241, 0, 0, 72,166, 3,232,127, 0, 16,224, 61, /* 0x0180 */ 80,240,157,124,201, 0, 0, 72,166, 3,232,127, 56, 8, 65,232,
/* 0x0190 */ 192, 8,239, 57, 64,248, 47,124, 28, 0,226, 65, 5, 0,255, 63, /* 0x0190 */ 64, 8, 97,232, 72, 8,129,232, 80, 8,161,232, 88, 8,193,232,
/* 0x01a0 */ 96,106,255, 59, 76,147,159, 57,176,146,159,249, 0, 0,128, 57, /* 0x01a0 */ 96, 8,225,232,104, 8, 1,233,112, 8, 33,233,120, 8, 65,233,
/* 0x01b0 */ 224,145,159,249, 56, 8, 65,232, 64, 8, 97,232, 72, 8,129,232, /* 0x01b0 */ 128, 8, 97,233,136, 8,129,233,144, 8,161,233,152, 8,193,233,
/* 0x01c0 */ 80, 8,161,232, 88, 8,193,232, 96, 8,225,232,104, 8, 1,233, /* 0x01c0 */ 160, 8,225,233,168, 8, 1,234,176, 8, 33,234,184, 8, 65,234,
/* 0x01d0 */ 112, 8, 33,233,120, 8, 65,233,128, 8, 97,233,136, 8,129,233, /* 0x01d0 */ 192, 8, 97,234,200, 8,129,234,208, 8,161,234,216, 8,193,234,
/* 0x01e0 */ 144, 8,161,233,152, 8,193,233,160, 8,225,233,168, 8, 1,234, /* 0x01e0 */ 224, 8,225,234,232, 8, 1,235,240, 8, 33,235,248, 8, 65,235,
/* 0x01f0 */ 176, 8, 33,234,184, 8, 65,234,192, 8, 97,234,200, 8,129,234, /* 0x01f0 */ 0, 9, 97,235, 8, 9,129,235, 16, 9,161,235, 24, 9,193,235,
/* 0x0200 */ 208, 8,161,234,216, 8,193,234,224, 8,225,234,232, 8, 1,235, /* 0x0200 */ 32, 9,225,235, 48, 8, 33,232,166, 2,136,125, 32, 0,128, 78,
/* 0x0210 */ 240, 8, 33,235,248, 8, 65,235, 0, 9, 97,235, 8, 9,129,235, /* 0x0210 */ 90, 0, 0, 56, 2, 0, 0, 68, 8, 0,227, 64,255,255, 96, 56,
/* 0x0220 */ 16, 9,161,235, 24, 9,193,235, 32, 9,225,235, 48, 8, 33,232, /* 0x0220 */ 32, 0,128, 78, 1, 0, 0, 56,236,255,255, 75, 3, 0, 0, 56,
/* 0x0230 */ 166, 2,136,125, 32, 0,128, 78, 90, 0, 0, 56, 2, 0, 0, 68, /* 0x0230 */ 228,255,255, 75, 5, 0, 0, 56,220,255,255, 75, 6, 0, 0, 56,
/* 0x0240 */ 8, 0,227, 64,255,255, 96, 56, 32, 0,128, 78, 1, 0, 0, 56, /* 0x0240 */ 212,255,255, 75,125, 0, 0, 56,204,255,255, 75, 91, 0, 0, 56,
/* 0x0250 */ 236,255,255, 75, 3, 0, 0, 56,228,255,255, 75, 5, 0, 0, 56, /* 0x0250 */ 196,255,255, 75, 45, 0, 0, 56,188,255,255, 75, 0, 0, 35, 44,
/* 0x0260 */ 220,255,255, 75, 6, 0, 0, 56,212,255,255, 75,125, 0, 0, 56, /* 0x0260 */ 32, 0,130, 77, 0, 0, 36, 47, 0, 0, 67,233, 64, 32,170,127,
/* 0x0270 */ 204,255,255, 75, 91, 0, 0, 56,196,255,255, 75, 45, 0, 0, 56, /* 0x0270 */ 16, 0,158, 64, 0, 0,131,248, 8, 0,163,248, 32, 0,128, 78,
/* 0x0280 */ 188,255,255, 75, 0, 0, 35, 44, 32, 0,130, 77, 0, 0, 36, 47, /* 0x0280 */ 1, 0,170, 43, 8, 0,158, 64,236,255,154, 64, 16, 0, 99, 56,
/* 0x0290 */ 0, 0, 67,233, 64, 32,170,127, 16, 0,158, 64, 0, 0,131,248, /* 0x0290 */ 216,255,255, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x02a0 */ 8, 0,163,248, 32, 0,128, 78, 1, 0,170, 43, 8, 0,158, 64, /* 0x02a0 */ 0, 0, 67,233, 8, 0, 3,233, 1, 0,229, 56, 0, 0, 32, 57,
/* 0x02b0 */ 236,255,154, 64, 16, 0, 99, 56,216,255,255, 75, 0, 0, 0, 0, /* 0x02b0 */ 166, 3,233,124, 64, 40,170,127, 28, 0,252, 64,166, 2, 8,124,
/* 0x02c0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,233, 8, 0, 3,233, /* 0x02c0 */ 127, 0, 96, 56, 16, 0, 1,248,145,255, 33,248, 89,255,255, 75,
/* 0x02d0 */ 1, 0,229, 56, 0, 0, 32, 57,166, 3,233,124, 64, 40,170,127, /* 0x02d0 */ 0, 0, 0, 96, 20, 0, 64, 66,174, 72, 72,125,174, 73, 68,125,
/* 0x02e0 */ 28, 0,252, 64,166, 2, 8,124,127, 0, 96, 56, 16, 0, 1,248, /* 0x02e0 */ 1, 0, 41, 57,240,255,255, 75, 8, 0, 67,233, 20, 74, 74,125,
/* 0x02f0 */ 145,255, 33,248, 89,255,255, 75, 0, 0, 0, 96, 20, 0, 64, 66, /* 0x02f0 */ 8, 0, 67,249, 0, 0, 67,233, 80, 80, 41,125, 0, 0, 35,249,
/* 0x0300 */ 174, 72, 72,125,174, 73, 68,125, 1, 0, 41, 57,240,255,255, 75, /* 0x0300 */ 32, 0,128, 78, 0, 0, 0, 0, 0, 0, 0, 1,128, 0, 0, 0,
/* 0x0310 */ 8, 0, 67,233, 20, 74, 74,125, 8, 0, 67,249, 0, 0, 67,233, /* 0x0310 */ 38, 0,128,125,166, 2, 8,124, 8, 0,129,145,197, 5, 0, 72,
/* 0x0320 */ 80, 80, 41,125, 0, 0, 35,249, 32, 0,128, 78, 0, 0, 0, 0, /* 0x0320 */ 81,255, 33,248,120, 27,126,124,120, 35,159,124,120, 43,189,124,
/* 0x0330 */ 0, 0, 0, 1,128, 0, 0, 0, 38, 0,128,125,166, 2, 8,124, /* 0x0330 */ 120, 51,220,124, 0, 0, 38, 46, 0, 0, 63,233, 0, 0,169, 47,
/* 0x0340 */ 8, 0,129,145,133, 5, 0, 72, 97,255, 33,248,120, 27,126,124, /* 0x0340 */ 64, 1,158, 65,120,243,195,127,112, 0,129, 56, 12, 0,160, 56,
/* 0x0350 */ 120, 35,159,124,120, 43,189,124,120, 51,220,124, 0, 0, 38, 46, /* 0x0350 */ 81,255,255, 75,112, 0, 65,129,116, 0, 33,129, 0, 0,170, 47,
/* 0x0360 */ 0, 0, 63,233, 0, 0,169, 47, 60, 1,158, 65,120,243,195,127, /* 0x0360 */ 32, 0,158, 64, 88, 33, 37,109, 85, 80,133, 47, 28, 0,158, 64,
/* 0x0370 */ 112, 0,129, 56, 12, 0,160, 56, 81,255,255, 75,112, 0, 65,129, /* 0x0370 */ 0, 0, 62,233, 0, 0,169, 47, 8, 1,254, 65, 12, 0, 0, 72,
/* 0x0380 */ 116, 0, 33,129, 0, 0,170, 47, 32, 0,158, 64, 88, 33, 37,109, /* 0x0380 */ 33, 0, 41,121, 16, 0,226, 64,127, 0, 96, 56,153,254,255, 75,
/* 0x0390 */ 85, 80,133, 47, 28, 0,158, 64, 0, 0, 62,233, 0, 0,169, 47, /* 0x0390 */ 0, 0, 0, 96, 64, 80, 9,127,240,255,217, 65, 0, 0, 31,233,
/* 0x03a0 */ 4, 1,254, 65, 12, 0, 0, 72, 33, 0, 41,121, 16, 0,226, 64, /* 0x03a0 */ 64, 64,170,127,228,255,221, 65, 8, 0,191,232,164, 0,152, 64,
/* 0x03b0 */ 127, 0, 96, 56,153,254,255, 75, 0, 0, 0, 96, 64, 80, 9,127, /* 0x03b0 */ 120, 75, 36,125, 0, 0, 61,233, 8, 0,126,232,128, 0,193, 56,
/* 0x03c0 */ 240,255,217, 65, 0, 0, 31,233, 64, 64,170,127,228,255,221, 65, /* 0x03c0 */ 128, 0, 65,249, 40, 0, 65,248,120, 0,225,136, 16, 0,125,233,
/* 0x03d0 */ 8, 0,191,232,160, 0,152, 64,120, 75, 36,125, 0, 0, 61,233, /* 0x03d0 */ 166, 3, 41,125, 8, 0, 93,232, 33, 4,128, 78, 40, 0, 65,232,
/* 0x03e0 */ 8, 0,126,232,124, 0,193, 56,124, 0, 65,145, 40, 0, 65,248, /* 0x03e0 */ 0, 0,163, 47,164,255,222, 64,128, 0,129,232,112, 0, 33,129,
/* 0x03f0 */ 120, 0,225,136, 16, 0,125,233,166, 3, 41,125, 8, 0, 93,232, /* 0x03f0 */ 0, 72,164,127,148,255,222, 64,121, 0,193,136, 0, 0,166, 47,
/* 0x0400 */ 33, 4,128, 78, 40, 0, 65,232, 0, 0,163, 47,164,255,222, 64, /* 0x0400 */ 48, 0,158, 65, 44, 0,146, 65, 8, 0,127,232,122, 0,161,136,
/* 0x0410 */ 124, 0,129,128,112, 0, 33,129, 0, 32,137,127,148,255,222, 64, /* 0x0410 */ 32, 0,132,120, 40, 0, 65,248, 0, 0, 60,233, 16, 0,124,233,
/* 0x0420 */ 121, 0,193,136, 0, 0,166, 47, 44, 0,158, 65, 40, 0,146, 65, /* 0x0420 */ 166, 3, 41,125, 8, 0, 92,232, 33, 4,128, 78, 40, 0, 65,232,
/* 0x0430 */ 8, 0,127,232,122, 0,161,136, 40, 0, 65,248, 0, 0, 60,233, /* 0x0430 */ 116, 0, 1,129, 8, 0, 94,233, 0, 0, 62,233, 20, 66, 74,125,
/* 0x0440 */ 16, 0,124,233,166, 3, 41,125, 8, 0, 92,232, 33, 4,128, 78, /* 0x0440 */ 80, 72, 40,125, 8, 0, 94,249, 0, 0, 62,249, 20, 0, 0, 72,
/* 0x0450 */ 40, 0, 65,232,116, 0, 1,129, 8, 0, 94,233, 0, 0, 62,233, /* 0x0450 */ 120, 43,164,124,120,243,195,127,120, 75, 37,125, 69,254,255, 75,
/* 0x0460 */ 20, 66, 74,125, 80, 72, 40,125, 8, 0, 94,249, 0, 0, 62,249, /* 0x0460 */ 112, 0, 1,129, 8, 0, 95,233, 0, 0, 63,233, 20, 66, 74,125,
/* 0x0470 */ 20, 0, 0, 72,120, 43,164,124,120,243,195,127,120, 75, 37,125, /* 0x0470 */ 80, 72, 40,125, 8, 0, 95,249, 0, 0, 63,249,188,254,255, 75,
/* 0x0480 */ 73,254,255, 75,112, 0, 1,129, 8, 0, 95,233, 0, 0, 63,233, /* 0x0480 */ 176, 0, 33, 56, 8, 0,129,129, 32,129,144,125,160, 4, 0, 72,
/* 0x0490 */ 20, 66, 74,125, 80, 72, 40,125, 8, 0, 95,249, 0, 0, 63,249, /* 0x0490 */ 0, 0, 0, 0, 0, 0, 0, 3,128, 4, 0, 0,166, 2, 8,124,
/* 0x04a0 */ 192,254,255, 75,160, 0, 33, 56, 8, 0,129,129, 32,129,144,125, /* 0x04a0 */ 38, 0,128,125, 16, 0, 35,161, 3, 0,137, 47, 1, 4, 0, 72,
/* 0x04b0 */ 92, 4, 0, 72, 0, 0, 0, 0, 0, 0, 0, 3,128, 4, 0, 0, /* 0x04b0 */ 32, 0,163,234,120, 51,216,124,120, 27,123,124,120, 35,154,124,
/* 0x04c0 */ 166, 2, 8,124, 38, 0,128,125, 16, 0, 35,161, 3, 0,137, 47, /* 0x04c0 */ 120, 43,185,124, 8, 0,129,145,241,254, 33,248,120, 59,247,124,
/* 0x04d0 */ 205, 3, 0, 72, 32, 0,195,234,120, 51,217,124,120, 27,124,124, /* 0x04d0 */ 120, 67, 22,125, 20,170,163,126, 16, 0,192, 56, 8, 0,158, 64,
/* 0x04e0 */ 120, 35,155,124,120, 43,186,124, 8, 0,129,145, 1,255, 33,248, /* 0x04e0 */ 0, 0,192, 56, 56, 0, 91,161, 34, 8,198, 56,120,171,168,126,
/* 0x04f0 */ 120, 59,248,124,120, 67, 23,125, 20,178,195,126, 16, 0,192, 56, /* 0x04f0 */ 0, 0, 32, 57,255,255,192, 59, 1, 0, 74, 57,166, 3, 73,125,
/* 0x0500 */ 8, 0,158, 64, 0, 0,192, 56, 56, 0, 92,161, 34, 8,198, 56, /* 0x0500 */ 60, 0, 64, 66, 0, 0, 72,129, 1, 0,138, 47, 40, 0,158, 64,
/* 0x0510 */ 120,179,200,126, 0, 0, 32, 57,255,255,192, 59, 1, 0, 74, 57, /* 0x0510 */ 16, 0,232,232, 64, 56,190,127, 8, 0,157, 64,120, 59,254,124,
/* 0x0520 */ 166, 3, 73,125, 60, 0, 64, 66, 0, 0, 72,129, 1, 0,138, 47, /* 0x0520 */ 40, 0, 72,233, 20, 82, 71,125, 64, 80,169,127, 8, 0,156, 64,
/* 0x0530 */ 40, 0,158, 64, 16, 0,232,232, 64, 56,190,127, 8, 0,157, 64, /* 0x0530 */ 120, 83, 73,125, 56, 0, 8, 57,200,255,255, 75, 1, 0, 41, 61,
/* 0x0540 */ 120, 59,254,124, 40, 0, 72,233, 20, 82, 71,125, 64, 80,169,127, /* 0x0540 */ 228, 3,222,123,255,255, 41, 57,120,243,195,127, 80, 72,158,124,
/* 0x0550 */ 8, 0,156, 64,120, 83, 73,125, 56, 0, 8, 57,200,255,255, 75, /* 0x0550 */ 0, 0,160, 56,228, 3,132,120,180, 7,198,124,255,255,224, 56,
/* 0x0560 */ 1, 0, 41, 61,228, 3,222,123,255,255, 41, 57,120,243,195,127, /* 0x0560 */ 0, 0, 0, 57,173,252,255, 75, 0, 0, 0, 96, 81,115, 64, 62,
/* 0x0570 */ 80, 72,158,124, 0, 0,160, 56,228, 3,132,120,180, 7,198,124, /* 0x0570 */ 0, 0, 96, 58, 0, 0, 58, 46, 64, 98, 82, 98, 80, 24,222,127,
/* 0x0580 */ 255,255,224, 56, 0, 0, 0, 57,177,252,255, 75, 0, 0, 0, 96, /* 0x0580 */ 0, 0, 32, 58, 56, 0, 59,161, 0,152,137,127,136, 1,157, 64,
/* 0x0590 */ 81,115, 64, 62, 0, 0, 96, 58, 0, 0, 59, 46, 64, 98, 82, 98, /* 0x0590 */ 0, 0, 53,129, 40, 0,146, 65, 6, 0,137, 47, 32, 0,158, 64,
/* 0x05a0 */ 80, 24,222,127, 56, 0, 60,161, 0,152,137,127, 88, 1,157, 64, /* 0x05a0 */ 16, 0,181,232,120,195, 3,127, 3, 0,128, 56, 20,242,165,124,
/* 0x05b0 */ 0, 0, 54,129, 40, 0,146, 65, 6, 0,137, 47, 32, 0,158, 64, /* 0x05b0 */ 32, 0,165,120,169,252,255, 75, 76, 1, 0, 72, 1, 0,137, 47,
/* 0x05c0 */ 16, 0,182,232,120,203, 35,127, 3, 0,128, 56, 20,242,165,124, /* 0x05c0 */ 68, 1,158, 64, 4, 0,181,131, 16, 0, 53,233, 40, 0,149,234,
/* 0x05d0 */ 32, 0,165,120,177,252,255, 75, 28, 1, 0, 72, 1, 0,137, 47, /* 0x05d0 */ 32, 0,245,235,250, 22,189, 87, 32, 4, 42,121,112, 0,225,251,
/* 0x05e0 */ 20, 1,158, 64, 4, 0,182,131, 16, 0, 54,233, 40, 0,182,234, /* 0x05e0 */ 120, 0, 33,249, 48,236, 93,126,228, 3, 60,121, 20,162,158,126,
/* 0x05f0 */ 32, 0,246,235,250, 22,189, 87, 32, 4, 42,121,112, 0,225,251, /* 0x05f0 */ 20,250,234,127, 20,242,156,127, 20,162,137,126,126, 7,176, 87,
/* 0x0600 */ 120, 0, 33,249, 48,236, 93,126,228, 3, 52,121, 20,170,190,126, /* 0x0600 */ 12, 0,146, 64, 0, 0,160, 56, 8, 0, 0, 72, 2, 0,160, 56,
/* 0x0610 */ 20,250,234,127, 20,242,148,126, 20,170,169,126,126, 7,189, 87, /* 0x0610 */ 120,131,165,124,180, 7,165,124, 16, 0,146, 64,120,203, 39,127,
/* 0x0620 */ 12, 0,146, 64, 0, 0,160, 56, 8, 0, 0, 72, 2, 0,160, 56, /* 0x0620 */ 18, 0,192, 56, 12, 0, 0, 72, 50, 0,192, 56,255,255,224, 56,
/* 0x0630 */ 120,235,165,124,180, 7,165,124, 16, 0,146, 64,120,211, 71,127, /* 0x0630 */ 8, 0, 21,233,120,227,131,127,120,251,228,127, 80, 64, 10,125,
/* 0x0640 */ 18, 0,192, 56, 12, 0, 0, 72, 50, 0,192, 56,255,255,224, 56, /* 0x0640 */ 209,251,255, 75, 0, 0, 0, 96, 0, 24,188,127, 16, 0,254, 65,
/* 0x0650 */ 8, 0, 22,233,120,163,131,126,120,251,228,127, 80, 64, 10,125, /* 0x0650 */ 127, 0, 96, 56,209,251,255, 75, 0, 0, 0, 96, 24, 0,146, 65,
/* 0x0660 */ 217,251,255, 75, 0, 0, 0, 96, 0, 24,180,127, 16, 0,254, 65, /* 0x0660 */ 120,211, 67,127,112, 0,129, 56,120,187,229,126,120,179,198,126,
/* 0x0670 */ 127, 0, 96, 56,217,251,255, 75, 0, 0, 0, 96, 24, 0,146, 65, /* 0x0670 */ 161,252,255, 75,208, 0,255,125,227,255,169,123, 32, 4,239,121,
/* 0x0680 */ 120,219, 99,127,112, 0,129, 56,120,195, 5,127,120,187,230,126, /* 0x0680 */ 12, 0,130, 64, 44, 0,146, 64, 68, 0, 0, 72, 0, 0,175, 47,
/* 0x0690 */ 169,252,255, 75,208, 0, 63,126, 32, 4, 49,122, 32, 0,146, 65, /* 0x0690 */ 244,255,158, 65,166, 3,233,125, 20,250, 92,125, 0, 0, 32, 57,
/* 0x06a0 */ 120,163,131,126,120,251,228,127,180, 7,165,127,193,251,255, 75, /* 0x06a0 */ 174, 73, 42,126, 1, 0, 41, 57,248,255, 0, 66,216,255,255, 75,
/* 0x06b0 */ 0, 0, 0, 96, 0, 0,163, 47,184,255,222, 64, 20,250,241,127, /* 0x06b0 */ 120,227,131,127,120,251,228,127,180, 7, 5,126,137,251,255, 75,
/* 0x06c0 */ 20,250,244,127, 64,168,191,127, 44, 0,156, 64,120,251,227,127, /* 0x06c0 */ 0, 0, 0, 96, 0, 0,163, 47,136,255,222, 64, 20,250,239,127,
/* 0x06d0 */ 80,168,159,124,180, 7,165,127, 50, 0,192, 56,255,255,224, 56, /* 0x06d0 */ 20,250,252,127, 64,160,191,127, 44, 0,156, 64,120,251,227,127,
/* 0x06e0 */ 0, 0, 0, 57, 85,251,255, 75, 0, 0, 0, 96, 0, 24,191,127, /* 0x06e0 */ 80,160,159,124,180, 7, 5,126, 50, 0,192, 56,255,255,224, 56,
/* 0x06f0 */ 128,255,222, 64, 1, 0,115, 58, 56, 0,214, 58,180, 7,115,126, /* 0x06f0 */ 0, 0, 0, 57, 29,251,255, 75, 0, 0, 0, 96, 0, 24,191,127,
/* 0x0700 */ 164,254,255, 75, 0, 1, 33, 56, 24, 0,124,232, 20, 26,126,124, /* 0x0700 */ 80,255,222, 64, 1, 0,115, 58, 56, 0,181, 58,180, 7,115,126,
/* 0x0710 */ 8, 0,129,129, 32,129,144,125,200, 1, 0, 72, 0, 0, 0, 0, /* 0x0710 */ 116,254,255, 75, 16, 1, 33, 56, 24, 0,123,232, 20, 26,126,124,
/* 0x0720 */ 0, 0, 0, 3,128, 15, 0, 0,166, 2, 8,124,232,255,132, 56, /* 0x0720 */ 8, 0,129,129, 32,129,144,125,208, 1, 0, 72, 0, 0, 0, 0,
/* 0x0730 */ 24, 0, 67,129, 0, 0,192, 56,141, 1, 0, 72, 33,255, 33,248, /* 0x0730 */ 0, 0, 0, 3,128, 17, 0, 0,166, 2, 8,124,232,255,132, 56,
/* 0x0740 */ 120, 43,191,124,120, 75, 62,125, 64, 0,165, 59, 24, 0, 35, 57, /* 0x0740 */ 24, 0, 67,129, 0, 0,192, 56,149, 1, 0, 72, 33,255, 33,248,
/* 0x0750 */ 144, 0,129,248,136, 0,161,248,120, 59,229,124,112, 0,129,248, /* 0x0750 */ 120, 43,191,124,120, 75, 62,125, 64, 0,165, 59, 24, 0, 35, 57,
/* 0x0760 */ 120, 0, 33,249,128, 0, 65,249,160, 0,225,248,168, 0, 1,249, /* 0x0760 */ 144, 0,129,248,136, 0,161,248,120, 59,229,124,112, 0,129,248,
/* 0x0770 */ 152, 0, 33,249,144, 0, 97, 56,128, 0,129, 56,189,251,255, 75, /* 0x0770 */ 120, 0, 33,249,128, 0, 65,249,160, 0,225,248,168, 0, 1,249,
/* 0x0780 */ 80, 0, 63,233,120,243,195,127, 3, 0,128, 56, 64, 0,169, 56, /* 0x0780 */ 152, 0, 33,249,144, 0, 97, 56,128, 0,129, 56,133,251,255, 75,
/* 0x0790 */ 32, 0,165,120,241,250,255, 75, 56, 0,191,160,120,243,195,127, /* 0x0790 */ 80, 0, 63,233,120,243,195,127, 3, 0,128, 56, 64, 0,169, 56,
/* 0x07a0 */ 5, 0,128, 56,225,250,255, 75, 24, 0,191,128,120,243,195,127, /* 0x07a0 */ 32, 0,165,120,185,250,255, 75, 56, 0,191,160,120,243,195,127,
/* 0x07b0 */ 9, 0,128, 56,209,250,255, 75,160, 0,225,232,168, 0, 1,233, /* 0x07b0 */ 5, 0,128, 56,169,250,255, 75, 24, 0,191,128,120,243,195,127,
/* 0x07c0 */ 120,243,198,127,112, 0,129, 56, 0, 0,160, 56,120,251,227,127, /* 0x07c0 */ 9, 0,128, 56,153,250,255, 75,160, 0,225,232,168, 0, 1,233,
/* 0x07d0 */ 241,252,255, 75, 9, 0,128, 56,120, 27,124,124,120,243,195,127, /* 0x07d0 */ 120,243,198,127,112, 0,129, 56, 0, 0,160, 56,120,251,227,127,
/* 0x07e0 */ 32, 0,133,123, 0, 0,192, 59,157,250,255, 75, 56, 0, 63,161, /* 0x07e0 */ 189,252,255, 75, 9, 0,128, 56,120, 27,124,124,120,243,195,127,
/* 0x07f0 */ 0,240,137,127,144, 0,157, 64, 0, 0, 61,129, 3, 0,137, 47, /* 0x07f0 */ 32, 0,133,123, 0, 0,192, 59,101,250,255, 75, 56, 0, 63,161,
/* 0x0800 */ 116, 0,158, 64, 16, 0,125,232, 0, 0,128, 56, 0, 0,160, 56, /* 0x0800 */ 0,240,137,127,144, 0,157, 64, 0, 0, 61,129, 3, 0,137, 47,
/* 0x0810 */ 77,250,255, 75, 0, 0, 0, 96, 0, 0,131, 47,120, 27,123,124, /* 0x0810 */ 116, 0,158, 64, 16, 0,125,232, 0, 0,128, 56, 0, 0,160, 56,
/* 0x0820 */ 16, 0,252, 64,127, 0, 96, 56, 37,250,255, 75, 0, 0, 0, 96, /* 0x0820 */ 21,250,255, 75, 0, 0, 0, 96, 0, 0,131, 47,120, 27,123,124,
/* 0x0830 */ 120,251,228,127, 0, 4,160, 56, 29,250,255, 75, 0, 0, 0, 96, /* 0x0830 */ 16, 0,252, 64,127, 0, 96, 56,237,249,255, 75, 0, 0, 0, 96,
/* 0x0840 */ 0, 4,163, 47,224,255,222, 64,120,251,227,127, 0, 0,128, 56, /* 0x0840 */ 120,251,228,127, 0, 4,160, 56,229,249,255, 75, 0, 0, 0, 96,
/* 0x0850 */ 120,219,101,127, 0, 0,192, 56, 0, 0,224, 56, 0, 0, 0, 57, /* 0x0850 */ 0, 4,163, 47,224,255,222, 64,120,251,227,127, 0, 0,128, 56,
/* 0x0860 */ 97,252,255, 75,120, 27,124,124,120,219, 99,127,249,249,255, 75, /* 0x0860 */ 120,219,101,127, 0, 0,192, 56, 0, 0,224, 56, 0, 0, 0, 57,
/* 0x0870 */ 0, 0, 0, 96, 1, 0,222, 59, 56, 0,189, 59,180, 7,222,127, /* 0x0870 */ 45,252,255, 75,120, 27,124,124,120,219, 99,127,193,249,255, 75,
/* 0x0880 */ 108,255,255, 75,224, 0, 33, 56,120,227,131,127,124, 0, 0, 72, /* 0x0880 */ 0, 0, 0, 96, 1, 0,222, 59, 56, 0,189, 59,180, 7,222,127,
/* 0x0890 */ 0, 0, 0, 0, 0, 0, 0, 1,128, 5, 0, 0,136,255, 33,250, /* 0x0890 */ 108,255,255, 75,224, 0, 33, 56,120,227,131,127,140, 0, 0, 72,
/* 0x08a0 */ 144,255, 65,250,152,255, 97,250,160,255,129,250,168,255,161,250, /* 0x08a0 */ 0, 0, 0, 0, 0, 0, 0, 1,128, 5, 0, 0,120,255,225,249,
/* 0x08b0 */ 176,255,193,250,184,255,225,250,192,255, 1,251,200,255, 33,251, /* 0x08b0 */ 128,255, 1,250,136,255, 33,250,144,255, 65,250,152,255, 97,250,
/* 0x08c0 */ 208,255, 65,251,216,255, 97,251,224,255,129,251,232,255,161,251, /* 0x08c0 */ 160,255,129,250,168,255,161,250,176,255,193,250,184,255,225,250,
/* 0x08d0 */ 240,255,193,251,248,255,225,251, 16, 0, 1,248, 32, 0,128, 78, /* 0x08d0 */ 192,255, 1,251,200,255, 33,251,208,255, 65,251,216,255, 97,251,
/* 0x08e0 */ 136,255, 33,234,144,255, 65,234,152,255, 97,234,160,255,129,234, /* 0x08e0 */ 224,255,129,251,232,255,161,251,240,255,193,251,248,255,225,251,
/* 0x08f0 */ 168,255,161,234,176,255,193,234,184,255,225,234,192,255, 1,235, /* 0x08f0 */ 16, 0, 1,248, 32, 0,128, 78,120,255,225,233,128,255, 1,234,
/* 0x0900 */ 200,255, 33,235,208,255, 65,235,216,255, 97,235,224,255,129,235, /* 0x0900 */ 136,255, 33,234,144,255, 65,234,152,255, 97,234,160,255,129,234,
/* 0x0910 */ 16, 0, 1,232,232,255,161,235,166, 3, 8,124,240,255,193,235, /* 0x0910 */ 168,255,161,234,176,255,193,234,184,255,225,234,192,255, 1,235,
/* 0x0920 */ 248,255,225,235, 32, 0,128, 78,132, 2, 16, 0, 0, 0, 0, 0, /* 0x0920 */ 200,255, 33,235,208,255, 65,235,216,255, 97,235,224,255,129,235,
/* 0x0930 */ 40,137, 16, 0, 0, 0, 0, 0,200, 2, 16, 0, 0, 0, 0, 0, /* 0x0930 */ 16, 0, 1,232,232,255,161,235,166, 3, 8,124,240,255,193,235,
/* 0x0940 */ 40,137, 16, 0, 0, 0, 0, 0, 56, 3, 16, 0, 0, 0, 0, 0, /* 0x0940 */ 248,255,225,235, 32, 0,128, 78, 92, 2, 16, 0, 0, 0, 0, 0,
/* 0x0950 */ 40,137, 16, 0, 0, 0, 0, 0,192, 4, 16, 0, 0, 0, 0, 0, /* 0x0950 */ 72,137, 16, 0, 0, 0, 0, 0,160, 2, 16, 0, 0, 0, 0, 0,
/* 0x0960 */ 40,137, 16, 0, 0, 0, 0, 0, 40, 7, 16, 0, 0, 0, 0, 0, /* 0x0960 */ 72,137, 16, 0, 0, 0, 0, 0, 16, 3, 16, 0, 0, 0, 0, 0,
/* 0x0970 */ 40,137, 16 /* 0x0970 */ 72,137, 16, 0, 0, 0, 0, 0,156, 4, 16, 0, 0, 0, 0, 0,
/* 0x0980 */ 72,137, 16, 0, 0, 0, 0, 0, 56, 7, 16, 0, 0, 0, 0, 0,
/* 0x0990 */ 72,137, 16
}; };

View File

@ -95,21 +95,6 @@ L90:
mtlr r31 // entry address mtlr r31 // entry address
lis 15,0x1000
addi 15,15,0x8c0 // Check if statically allocated i.e.
cmpld 15,r31 // entry @ 0x10008c0
beq+ rest
/* Dynamic load settings */
addis r31,r31,5
addi r31,r31,27232 // @+0x57e00
addi 12,r31,-27828
std 12,-27984(r31) // required : Inconsistency detected by ld.so: rtld.c:
li 12,0
std 12,-28192(r31) // p 0x...d7e00-0x...d0fe0
// lmw r2,4+LINKAREA+OVERHEAD(sp) // restore registers r2 thru r31 32bits load // lmw r2,4+LINKAREA+OVERHEAD(sp) // restore registers r2 thru r31 32bits load
/* Restore Save Area */ /* Restore Save Area */
rest: rest:

View File

@ -98,7 +98,7 @@ typedef void f_unfilter(
); );
typedef int f_expand( typedef int f_expand(
const nrv_byte *, nrv_uint, const nrv_byte *, nrv_uint,
nrv_byte *, nrv_uint *, unsigned ); nrv_byte *, long *, unsigned );
static void static void
unpackExtent( unpackExtent(
@ -136,7 +136,7 @@ ERR_LAB
// assert(h.sz_cpr > 0 && h.sz_cpr <= blocksize); // assert(h.sz_cpr > 0 && h.sz_cpr <= blocksize);
if (h.sz_cpr < h.sz_unc) { // Decompress block if (h.sz_cpr < h.sz_unc) { // Decompress block
nrv_uint out_len = h.sz_unc; // EOF for lzma long out_len = h.sz_unc; // EOF for lzma
int const j = (*f_decompress)((const unsigned char *)xi->buf, h.sz_cpr, int const j = (*f_decompress)((const unsigned char *)xi->buf, h.sz_cpr,
(unsigned char *)xo->buf, &out_len, h.b_method); (unsigned char *)xo->buf, &out_len, h.b_method);
if (j != 0 || out_len != (nrv_uint)h.sz_unc) if (j != 0 || out_len != (nrv_uint)h.sz_unc)
@ -155,7 +155,7 @@ ERR_LAB
} }
} }
#if 0 #if 1
static void static void
upx_bzero(char *p, size_t len) upx_bzero(char *p, size_t len)
{ {
@ -268,9 +268,9 @@ do_xmap(
// bzero(addr, frag); // fragment at lo end // bzero(addr, frag); // fragment at lo end
//} //}
frag = (-mlen) &~ PAGE_MASK; // distance to next page boundary frag = (-mlen) &~ PAGE_MASK; // distance to next page boundary
/* if (! (PROT_WRITE & prot)) { if ( PROT_WRITE & prot ) {
bzero(mlen+addr, frag); // fragment at hi end bzero(mlen+addr, frag); // fragment at hi end
} */ }
if (xi) { if (xi) {
if (0!=mprotect(addr, mlen, prot)) { if (0!=mprotect(addr, mlen, prot)) {
err_exit(10); err_exit(10);

View File

@ -9,58 +9,58 @@ Linker script and memory map
TARGET(elf64-powerpcle) TARGET(elf64-powerpcle)
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc) 0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
.text 0x00000000001000bc 0x7e0 .text 0x00000000001000bc 0x7f0
*(.text) *(.text)
.text 0x00000000001000bc 0x1c8 tmp/powerpc64le-linux.elf-fold.o .text 0x00000000001000bc 0x1a0 tmp/powerpc64le-linux.elf-fold.o
0x0000000000100238 mmap 0x0000000000100210 mmap
0x000000000010024c exit 0x0000000000100224 exit
0x0000000000100254 read 0x000000000010022c read
0x000000000010025c open 0x0000000000100234 open
0x0000000000100264 close 0x000000000010023c close
0x000000000010026c mprotect 0x0000000000100244 mprotect
0x0000000000100274 munmap 0x000000000010024c munmap
0x000000000010027c brk 0x0000000000100254 brk
.text 0x0000000000100284 0x618 tmp/powerpc64le-linux.elf-main.o .text 0x000000000010025c 0x650 tmp/powerpc64le-linux.elf-main.o
*(.data) *(.data)
.data 0x000000000010089c 0x0 tmp/powerpc64le-linux.elf-fold.o .data 0x00000000001008ac 0x0 tmp/powerpc64le-linux.elf-fold.o
.data 0x000000000010089c 0x0 tmp/powerpc64le-linux.elf-main.o .data 0x00000000001008ac 0x0 tmp/powerpc64le-linux.elf-main.o
.sfpr 0x000000000010089c 0x8c .sfpr 0x00000000001008ac 0x9c
.sfpr 0x000000000010089c 0x8c linker stubs .sfpr 0x00000000001008ac 0x9c linker stubs
0x000000000010089c _savegpr0_17 0x00000000001008ac _savegpr0_15
0x00000000001008c4 _savegpr0_27 0x00000000001008dc _savegpr0_27
0x00000000001008c8 _savegpr0_28 0x00000000001008e0 _savegpr0_28
0x00000000001008e0 _restgpr0_17 0x00000000001008f8 _restgpr0_15
0x0000000000100908 _restgpr0_27 0x0000000000100928 _restgpr0_27
0x000000000010090c _restgpr0_28 0x000000000010092c _restgpr0_28
.glink 0x0000000000100928 0x0 .glink 0x0000000000100948 0x0
.glink 0x0000000000100928 0x0 linker stubs .glink 0x0000000000100948 0x0 linker stubs
.eh_frame 0x0000000000100928 0x0 .eh_frame 0x0000000000100948 0x0
.eh_frame 0x0000000000100928 0x0 linker stubs .eh_frame 0x0000000000100948 0x0 linker stubs
.rela.dyn 0x0000000000100928 0x0 .rela.dyn 0x0000000000100948 0x0
.rela.iplt 0x0000000000100928 0x0 linker stubs .rela.iplt 0x0000000000100948 0x0 linker stubs
.data .data
LOAD tmp/powerpc64le-linux.elf-fold.o LOAD tmp/powerpc64le-linux.elf-fold.o
LOAD tmp/powerpc64le-linux.elf-main.o LOAD tmp/powerpc64le-linux.elf-main.o
OUTPUT(tmp/powerpc64le-linux.elf-fold.bin elf64-powerpcle) OUTPUT(tmp/powerpc64le-linux.elf-fold.bin elf64-powerpcle)
.branch_lt 0x0000000000100928 0x0 .branch_lt 0x0000000000100948 0x0
.branch_lt 0x0000000000100928 0x0 linker stubs .branch_lt 0x0000000000100948 0x0 linker stubs
.toc 0x0000000000100928 0x0 .toc 0x0000000000100948 0x0
.toc 0x0000000000100928 0x0 tmp/powerpc64le-linux.elf-main.o .toc 0x0000000000100948 0x0 tmp/powerpc64le-linux.elf-main.o
.opd 0x0000000000100928 0x58 .opd 0x0000000000100948 0x58
.opd 0x0000000000100928 0x58 tmp/powerpc64le-linux.elf-main.o .opd 0x0000000000100948 0x58 tmp/powerpc64le-linux.elf-main.o
0x0000000000100968 upx_main 0x0000000000100988 upx_main
.iplt 0x0000000000100980 0x0 .iplt 0x00000000001009a0 0x0
.iplt 0x0000000000100980 0x0 linker stubs .iplt 0x00000000001009a0 0x0 linker stubs
.bss 0x0000000000100980 0x0 .bss 0x00000000001009a0 0x0
.bss 0x0000000000100980 0x0 tmp/powerpc64le-linux.elf-fold.o .bss 0x00000000001009a0 0x0 tmp/powerpc64le-linux.elf-fold.o
.bss 0x0000000000100980 0x0 tmp/powerpc64le-linux.elf-main.o .bss 0x00000000001009a0 0x0 tmp/powerpc64le-linux.elf-main.o