arm64: stub uses new strategy
modified: p_lx_elf.cpp modified: stub/src/powerpc64le-linux.elf-entry.S modified: stub/src/amd64-linux.elf-main.c modified: stub/src/arm64-linux.elf-entry.S modified: stub/src/arm64-linux.elf-fold.S modified: stub/src/arm64-linux.elf-main.c also .h, .map, .bin.dump
This commit is contained in:
+4
-30
@@ -460,7 +460,10 @@ off_t PackLinuxElf64::pack3(OutputFile *fo, Filter &ft)
|
||||
// between end_text and data, which we wish to prevent
|
||||
// because the expanded program will use that space.
|
||||
// So: pretend 4KiB pages.
|
||||
upx_uint64_t const pm = (Elf32_Ehdr::EM_X86_64==e_machine)
|
||||
upx_uint64_t const pm = (
|
||||
Elf64_Ehdr::EM_X86_64 ==e_machine
|
||||
|| Elf64_Ehdr::EM_AARCH64==e_machine
|
||||
)
|
||||
? ((~(upx_uint64_t)0)<<12)
|
||||
: page_mask;
|
||||
v_hole = pm & (~pm + v_hole + get_te64(&elfout.phdr[0].p_vaddr));
|
||||
@@ -3014,35 +3017,6 @@ void PackLinuxElf64arm::defineSymbols(Filter const *ft)
|
||||
{
|
||||
PackLinuxElf64::defineSymbols(ft);
|
||||
|
||||
lsize = /*getLoaderSize()*/ 4 * 1024; // upper bound; avoid circularity
|
||||
upx_uint64_t lo_va_user = ~0ul; // infinity
|
||||
for (int j= e_phnum; --j>=0; ) {
|
||||
if (PT_LOAD64 == get_te32(&phdri[j].p_type)) {
|
||||
upx_uint64_t const va = get_te64(&phdri[j].p_vaddr);
|
||||
if (va < lo_va_user) {
|
||||
lo_va_user = va;
|
||||
}
|
||||
}
|
||||
}
|
||||
upx_uint64_t lo_va_stub = get_te64(&elfout.phdr[0].p_vaddr);
|
||||
upx_uint64_t adrm = 0; // init: pacify c++-analyzer
|
||||
|
||||
is_big = true; // kernel disallows mapping below 0x8000.
|
||||
if (is_big) {
|
||||
set_te64( &elfout.ehdr.e_entry, linker->getSymbolOffset("_start") +
|
||||
get_te64(&elfout.ehdr.e_entry) + lo_va_user - lo_va_stub);
|
||||
set_te64(&elfout.phdr[0].p_vaddr, lo_va_user);
|
||||
set_te64(&elfout.phdr[0].p_paddr, lo_va_user);
|
||||
lo_va_stub = lo_va_user;
|
||||
adrm = getbrk(phdri, e_phnum);
|
||||
}
|
||||
adrm = page_mask & (~page_mask + adrm); // round up to page boundary
|
||||
adrm += page_size; // Try: hole so that kernel does not extend the brk(0)
|
||||
linker->defineSymbol("ADRM", adrm); // addr for map
|
||||
|
||||
linker->defineSymbol("CPR0", 4+ linker->getSymbolOffset("cpr0"));
|
||||
linker->defineSymbol("LENF", 4+ linker->getSymbolOffset("end_decompress"));
|
||||
|
||||
#define MAP_PRIVATE 2 /* UNIX standard */
|
||||
#define MAP_FIXED 0x10 /* UNIX standard */
|
||||
#define MAP_ANONYMOUS 0x20 /* UNIX standard */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* amd64-linux.elf-fold.h
|
||||
created from amd64-linux.elf-fold.bin, 2081 (0x821) bytes
|
||||
created from amd64-linux.elf-fold.bin, 2084 (0x824) bytes
|
||||
|
||||
This file is part of the UPX executable compressor.
|
||||
|
||||
@@ -31,20 +31,20 @@
|
||||
*/
|
||||
|
||||
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_SIZE 2081
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_ADLER32 0xb18f1299
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_CRC32 0x983884b3
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_SIZE 2084
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_ADLER32 0x6305132a
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_CRC32 0x904ce818
|
||||
|
||||
unsigned char stub_amd64_linux_elf_fold[2081] = {
|
||||
unsigned char stub_amd64_linux_elf_fold[2084] = {
|
||||
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0010 */ 2, 0, 62, 0, 1, 0, 0, 0,188, 0, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0030 */ 0, 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,
|
||||
/* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0060 */ 33, 8, 0, 0, 0, 0, 0, 0, 36, 8, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0060 */ 36, 8, 0, 0, 0, 0, 0, 0, 36, 8, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0070 */ 0, 0, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0080 */ 33, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0080 */ 36, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0090 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x00a0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 89, 0, 0,
|
||||
@@ -148,23 +148,23 @@ unsigned char stub_amd64_linux_elf_fold[2081] = {
|
||||
/* 0x06d0 */ 196,104, 91, 93, 65, 92, 65, 93, 65, 94, 76,137,248, 65, 95,195,
|
||||
/* 0x06e0 */ 65, 87, 65, 86, 73,137,206, 49,201, 65, 85, 65, 84, 77,137,204,
|
||||
/* 0x06f0 */ 85, 72,137,213, 76,141,109, 64, 83, 76,137,195, 72,131,236, 72,
|
||||
/* 0x0700 */ 139, 7, 72,137,124, 36, 24, 72,137,116, 36, 16, 76,141,188, 36,
|
||||
/* 0x0710 */ 128, 0, 0, 0, 72,137,124, 36, 40, 72,137,116, 36, 32, 72,141,
|
||||
/* 0x0720 */ 124, 36, 16, 72,141,116, 36, 48, 72,137, 84, 36, 56, 76,137,194,
|
||||
/* 0x0730 */ 72,137, 68, 36, 48,232, 74,251,255,255, 65, 83, 77,137,225, 49,
|
||||
/* 0x0740 */ 210, 73,137,216, 76,137,241, 72,137,239, 72,141,116, 36, 40, 65,
|
||||
/* 0x0750 */ 87,232,113,252,255,255,190, 9, 0, 0, 0, 72,137,194, 76,137,
|
||||
/* 0x0760 */ 247, 73,137,196,232, 44,252,255,255, 65, 89, 65, 90,102,131,125,
|
||||
/* 0x0770 */ 56, 0,199, 68, 36, 12, 0, 0, 0, 0, 15,132,143, 0, 0, 0,
|
||||
/* 0x0780 */ 65,131,125, 0, 3,117,114, 73,139, 63, 73, 3,125, 16, 49,210,
|
||||
/* 0x0790 */ 49,246,232,159,250,255,255,133,192,137,195,120, 23,186, 0, 4,
|
||||
/* 0x07a0 */ 0, 0, 72,137,238,137,199,232,154,250,255,255, 72, 61, 0, 4,
|
||||
/* 0x07b0 */ 0, 0,116, 10,191,127, 0, 0, 0,232,108,250,255,255, 73,199,
|
||||
/* 0x07c0 */ 7, 0, 0, 0, 0, 65, 80, 69, 49,201, 69, 49,192, 49,201, 65,
|
||||
/* 0x07d0 */ 87,137,218, 49,246, 72,137,239,232,234,251,255,255, 73,139, 23,
|
||||
/* 0x07e0 */ 190, 7, 0, 0, 0, 76,137,247, 73,137,196,232,165,251,255,255,
|
||||
/* 0x07f0 */ 137,223,232, 59,250,255,255, 94, 95,255, 68, 36, 12, 15,183, 69,
|
||||
/* 0x0800 */ 56, 73,131,197, 56, 57, 68, 36, 12, 15,130,113,255,255,255, 72,
|
||||
/* 0x0810 */ 131,196, 72, 76,137,224, 91, 93, 65, 92, 65, 93, 65, 94, 65, 95,
|
||||
/* 0x0820 */ 195
|
||||
/* 0x0700 */ 139, 7, 72,137,124, 36, 24, 72,137,124, 36, 40, 76,141,188, 36,
|
||||
/* 0x0710 */ 128, 0, 0, 0, 72,137,116, 36, 32, 72,141,116, 36, 48, 72,137,
|
||||
/* 0x0720 */ 84, 36, 56, 76,137,194, 72,137, 68, 36, 48,139, 71, 4, 72,141,
|
||||
/* 0x0730 */ 124, 36, 16, 72,137, 68, 36, 16,232, 71,251,255,255, 65, 83, 77,
|
||||
/* 0x0740 */ 137,225, 49,210, 73,137,216, 76,137,241, 72,137,239, 72,141,116,
|
||||
/* 0x0750 */ 36, 40, 65, 87,232,110,252,255,255,190, 9, 0, 0, 0, 72,137,
|
||||
/* 0x0760 */ 194, 76,137,247, 73,137,196,232, 41,252,255,255, 65, 89, 65, 90,
|
||||
/* 0x0770 */ 102,131,125, 56, 0,199, 68, 36, 12, 0, 0, 0, 0, 15,132,143,
|
||||
/* 0x0780 */ 0, 0, 0, 65,131,125, 0, 3,117,114, 73,139, 63, 73, 3,125,
|
||||
/* 0x0790 */ 16, 49,210, 49,246,232,156,250,255,255,133,192,137,195,120, 23,
|
||||
/* 0x07a0 */ 186, 0, 4, 0, 0, 72,137,238,137,199,232,151,250,255,255, 72,
|
||||
/* 0x07b0 */ 61, 0, 4, 0, 0,116, 10,191,127, 0, 0, 0,232,105,250,255,
|
||||
/* 0x07c0 */ 255, 73,199, 7, 0, 0, 0, 0, 65, 80, 69, 49,201, 69, 49,192,
|
||||
/* 0x07d0 */ 49,201, 65, 87,137,218, 49,246, 72,137,239,232,231,251,255,255,
|
||||
/* 0x07e0 */ 73,139, 23,190, 7, 0, 0, 0, 76,137,247, 73,137,196,232,162,
|
||||
/* 0x07f0 */ 251,255,255,137,223,232, 56,250,255,255, 94, 95,255, 68, 36, 12,
|
||||
/* 0x0800 */ 15,183, 69, 56, 73,131,197, 56, 57, 68, 36, 12, 15,130,113,255,
|
||||
/* 0x0810 */ 255,255, 72,131,196, 72, 76,137,224, 91, 93, 65, 92, 65, 93, 65,
|
||||
/* 0x0820 */ 94, 65, 95,195
|
||||
};
|
||||
|
||||
+509
-536
File diff suppressed because it is too large
Load Diff
+154
-152
@@ -1,5 +1,5 @@
|
||||
/* arm64-linux.elf-fold.h
|
||||
created from arm64-linux.elf-fold.bin, 2496 (0x9c0) bytes
|
||||
created from arm64-linux.elf-fold.bin, 2528 (0x9e0) bytes
|
||||
|
||||
This file is part of the UPX executable compressor.
|
||||
|
||||
@@ -31,165 +31,167 @@
|
||||
*/
|
||||
|
||||
|
||||
#define STUB_ARM64_LINUX_ELF_FOLD_SIZE 2496
|
||||
#define STUB_ARM64_LINUX_ELF_FOLD_ADLER32 0x20a57b10
|
||||
#define STUB_ARM64_LINUX_ELF_FOLD_CRC32 0x0197c648
|
||||
#define STUB_ARM64_LINUX_ELF_FOLD_SIZE 2528
|
||||
#define STUB_ARM64_LINUX_ELF_FOLD_ADLER32 0x4d5d7c01
|
||||
#define STUB_ARM64_LINUX_ELF_FOLD_CRC32 0x6247915f
|
||||
|
||||
unsigned char stub_arm64_linux_elf_fold[2496] = {
|
||||
unsigned char stub_arm64_linux_elf_fold[2528] = {
|
||||
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0010 */ 2, 0,183, 0, 1, 0, 0, 0,188, 0, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0030 */ 0, 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,
|
||||
/* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0060 */ 192, 9, 0, 0, 0, 0, 0, 0,192, 9, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0060 */ 224, 9, 0, 0, 0, 0, 0, 0,224, 9, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0070 */ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0080 */ 192, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0080 */ 224, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0090 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x00a0 */ 0, 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,229, 35, 65,169,
|
||||
/* 0x00c0 */ 227, 19,194,168,231, 3, 64,249,224, 3, 0,145,225, 67, 0,145,
|
||||
/* 0x00d0 */ 33, 12, 7,139, 34,132, 64,248,226,255,255,181, 34, 4, 65,248,
|
||||
/* 0x00e0 */ 226,255,255,181, 32, 4, 64,209, 6, 16, 0,209, 33, 0, 6,203,
|
||||
/* 0x00f0 */ 192, 0, 1,203, 0, 32, 0,209, 0,236,124,146,225, 35, 0,145,
|
||||
/* 0x0100 */ 31, 0, 0,145,227, 19,190,169,229, 11, 0,249, 7,132, 0,248,
|
||||
/* 0x0110 */ 34,132, 64,248, 2,132, 0,248,194,255,255,181, 34,132, 64,248,
|
||||
/* 0x0120 */ 2,132, 0,248,194,255,255,181, 4, 32, 0,209, 31,132, 0,248,
|
||||
/* 0x0130 */ 231, 3, 0,170, 34, 12,193,168, 2, 12,129,168,194,255,255,181,
|
||||
/* 0x0140 */ 224, 11, 0,249,225, 3, 6,170,129, 0, 0,249,162, 4, 0, 24,
|
||||
/* 0x0150 */ 34, 68, 0,184,226,255,129, 82, 96, 4, 0, 16, 88, 0, 0,148,
|
||||
/* 0x0160 */ 31, 4, 64,177, 66, 0, 0, 84, 95,104, 32, 56,230, 3, 26,170,
|
||||
/* 0x0170 */ 255, 3, 40,209, 5, 4, 0, 16,228, 3, 28,170,227, 3, 7,170,
|
||||
/* 0x0180 */ 226, 3, 0,145,225, 3, 29, 42,224, 3, 27,170,142, 1, 0,148,
|
||||
/* 0x0190 */ 255, 3, 40,145,224, 15, 0,249, 96, 2, 0, 16, 1, 0,128, 82,
|
||||
/* 0x01a0 */ 73, 0, 0,148,239, 3, 0, 42,229, 3, 31,170,228, 3, 0, 42,
|
||||
/* 0x01b0 */ 67, 0,128, 82, 34, 0,128, 82, 1, 0,130,210,224, 3, 31,170,
|
||||
/* 0x01c0 */ 57, 0, 0,148,224, 3, 15, 42, 36, 0, 0,148,226,123, 65,169,
|
||||
/* 0x01d0 */ 224, 7,194,168, 67,128, 95,248,232, 26,128, 82, 96, 0, 31,214,
|
||||
/* 0x01e0 */ 32, 32, 32, 61, 47,112,114,111, 99, 47,115,101,108,102, 47,101,
|
||||
/* 0x01f0 */ 120,101, 0, 0, 99, 28, 0, 18,127, 72, 1,113,129, 1, 0, 84,
|
||||
/* 0x0200 */ 33,252, 66,211, 65, 1, 0,180, 33, 4, 0,209, 2,120, 97,184,
|
||||
/* 0x0210 */ 67,120, 26, 83,127, 20, 0,113,129, 0, 0, 84, 67, 0, 1, 75,
|
||||
/* 0x0220 */ 98,100, 0, 51, 2,120, 33,184, 1,255,255,181,192, 3, 95,214,
|
||||
/* 0x0230 */ 0, 0, 32,212,192, 3, 95,214,200, 11,128, 82, 1, 0, 0,212,
|
||||
/* 0x0240 */ 232, 7,128, 82, 1, 0, 0,212,192, 3, 95,214, 8, 8,128, 82,
|
||||
/* 0x0250 */ 1, 0, 0,212,192, 3, 95,214, 40, 7,128, 82, 1, 0, 0,212,
|
||||
/* 0x0260 */ 192, 3, 95,214,168, 21,128, 82, 1, 0, 0,212,192, 3, 95,214,
|
||||
/* 0x0270 */ 200, 26,128, 82, 1, 0, 0,212,192, 3, 95,214,232, 26,128, 82,
|
||||
/* 0x0280 */ 1, 0, 0,212,192, 3, 95,214, 72, 28,128, 82, 1, 0, 0,212,
|
||||
/* 0x0290 */ 192, 3, 95,214, 38,241,255, 24, 5, 0,128,210, 4, 0,128,146,
|
||||
/* 0x02a0 */ 99, 0, 6, 42,200, 27,128, 82, 1, 0, 0,212,192, 3, 95,214,
|
||||
/* 0x02b0 */ 1, 0,128,210,104, 4,128, 82, 4, 0, 0, 20,200, 9,128, 82,
|
||||
/* 0x02c0 */ 2, 0, 0, 20, 8, 7,128, 82,227, 3, 2,170,226, 3, 1,170,
|
||||
/* 0x02d0 */ 225, 3, 0,170, 96, 12,128,146, 1, 0, 0,212,192, 3, 95,214,
|
||||
/* 0x02e0 */ 0, 0, 64,212, 2, 0,128, 82, 8, 0,128, 82, 1, 0, 0,212,
|
||||
/* 0x02f0 */ 192, 3, 95,214,160, 1, 0,180,227, 3, 1, 42, 4, 0, 64,249,
|
||||
/* 0x0300 */ 159, 0, 3,235,129, 0, 0, 84, 3, 0, 0,249, 2, 4, 0,249,
|
||||
/* 0x0310 */ 6, 0, 0, 20,159, 4, 0,241, 65, 0, 0, 84, 97,255,255, 53,
|
||||
/* 0x0320 */ 0, 64, 0,145,246,255,255, 23,192, 3, 95,214,253,123,191,169,
|
||||
/* 0x0330 */ 3, 0,128,210,253, 3, 0,145, 5, 0, 64,249, 4, 4, 64,249,
|
||||
/* 0x0340 */ 191, 0, 2,235, 98, 0, 0, 84,224, 15,128, 82,187,255,255,151,
|
||||
/* 0x0350 */ 127, 0, 2,235,160, 0, 0, 84,133,104, 99, 56, 37,104, 35, 56,
|
||||
/* 0x0360 */ 99, 4, 0,145,251,255,255, 23, 1, 4, 64,249, 33, 0, 3,139,
|
||||
/* 0x0370 */ 1, 4, 0,249, 1, 0, 64,249, 35, 0, 3,203, 3, 0, 0,249,
|
||||
/* 0x0380 */ 253,123,193,168,192, 3, 95,214,253,123,187,169,253, 3, 0,145,
|
||||
/* 0x0390 */ 243, 83, 1,169,245, 91, 2,169,244, 3, 0,170,243, 3, 1,170,
|
||||
/* 0x03a0 */ 246, 3, 2,170,245, 3, 3,170, 96, 2, 64,249,128, 8, 0,180,
|
||||
/* 0x03b0 */ 224, 3, 20,170,130, 1,128,210,161, 3, 1,145,220,255,255,151,
|
||||
/* 0x03c0 */ 160, 67, 64,185,162, 71, 64,185, 0, 1, 0, 53,160, 10,138, 82,
|
||||
/* 0x03d0 */ 0, 43,164,114, 95, 0, 0,107,225, 0, 0, 84,128, 2, 64,249,
|
||||
/* 0x03e0 */ 224, 6, 0,180, 4, 0, 0, 20, 98, 0, 0, 52, 95, 0, 0,107,
|
||||
/* 0x03f0 */ 105, 0, 0, 84,224, 15,128, 82,144,255,255,151, 97, 2, 64,249,
|
||||
/* 0x0400 */ 63, 64, 32,235,131,255,255, 84, 95, 0, 0,107, 2, 4, 0, 84,
|
||||
/* 0x0410 */ 160, 63, 0,185,225, 3, 2, 42,128, 6, 64,249,163,243, 0,145,
|
||||
/* 0x0420 */ 98, 6, 64,249,164, 35, 65, 57,192, 2, 63,214, 64,254,255, 53,
|
||||
/* 0x0430 */ 161, 63, 64,185,160, 67, 64,185, 63, 0, 0,107,193,253,255, 84,
|
||||
/* 0x0440 */ 163, 39, 65, 57, 85, 1, 0,180, 35, 1, 0, 52, 63, 0, 8,113,
|
||||
/* 0x0450 */ 136, 0, 0, 84, 96, 2, 64,249, 31, 64, 33,235,129, 0, 0, 84,
|
||||
/* 0x0460 */ 96, 6, 64,249,162, 43, 65, 57,160, 2, 63,214,163, 71, 64,185,
|
||||
/* 0x0470 */ 129, 6, 64,249,128, 2, 64,249, 33, 0, 3,139,129, 6, 0,249,
|
||||
/* 0x0480 */ 0, 0, 3,203,128, 2, 0,249, 5, 0, 0, 20, 97, 6, 64,249,
|
||||
/* 0x0490 */ 224, 3, 20,170,226, 3, 2, 42,165,255,255,151,163, 67, 64,185,
|
||||
/* 0x04a0 */ 97, 6, 64,249, 96, 2, 64,249, 33, 0, 3,139, 97, 6, 0,249,
|
||||
/* 0x04b0 */ 0, 0, 3,203, 96, 2, 0,249,188,255,255, 23,243, 83, 65,169,
|
||||
/* 0x04c0 */ 245, 91, 66,169,253,123,197,168,192, 3, 95,214,253,123,181,169,
|
||||
/* 0x04d0 */ 253, 3, 0,145,243, 83, 1,169,232, 39, 6,109, 19, 16, 64,249,
|
||||
/* 0x04e0 */ 234, 47, 7,109,247, 99, 3,169, 19, 0, 19,139,248, 3, 0,170,
|
||||
/* 0x04f0 */ 0, 32, 64,121,247, 3, 1,170,236, 67, 0,253, 1, 0,128,210,
|
||||
/* 0x0500 */ 31, 12, 0,113, 20, 0,128,146,104, 0,103,158, 3, 2,128, 82,
|
||||
/* 0x0510 */ 74, 0, 39, 30, 99, 16,159, 26,172, 0,103,158, 99,136, 0, 17,
|
||||
/* 0x0520 */ 201, 0,103,158,224, 3, 19,170,139, 0,103,158, 4,115, 64,121,
|
||||
/* 0x0530 */ 245, 91, 2,169,249,107, 4,169,251,115, 5,169,132, 4, 0, 81,
|
||||
/* 0x0540 */ 159, 4, 0, 49,160, 1, 0, 84, 2, 0, 64,185, 95, 4, 0,113,
|
||||
/* 0x0550 */ 1, 1, 0, 84, 5, 8, 64,249, 2, 20, 64,249,159, 2, 5,235,
|
||||
/* 0x0560 */ 162, 0, 2,139,148,146,133,154, 63, 0, 2,235, 33, 32,130,154,
|
||||
/* 0x0570 */ 0,224, 0,145,242,255,255, 23,148,206,116,146, 33,252, 63,145,
|
||||
/* 0x0580 */ 33, 0, 20,203,224, 3, 20,170, 33,204,116,146, 2, 0,128, 82,
|
||||
/* 0x0590 */ 5, 0,128,210, 27, 0,128, 82, 67,255,255,151, 20, 0, 20,203,
|
||||
/* 0x05a0 */ 0,115, 64,121,127, 3, 0,107,170, 13, 0, 84, 96, 2, 64,185,
|
||||
/* 0x05b0 */ 55, 1, 0,180, 31, 24, 0,113,225, 0, 0, 84, 98, 10, 64,249,
|
||||
/* 0x05c0 */ 97, 0,128, 82, 0, 1,102,158,130, 2, 2,139, 74,255,255,151,
|
||||
/* 0x05d0 */ 96, 0, 0, 20, 31, 4, 0,113,193, 11, 0, 84,121, 6, 64,185,
|
||||
/* 0x05e0 */ 0, 72,140, 82, 32,106,174,114,255, 2, 31,235, 57, 11, 30, 83,
|
||||
/* 0x05f0 */ 117, 10, 64,249, 0, 36,217, 26,160,147, 0,185, 28, 8, 0, 18,
|
||||
/* 0x0600 */ 64, 0,128, 82, 2, 16,159, 26,149, 2, 21,139, 64, 1, 38, 30,
|
||||
/* 0x0610 */ 118, 18, 64,249,122, 22, 64,249,165, 46, 64,146,255, 2, 31,235,
|
||||
/* 0x0620 */ 102, 6, 64,249,181, 87, 0,249,185, 0, 22,139, 4, 0,159, 90,
|
||||
/* 0x0630 */ 71, 6,128, 82,255, 2, 31,235,186, 2, 26,139, 67, 2,128, 82,
|
||||
/* 0x0640 */ 181,206,116,146,227, 16,131, 26,224, 3, 21,170,225, 3, 25,170,
|
||||
/* 0x0650 */ 66, 0, 28, 42,197, 0, 5,203,182, 83, 0,249, 18,255,255,151,
|
||||
/* 0x0660 */ 191, 2, 0,235, 96, 0, 0, 84,224, 15,128, 82,243,254,255,151,
|
||||
/* 0x0670 */ 215, 0, 0,180, 98, 1,102,158,224, 3, 23,170,131, 1,102,158,
|
||||
/* 0x0680 */ 161,131, 2,145, 65,255,255,151,160, 75, 64,249,246, 3, 25,203,
|
||||
/* 0x0690 */ 214, 46, 64,146, 96, 0, 8, 55, 87, 1, 0,181, 32, 0, 0, 20,
|
||||
/* 0x06a0 */ 214,255,255,180,161, 2, 25,139, 0, 0,128,210, 63,104, 32, 56,
|
||||
/* 0x06b0 */ 0, 4, 0,145, 31, 0, 22,235,161,255,255, 84,247,255,255, 23,
|
||||
/* 0x06c0 */ 96, 2, 64,249,225, 3, 0,178, 0,128, 64,146, 31, 0, 1,235,
|
||||
/* 0x06d0 */ 193, 1, 0, 84, 98, 22, 64,249, 97, 18, 64,249, 96, 10, 64,249,
|
||||
/* 0x06e0 */ 95, 0, 1,235, 33, 1, 0, 84,129, 14, 0,145, 34, 0, 2,139,
|
||||
/* 0x06f0 */ 66, 0, 0,139, 66,244,126,146,224, 3, 2,203, 0, 44, 64,146,
|
||||
/* 0x0700 */ 31, 28, 0,241, 72, 3, 0, 84,224, 3, 21,170,225, 3, 25,170,
|
||||
/* 0x0710 */ 226, 3, 28, 42,221,254,255,151,128,250,255, 53,214, 2, 25,139,
|
||||
/* 0x0720 */ 181, 2, 22,139,191, 2, 26,235, 66, 1, 0, 84,224, 3, 21,170,
|
||||
/* 0x0730 */ 65, 3, 21,203,226, 3, 28, 42, 67, 6,128, 82, 4, 0,128, 18,
|
||||
/* 0x0740 */ 5, 0,128,210,216,254,255,151,191, 2, 0,235,225,248,255, 84,
|
||||
/* 0x0750 */ 115,226, 0,145,123, 7, 0, 17,146,255,255, 23, 32, 1,102,158,
|
||||
/* 0x0760 */ 160, 1, 0,180, 20, 0, 0,249, 11, 0, 0, 20, 32, 0,128, 82,
|
||||
/* 0x0770 */ 1, 0,128, 82, 0,128,186,114, 64, 0, 0,185, 0,120,128, 82,
|
||||
/* 0x0780 */ 224,203,186,114, 64, 4, 0,185, 0, 1,102,158,218,254,255,151,
|
||||
/* 0x0790 */ 222,255,255, 23, 0, 15, 64,249,232, 39, 70,109,245, 91, 66,169,
|
||||
/* 0x07a0 */ 234, 47, 71,109,128, 2, 0,139,243, 83, 65,169,247, 99, 67,169,
|
||||
/* 0x07b0 */ 249,107, 68,169,251,115, 69,169,236, 67, 64,253,253,123,203,168,
|
||||
/* 0x07c0 */ 192, 3, 95,214,253,123,182,169,253, 3, 0,145,243, 83, 1,169,
|
||||
/* 0x07d0 */ 243, 3, 2,170,244, 3, 3,170,162, 63, 0,249, 3, 0,128,210,
|
||||
/* 0x07e0 */ 2, 0, 64,185,162, 59, 0,249,226, 3, 4,170,160, 79, 0,249,
|
||||
/* 0x07f0 */ 161, 75, 0,249,160, 71, 0,249,160, 67, 2,145,161, 67, 0,249,
|
||||
/* 0x0800 */ 161,195, 1,145,165, 39, 0,249,164, 43, 0,249,166, 47, 0,249,
|
||||
/* 0x0810 */ 245, 91, 2,169,247, 99, 3,169,220,254,255,151,117, 2, 1,145,
|
||||
/* 0x0820 */ 99, 18, 64,249,224, 3, 20,170,162, 47, 64,249, 97, 0,128, 82,
|
||||
/* 0x0830 */ 98, 0, 2,139,176,254,255,151, 98,114, 64,121,224, 3, 20,170,
|
||||
/* 0x0840 */ 161, 0,128, 82,172,254,255,151,119, 34, 64,121,164, 43, 64,249,
|
||||
/* 0x0850 */ 255, 14, 0,113,165, 39, 64,249,224, 1, 0, 84,224, 3, 19,170,
|
||||
/* 0x0860 */ 161, 3, 2,145, 2, 0,128, 82,227, 3, 20,170,166, 99, 1,145,
|
||||
/* 0x0870 */ 23,255,255,151,246, 3, 0,170,255, 14, 0,113, 64, 4, 0, 84,
|
||||
/* 0x0880 */ 224, 3, 20,170, 33, 1,128, 82,226, 3, 22,170,154,254,255,151,
|
||||
/* 0x0890 */ 29, 0, 0, 20, 64, 0,128, 82,162, 47, 64,249, 96, 34, 0,121,
|
||||
/* 0x08a0 */ 33, 1,128, 82, 96, 14, 64,249,165, 39, 0,249, 66, 0, 0,139,
|
||||
/* 0x08b0 */ 224, 3, 20,170, 98, 14, 0,249,164, 43, 0,249,142,254,255,151,
|
||||
/* 0x08c0 */ 102,114, 64,121,224, 3, 21,170,162, 47, 64,249, 1, 0,128, 82,
|
||||
/* 0x08d0 */ 164, 43, 64,249,165, 39, 64,249, 63, 0, 6,107, 2,252,255, 84,
|
||||
/* 0x08e0 */ 3, 8, 64,249, 33, 4, 0, 17, 0,224, 0,145, 99, 0, 2,139,
|
||||
/* 0x08f0 */ 3,128, 29,248, 3, 0, 94,248, 99, 0, 2,139, 3, 0, 30,248,
|
||||
/* 0x0900 */ 246,255,255, 23, 23, 0,128, 82, 96,114, 64,121,255, 2, 0,107,
|
||||
/* 0x0910 */ 194, 4, 0, 84,160, 2, 64,185, 31, 12, 0,113, 1, 4, 0, 84,
|
||||
/* 0x0920 */ 161, 10, 64,249,160, 47, 64,249, 32, 0, 0,139, 1, 0,128, 82,
|
||||
/* 0x0930 */ 226, 3, 1, 42,100,254,255,151,248, 3, 0, 42, 96, 0,248, 54,
|
||||
/* 0x0940 */ 224, 15,128, 82, 61,254,255,151,225, 3, 19,170, 2,128,128,210,
|
||||
/* 0x0950 */ 60,254,255,151, 31, 0, 16,241, 65,255,255, 84, 1, 0,128,210,
|
||||
/* 0x0960 */ 226, 3, 24, 42,227, 3, 1,170,228, 3, 1,170,229, 3, 1,170,
|
||||
/* 0x0970 */ 166,163, 1,145,224, 3, 19,170,191, 55, 0,249,212,254,255,151,
|
||||
/* 0x0980 */ 246, 3, 0,170,162, 55, 64,249,224, 3, 20,170,225, 0,128, 82,
|
||||
/* 0x0990 */ 89,254,255,151,224, 3, 24, 42, 48,254,255,151,181,226, 0,145,
|
||||
/* 0x09a0 */ 247, 6, 0, 17,217,255,255, 23,224, 3, 22,170,243, 83, 65,169,
|
||||
/* 0x09b0 */ 245, 91, 66,169,247, 99, 67,169,253,123,202,168,192, 3, 95,214
|
||||
/* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,146,
|
||||
/* 0x00c0 */ 1, 0, 0,145, 0, 32,193,154,192, 3, 95,214,231, 3, 64,249,
|
||||
/* 0x00d0 */ 224, 3, 0,145,225, 3, 23,170, 34, 4, 65,248,226,255,255,181,
|
||||
/* 0x00e0 */ 32, 4, 64,209, 6, 16, 0,209, 33, 0, 6,203,192, 0, 1,203,
|
||||
/* 0x00f0 */ 0, 32, 0,209, 0,236,124,146,225, 35, 0,145, 31, 0, 0,145,
|
||||
/* 0x0100 */ 7,132, 0,248, 34,132, 64,248, 2,132, 0,248,194,255,255,181,
|
||||
/* 0x0110 */ 34,132, 64,248, 2,132, 0,248,194,255,255,181, 4, 32, 0,209,
|
||||
/* 0x0120 */ 31,132, 0,248,231, 3, 0,170,247, 3, 0,170, 34, 12,193,168,
|
||||
/* 0x0130 */ 2, 12,129,168,194,255,255,181,243, 3, 0,170,225, 3, 6,170,
|
||||
/* 0x0140 */ 129, 0, 0,249, 98, 4, 0, 24, 34, 68, 0,184,226,255,129, 82,
|
||||
/* 0x0150 */ 32, 4, 0, 16, 88, 0, 0,148, 31, 4, 64,177, 66, 0, 0, 84,
|
||||
/* 0x0160 */ 95,104, 32, 56,231, 3, 27,170,230, 3, 22,170,255, 3, 40,209,
|
||||
/* 0x0170 */ 165, 3, 0, 16,228, 3, 28,170,227, 3, 23,170,226, 3, 0,145,
|
||||
/* 0x0180 */ 225, 3, 20, 42,224, 3, 21,170,189, 1, 0,148,255, 3, 40,145,
|
||||
/* 0x0190 */ 252, 3, 0,170, 5, 0,128,210,228, 3, 24, 42, 67, 0,128, 82,
|
||||
/* 0x01a0 */ 34, 0,128, 82, 1, 0,130,210, 0, 0,128,210, 58, 0, 0,148,
|
||||
/* 0x01b0 */ 224, 3, 24, 42, 37, 0, 0,148,254, 3, 28,170,224, 3, 26,170,
|
||||
/* 0x01c0 */ 225, 3, 25, 42, 98,130, 95,248,232, 26,128, 82, 64, 0, 31,214,
|
||||
/* 0x01d0 */ 32, 32, 32, 61, 47,112,114,111, 99, 47,115,101,108,102, 47,101,
|
||||
/* 0x01e0 */ 120,101, 0, 0, 99, 28, 0, 18,127, 72, 1,113,129, 1, 0, 84,
|
||||
/* 0x01f0 */ 33,252, 66,211, 65, 1, 0,180, 33, 4, 0,209, 2,120, 97,184,
|
||||
/* 0x0200 */ 67,120, 26, 83,127, 20, 0,113,129, 0, 0, 84, 67, 0, 1, 75,
|
||||
/* 0x0210 */ 98,100, 0, 51, 2,120, 33,184, 1,255,255,181,192, 3, 95,214,
|
||||
/* 0x0220 */ 0, 0, 32,212,192, 3, 95,214,168, 11,128, 82, 1, 0, 0,212,
|
||||
/* 0x0230 */ 232, 7,128, 82, 1, 0, 0,212,192, 3, 95,214, 8, 8,128, 82,
|
||||
/* 0x0240 */ 1, 0, 0,212,192, 3, 95,214, 40, 7,128, 82, 1, 0, 0,212,
|
||||
/* 0x0250 */ 192, 3, 95,214,168, 21,128, 82, 1, 0, 0,212,192, 3, 95,214,
|
||||
/* 0x0260 */ 200, 26,128, 82, 1, 0, 0,212,192, 3, 95,214,232, 26,128, 82,
|
||||
/* 0x0270 */ 1, 0, 0,212,192, 3, 95,214, 72, 28,128, 82, 1, 0, 0,212,
|
||||
/* 0x0280 */ 192, 3, 95,214, 38,242,255, 24, 5, 0,128,210, 4, 0,128,146,
|
||||
/* 0x0290 */ 99, 0, 6, 42,200, 27,128, 82, 1, 0, 0,212,192, 3, 95,214,
|
||||
/* 0x02a0 */ 2, 0,128,210,225, 3, 0,170, 96, 12,128, 18,104, 4,128, 82,
|
||||
/* 0x02b0 */ 4, 0, 0, 20,200, 9,128, 82, 2, 0, 0, 20, 8, 7,128, 82,
|
||||
/* 0x02c0 */ 227, 3, 2,170,226, 3, 1,170,225, 3, 0,170, 96, 12,128,146,
|
||||
/* 0x02d0 */ 1, 0, 0,212,192, 3, 95,214, 0, 0, 64,212, 2, 0,128, 82,
|
||||
/* 0x02e0 */ 8, 0,128, 82, 1, 0, 0,212,192, 3, 95,214,160, 1, 0,180,
|
||||
/* 0x02f0 */ 227, 3, 1, 42, 4, 0, 64,249,159, 0, 3,235,129, 0, 0, 84,
|
||||
/* 0x0300 */ 3, 0, 0,249, 2, 4, 0,249, 6, 0, 0, 20,159, 4, 0,241,
|
||||
/* 0x0310 */ 65, 0, 0, 84, 97,255,255, 53, 0, 64, 0,145,246,255,255, 23,
|
||||
/* 0x0320 */ 192, 3, 95,214,253,123,191,169, 3, 0,128,210,253, 3, 0,145,
|
||||
/* 0x0330 */ 5, 0, 64,249, 4, 4, 64,249,191, 0, 2,235, 98, 0, 0, 84,
|
||||
/* 0x0340 */ 224, 15,128, 82,185,255,255,151,127, 0, 2,235,160, 0, 0, 84,
|
||||
/* 0x0350 */ 133,104, 99, 56, 37,104, 35, 56, 99, 4, 0,145,251,255,255, 23,
|
||||
/* 0x0360 */ 1, 4, 64,249, 33, 0, 3,139, 1, 4, 0,249, 1, 0, 64,249,
|
||||
/* 0x0370 */ 35, 0, 3,203, 3, 0, 0,249,253,123,193,168,192, 3, 95,214,
|
||||
/* 0x0380 */ 253,123,187,169,253, 3, 0,145,243, 83, 1,169,245, 91, 2,169,
|
||||
/* 0x0390 */ 244, 3, 0,170,243, 3, 1,170,246, 3, 2,170,245, 3, 3,170,
|
||||
/* 0x03a0 */ 96, 2, 64,249,160, 8, 0,180,224, 3, 20,170,130, 1,128,210,
|
||||
/* 0x03b0 */ 161, 3, 1,145,220,255,255,151,160, 67, 64,185,162, 71, 64,185,
|
||||
/* 0x03c0 */ 0, 1, 0, 53,160, 10,138, 82, 0, 43,164,114, 95, 0, 0,107,
|
||||
/* 0x03d0 */ 225, 0, 0, 84,128, 2, 64,249, 0, 7, 0,180, 4, 0, 0, 20,
|
||||
/* 0x03e0 */ 98, 0, 0, 52, 95, 0, 0,107,105, 0, 0, 84,224, 15,128, 82,
|
||||
/* 0x03f0 */ 142,255,255,151, 99, 2, 64,249,225, 3, 0, 42, 63, 0, 3,235,
|
||||
/* 0x0400 */ 104,255,255, 84, 95, 0, 0,107, 2, 4, 0, 84,161, 31, 0,249,
|
||||
/* 0x0410 */ 225, 3, 2, 42,128, 6, 64,249,163,227, 0,145, 98, 6, 64,249,
|
||||
/* 0x0420 */ 164, 35, 65, 57,192, 2, 63,214, 32,254,255, 53,161, 31, 64,249,
|
||||
/* 0x0430 */ 160, 67, 64,185, 63, 0, 0,235,161,253,255, 84,163, 39, 65, 57,
|
||||
/* 0x0440 */ 85, 1, 0,180, 35, 1, 0, 52, 63, 0, 8,241,136, 0, 0, 84,
|
||||
/* 0x0450 */ 96, 2, 64,249, 31, 0, 1,235,129, 0, 0, 84, 96, 6, 64,249,
|
||||
/* 0x0460 */ 162, 43, 65, 57,160, 2, 63,214,163, 71, 64,185,129, 6, 64,249,
|
||||
/* 0x0470 */ 128, 2, 64,249, 33, 0, 3,139,129, 6, 0,249, 0, 0, 3,203,
|
||||
/* 0x0480 */ 128, 2, 0,249, 5, 0, 0, 20, 97, 6, 64,249,224, 3, 20,170,
|
||||
/* 0x0490 */ 226, 3, 2, 42,164,255,255,151,163, 67, 64,185, 97, 6, 64,249,
|
||||
/* 0x04a0 */ 96, 2, 64,249, 33, 0, 3,139, 97, 6, 0,249, 0, 0, 3,203,
|
||||
/* 0x04b0 */ 96, 2, 0,249,187,255,255, 23,243, 83, 65,169,245, 91, 66,169,
|
||||
/* 0x04c0 */ 253,123,197,168,192, 3, 95,214,253,123,180,169,253, 3, 0,145,
|
||||
/* 0x04d0 */ 234, 47, 7,109,202, 0,103,158, 6, 16, 64,249,236, 55, 8,109,
|
||||
/* 0x04e0 */ 245, 91, 2,169,232, 39, 6,109,245, 3, 0,170,249,107, 4,169,
|
||||
/* 0x04f0 */ 26, 0, 6,139, 0, 32, 64,121,247, 99, 3,169, 31, 12, 0,113,
|
||||
/* 0x0500 */ 248, 3, 3,170, 64, 1,102,158, 3, 2,128, 82,141, 0,103,158,
|
||||
/* 0x0510 */ 99, 16,159, 26,238, 75, 0,253,247, 3, 1,170,174, 0,103,158,
|
||||
/* 0x0520 */ 165,114, 64,121, 0, 0, 64,249, 99,136, 0, 17,243, 83, 1,169,
|
||||
/* 0x0530 */ 251,115, 5,169, 76, 0, 39, 30,251, 3, 7,170,226, 3, 26,170,
|
||||
/* 0x0540 */ 1, 0,128,210, 19, 0,128,146,165, 4, 0, 81,191, 4, 0, 49,
|
||||
/* 0x0550 */ 160, 1, 0, 84, 68, 0, 64,185,159, 4, 0,113, 1, 1, 0, 84,
|
||||
/* 0x0560 */ 71, 8, 64,249, 68, 20, 64,249,127, 2, 7,235,228, 0, 4,139,
|
||||
/* 0x0570 */ 115,146,135,154, 63, 0, 4,235, 33, 32,132,154, 66,224, 0,145,
|
||||
/* 0x0580 */ 242,255,255, 23,226, 3, 59,170,115, 2, 27,138, 65, 0, 1,139,
|
||||
/* 0x0590 */ 33, 0, 19,203, 72, 0,103,158, 33, 0, 27,138,163, 0, 32, 55,
|
||||
/* 0x05a0 */ 83, 0, 0,181,160, 0, 0,181, 0, 0,128,210, 4, 0, 0, 20,
|
||||
/* 0x05b0 */ 224, 3, 19,170, 2, 0, 0, 20, 67, 6,128, 82, 2, 0,128, 82,
|
||||
/* 0x05c0 */ 4, 0,128, 18, 5, 0,128,210, 28, 0,128, 82, 50,255,255,151,
|
||||
/* 0x05d0 */ 19, 0, 19,203, 96,230,122,211, 11, 0,103,158,160,114, 64,121,
|
||||
/* 0x05e0 */ 159, 3, 0,107,234, 18, 0, 84, 64, 3, 64,185, 55, 1, 0,180,
|
||||
/* 0x05f0 */ 31, 24, 0,113,225, 0, 0, 84, 66, 11, 64,249,224, 3, 24,170,
|
||||
/* 0x0600 */ 97, 0,128, 82, 98, 2, 2,139, 57,255,255,151,132, 0, 0, 20,
|
||||
/* 0x0610 */ 31, 4, 0,113, 65, 16, 0, 84, 87, 2, 0,180, 64, 7, 64,249,
|
||||
/* 0x0620 */ 0, 2, 0,181,162, 18, 64,249,224, 3, 24,170, 67, 11, 64,249,
|
||||
/* 0x0630 */ 97, 0,128, 82, 98, 2, 2,139, 66, 0, 3,139, 44,255,255,151,
|
||||
/* 0x0640 */ 162,114, 64,121,224, 3, 24,170,161, 0,128, 82, 40,255,255,151,
|
||||
/* 0x0650 */ 162,110, 64,121,224, 3, 24,170,129, 0,128, 82, 36,255,255,151,
|
||||
/* 0x0660 */ 89, 7, 64,185, 0, 72,140, 82, 32,106,174,114, 84, 11, 64,249,
|
||||
/* 0x0670 */ 57, 11, 30, 83,255, 2, 31,235, 0, 36,217, 26,160,163, 0,185,
|
||||
/* 0x0680 */ 25, 8, 0, 18, 64, 23, 64,249,116, 2, 20,139, 86, 19, 64,249,
|
||||
/* 0x0690 */ 128, 2, 0,139, 71, 7, 64,249,182, 91, 0,249, 70, 6,128, 82,
|
||||
/* 0x06a0 */ 9, 0,103,158,180, 95, 0,249, 0, 1,102,158, 67, 2,128, 82,
|
||||
/* 0x06b0 */ 133, 2, 0,138, 64, 0,128, 82, 2, 16,159, 26,255, 2, 31,235,
|
||||
/* 0x06c0 */ 128, 1, 38, 30,148, 2, 5,203,182, 0, 22,139, 66, 0, 25, 42,
|
||||
/* 0x06d0 */ 225, 3, 22,170,229, 0, 5,203, 4, 0,159, 90,255, 2, 31,235,
|
||||
/* 0x06e0 */ 195, 16,131, 26,224, 3, 20,170,235,254,255,151,159, 2, 0,235,
|
||||
/* 0x06f0 */ 96, 0, 0, 84,224, 15,128, 82,204,254,255,151,215, 0, 0,180,
|
||||
/* 0x0700 */ 162, 1,102,158,224, 3, 23,170,195, 1,102,158,161,195, 2,145,
|
||||
/* 0x0710 */ 28,255,255,151, 0, 1,102,158,227, 3, 22,203, 99, 0, 0,138,
|
||||
/* 0x0720 */ 160, 83, 64,249, 96, 0, 8, 55, 87, 1, 0,181, 45, 0, 0, 20,
|
||||
/* 0x0730 */ 195,255,255,180,129, 2, 22,139, 0, 0,128,210, 63,104, 32, 56,
|
||||
/* 0x0740 */ 0, 4, 0,145, 31, 0, 3,235,161,255,255, 84,247,255,255, 23,
|
||||
/* 0x0750 */ 64, 3, 64,249,225, 3, 0,178, 0,128, 64,146, 31, 0, 1,235,
|
||||
/* 0x0760 */ 33, 3, 0, 84, 65, 23, 64,249, 66, 19, 64,249, 64, 11, 64,249,
|
||||
/* 0x0770 */ 63, 0, 2,235,161, 5, 0, 84, 98, 14, 0,145, 66, 0, 1,139,
|
||||
/* 0x0780 */ 66, 0, 0,139, 66,244,126,146,225, 3, 2, 75, 33, 0, 59, 10,
|
||||
/* 0x0790 */ 63, 28, 0,113,169, 4, 0, 84, 32, 0,128, 82, 1, 0,128, 82,
|
||||
/* 0x07a0 */ 0,128,186,114, 64, 0, 0,185, 0,120,128, 82,163, 83, 0,249,
|
||||
/* 0x07b0 */ 224,203,186,114, 64, 4, 0,185,224, 3, 24,170,204,254,255,151,
|
||||
/* 0x07c0 */ 163, 83, 64,249,224, 3, 20,170,225, 3, 22,170,226, 3, 25, 42,
|
||||
/* 0x07d0 */ 163, 83, 0,249,169,254,255,151,163, 83, 64,249,192,248,255, 53,
|
||||
/* 0x07e0 */ 32, 1,102,158,118, 0, 22,139,148, 2, 22,139,159, 2, 0,235,
|
||||
/* 0x07f0 */ 98, 1, 0, 84, 33, 1,102,158,224, 3, 20,170,226, 3, 25, 42,
|
||||
/* 0x0800 */ 67, 6,128, 82, 4, 0,128, 18, 5, 0,128,210, 33, 0, 20,203,
|
||||
/* 0x0810 */ 161,254,255,151,159, 2, 0,235,225,246,255, 84, 90,227, 0,145,
|
||||
/* 0x0820 */ 156, 7, 0, 17,110,255,255, 23, 97, 1,102,158, 2, 0, 1,139,
|
||||
/* 0x0830 */ 64, 7, 64,249, 66, 32, 0,145, 0,251,255,180,226,255,255, 23,
|
||||
/* 0x0840 */ 64, 1,102,158,232, 39, 70,109,247, 99, 67,169,234, 47, 71,109,
|
||||
/* 0x0850 */ 249,107, 68,169,236, 55, 72,109,251,115, 69,169, 19, 0, 0,249,
|
||||
/* 0x0860 */ 238, 75, 64,253,160, 14, 64,249,245, 91, 66,169, 96, 2, 0,139,
|
||||
/* 0x0870 */ 243, 83, 65,169,253,123,204,168,192, 3, 95,214,253,123,182,169,
|
||||
/* 0x0880 */ 253, 3, 0,145,243, 83, 1,169,243, 3, 2,170,249, 35, 0,249,
|
||||
/* 0x0890 */ 162, 63, 0,249,249, 3, 7,170, 2, 0, 64,185,116, 2, 1,145,
|
||||
/* 0x08a0 */ 162, 59, 0,249, 2, 4, 64,185,247, 99, 3,169,160, 79, 0,249,
|
||||
/* 0x08b0 */ 247, 3, 3,170,162, 75, 0,249, 3, 0,128,210,226, 3, 4,170,
|
||||
/* 0x08c0 */ 160, 71, 0,249,161, 67, 0,249,160, 67, 2,145,161,195, 1,145,
|
||||
/* 0x08d0 */ 165, 47, 0,249,245, 91, 2,169,166, 55, 0,249, 22, 0,128, 82,
|
||||
/* 0x08e0 */ 164, 51, 0,249,167,254,255,151,164, 51, 64,249,161, 3, 2,145,
|
||||
/* 0x08f0 */ 165, 47, 64,249, 2, 0,128, 82,227, 3, 23,170,166,163, 1,145,
|
||||
/* 0x0900 */ 231, 3, 25,170,224, 3, 19,170,240,254,255,151,245, 3, 0,170,
|
||||
/* 0x0910 */ 33, 1,128, 82,224, 3, 23,170,226, 3, 21,170,116,254,255,151,
|
||||
/* 0x0920 */ 96,114, 64,121,223, 2, 0,107,226, 4, 0, 84,128, 2, 64,185,
|
||||
/* 0x0930 */ 31, 12, 0,113, 33, 4, 0, 84,129, 10, 64,249,160, 55, 64,249,
|
||||
/* 0x0940 */ 32, 0, 0,139, 1, 0,128, 82,226, 3, 1, 42, 92,254,255,151,
|
||||
/* 0x0950 */ 248, 3, 0, 42, 96, 0,248, 54,224, 15,128, 82, 51,254,255,151,
|
||||
/* 0x0960 */ 225, 3, 19,170, 2,128,128,210, 50,254,255,151, 31, 0, 16,241,
|
||||
/* 0x0970 */ 65,255,255, 84, 1, 0,128,210,226, 3, 24, 42,227, 3, 1,170,
|
||||
/* 0x0980 */ 228, 3, 1,170,229, 3, 1,170,166,163, 1,145,231, 3, 25,170,
|
||||
/* 0x0990 */ 224, 3, 19,170,191, 55, 0,249,204,254,255,151,245, 3, 0,170,
|
||||
/* 0x09a0 */ 162, 55, 64,249,224, 3, 23,170,225, 0,128, 82, 80,254,255,151,
|
||||
/* 0x09b0 */ 224, 3, 24, 42, 37,254,255,151,148,226, 0,145,214, 6, 0, 17,
|
||||
/* 0x09c0 */ 216,255,255, 23,224, 3, 21,170,249, 35, 64,249,243, 83, 65,169,
|
||||
/* 0x09d0 */ 245, 91, 66,169,247, 99, 67,169,253,123,202,168,192, 3, 95,214
|
||||
};
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
|
||||
#define STUB_POWERPC64_LINUX_ELF_ENTRY_SIZE 11568
|
||||
#define STUB_POWERPC64_LINUX_ELF_ENTRY_ADLER32 0xc761d06f
|
||||
#define STUB_POWERPC64_LINUX_ELF_ENTRY_CRC32 0xb13e13b0
|
||||
#define STUB_POWERPC64_LINUX_ELF_ENTRY_ADLER32 0xcfb7d090
|
||||
#define STUB_POWERPC64_LINUX_ELF_ENTRY_CRC32 0xe0324858
|
||||
|
||||
unsigned char stub_powerpc64_linux_elf_entry[11568] = {
|
||||
/* 0x0000 */ 127, 69, 76, 70, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@@ -512,9 +512,9 @@ unsigned char stub_powerpc64_linux_elf_entry[11568] = {
|
||||
/* 0x1d90 */ 127, 32,200, 80, 56, 96, 0, 0,124, 25,176, 80,124,149, 2, 20,
|
||||
/* 0x1da0 */ 124,156, 35,120, 72, 0, 0,153,124,125, 27,120,128, 22, 0, 8,
|
||||
/* 0x1db0 */ 124,149,224, 80,127,103,219,120, 56,192, 0, 18,124,132, 2, 20,
|
||||
/* 0x1dc0 */ 72, 0, 0,125,126,153, 24, 80,130,118, 0, 0, 56,118, 0, 16,
|
||||
/* 0x1dd0 */ 126,214,162, 20,126,246,170, 20,126,216,240, 56,126,248,184, 80,
|
||||
/* 0x1de0 */ 127,233, 3,166,127,255,162, 20,136,246, 0, 12,250,161, 1,136,
|
||||
/* 0x1dc0 */ 72, 0, 0,125,126,153, 24, 80,127,233, 3,166,127,255,162, 20,
|
||||
/* 0x1dd0 */ 130,118, 0, 0, 56,118, 0, 16,126,214,162, 20,126,246,170, 20,
|
||||
/* 0x1de0 */ 127,248,240, 56,126,248,184, 80,136,246, 0, 12,250,161, 1,136,
|
||||
/* 0x1df0 */ 56,193, 1,136,126,197,179,120,128,150, 0, 8, 78,128, 4, 33,
|
||||
/* 0x1e00 */ 128, 22, 0, 0,123,195,186, 66,120, 96, 4, 44,144, 22, 0, 0,
|
||||
/* 0x1e10 */ 56,160, 0, 5,126,228,187,120,127, 3,195,120, 56, 0, 0,125,
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
|
||||
#define STUB_POWERPC64_LINUX_ELF_FOLD_SIZE 3104
|
||||
#define STUB_POWERPC64_LINUX_ELF_FOLD_ADLER32 0xe43a3a74
|
||||
#define STUB_POWERPC64_LINUX_ELF_FOLD_CRC32 0x39041749
|
||||
#define STUB_POWERPC64_LINUX_ELF_FOLD_ADLER32 0x48493ab5
|
||||
#define STUB_POWERPC64_LINUX_ELF_FOLD_CRC32 0x6f4ca6de
|
||||
|
||||
unsigned char stub_powerpc64_linux_elf_fold[3104] = {
|
||||
/* 0x0000 */ 127, 69, 76, 70, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@@ -42,7 +42,7 @@ unsigned char stub_powerpc64_linux_elf_fold[3104] = {
|
||||
/* 0x0030 */ 0, 0, 0, 1, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0040 */ 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0050 */ 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0,
|
||||
/* 0x0060 */ 0, 0, 0, 0, 0, 0, 11,204, 0, 0, 0, 0, 0, 0, 11,204,
|
||||
/* 0x0060 */ 0, 0, 0, 0, 0, 0, 11,208, 0, 0, 0, 0, 0, 0, 11,208,
|
||||
/* 0x0070 */ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6,
|
||||
/* 0x0080 */ 0, 0, 0, 0, 0, 0, 11,208, 0, 0, 0, 0, 0, 16, 11,208,
|
||||
/* 0x0090 */ 0, 0, 0, 0, 0, 16, 11,208, 0, 0, 0, 0, 0, 0, 0, 80,
|
||||
@@ -106,7 +106,7 @@ unsigned char stub_powerpc64_linux_elf_fold[3104] = {
|
||||
/* 0x0430 */ 57, 41, 0, 1, 75,255,255,240,233, 67, 0, 8,125, 74, 74, 20,
|
||||
/* 0x0440 */ 249, 67, 0, 8,233, 67, 0, 0,125, 41, 80, 80,249, 35, 0, 0,
|
||||
/* 0x0450 */ 78,128, 0, 32, 0, 0, 0, 0, 0, 0, 0, 1,128, 0, 0, 0,
|
||||
/* 0x0460 */ 125,128, 0, 38,124, 8, 2,166,145,129, 0, 8, 72, 0, 6,245,
|
||||
/* 0x0460 */ 125,128, 0, 38,124, 8, 2,166,145,129, 0, 8, 72, 0, 6,249,
|
||||
/* 0x0470 */ 248, 33,255, 81,124,126, 27,120,124,159, 35,120,124,189, 43,120,
|
||||
/* 0x0480 */ 124,220, 51,120, 46, 38, 0, 0,233, 63, 0, 0, 47,169, 0, 0,
|
||||
/* 0x0490 */ 65,158, 1, 84,127,195,243,120, 56,129, 0,112, 56,160, 0, 12,
|
||||
@@ -131,8 +131,8 @@ unsigned char stub_powerpc64_linux_elf_fold[3104] = {
|
||||
/* 0x05c0 */ 75,255,254, 49,129, 1, 0,112,233, 95, 0, 8,233, 63, 0, 0,
|
||||
/* 0x05d0 */ 125, 74, 66, 20,125, 40, 72, 80,249, 95, 0, 8,249, 63, 0, 0,
|
||||
/* 0x05e0 */ 75,255,254,168, 56, 33, 0,176,129,129, 0, 8,125,144,129, 32,
|
||||
/* 0x05f0 */ 72, 0, 5,192, 0, 0, 0, 0, 0, 0, 0, 3,128, 4, 0, 0,
|
||||
/* 0x0600 */ 125,128, 0, 38,124, 8, 2,166,145,129, 0, 8, 72, 0, 5, 29,
|
||||
/* 0x05f0 */ 72, 0, 5,196, 0, 0, 0, 0, 0, 0, 0, 3,128, 4, 0, 0,
|
||||
/* 0x0600 */ 125,128, 0, 38,124, 8, 2,166,145,129, 0, 8, 72, 0, 5, 33,
|
||||
/* 0x0610 */ 248, 33,254,225,125, 15, 67,120,161, 3, 0, 16,125, 50, 75,120,
|
||||
/* 0x0620 */ 233, 35, 0, 32,125, 90, 83,120,124,125, 27,120,124,147, 35,120,
|
||||
/* 0x0630 */ 47,136, 0, 3,248,161, 1, 96,124,216, 51,120,124,240, 59,120,
|
||||
@@ -189,42 +189,42 @@ unsigned char stub_powerpc64_linux_elf_fold[3104] = {
|
||||
/* 0x0960 */ 127,190, 24, 0, 64,222,254,236, 59, 57, 0, 1, 58, 49, 0, 56,
|
||||
/* 0x0970 */ 127, 57, 7,180, 75,255,253,196,251,242, 0, 0, 56, 33, 1, 32,
|
||||
/* 0x0980 */ 129,129, 0, 8,125,144,129, 32,232,125, 0, 24,124,127, 26, 20,
|
||||
/* 0x0990 */ 72, 0, 1,232,233, 33, 0,128,233, 17, 0, 8,124,167, 74, 20,
|
||||
/* 0x0990 */ 72, 0, 1,236,233, 33, 0,128,233, 17, 0, 8,124,167, 74, 20,
|
||||
/* 0x09a0 */ 47,168, 0, 0, 56,165, 0, 8, 65,158,255, 80, 75,255,255,104,
|
||||
/* 0x09b0 */ 0, 0, 0, 0, 0, 0, 0, 3,128, 18, 0, 0,124, 8, 2,166,
|
||||
/* 0x09c0 */ 72, 0, 1,145,248, 33,255, 17,124,191, 43,120,124,218, 51,120,
|
||||
/* 0x09d0 */ 125, 61, 75,120,129, 35, 0, 0, 56,192, 0, 0,125, 88, 83,120,
|
||||
/* 0x09c0 */ 72, 0, 1,149,248, 33,255, 17,125, 61, 75,120,129, 35, 0, 0,
|
||||
/* 0x09d0 */ 124,191, 43,120,124,218, 51,120, 56,192, 0, 0,125, 88, 83,120,
|
||||
/* 0x09e0 */ 248,161, 0,152,249, 33, 0,144,124,229, 59,120, 59,159, 0, 64,
|
||||
/* 0x09f0 */ 248, 97, 0,120,248,129, 0,112, 59,192, 0, 0,248, 97, 0,136,
|
||||
/* 0x0a00 */ 248,129, 0,128,248,225, 0,160,249, 1, 0,168, 56, 97, 0,112,
|
||||
/* 0x0a10 */ 56,129, 0,144, 75,255,250, 77,232,225, 0,160,233, 1, 0,168,
|
||||
/* 0x0a20 */ 56,129, 0,128, 56,160, 0, 0,127, 70,211,120,127,169,235,120,
|
||||
/* 0x0a30 */ 127, 10,195,120,127,227,251,120, 75,255,251,201, 56,128, 0, 9,
|
||||
/* 0x0a40 */ 124,123, 27,120,127, 67,211,120,127,101,219,120, 75,255,249, 97,
|
||||
/* 0x0a50 */ 161, 63, 0, 56,127,137,240, 64, 64,157, 0,184,129, 60, 0, 0,
|
||||
/* 0x0a60 */ 47,137, 0, 3, 64,158, 0,156,232,124, 0, 16,233, 61, 0, 0,
|
||||
/* 0x0a70 */ 56,128, 0, 0, 56,160, 0, 0,124, 99, 74, 20, 75,255,249, 9,
|
||||
/* 0x0a80 */ 96, 0, 0, 0, 47,131, 0, 0,124,121, 27,120, 64,252, 0, 16,
|
||||
/* 0x0a90 */ 56, 96, 0,127, 75,255,248,209, 96, 0, 0, 0,127,228,251,120,
|
||||
/* 0x0aa0 */ 56,160, 4, 0, 75,255,248,217, 96, 0, 0, 0, 47,163, 4, 0,
|
||||
/* 0x0ab0 */ 64,222,255,224, 57, 32, 0, 0, 56,128, 0, 0,249, 61, 0, 0,
|
||||
/* 0x0ac0 */ 127, 37,203,120, 56,192, 0, 0, 56,224, 0, 0, 57, 0, 0, 0,
|
||||
/* 0x0ad0 */ 127,169,235,120,127, 10,195,120,127,227,251,120, 75,255,251, 37,
|
||||
/* 0x0ae0 */ 232,189, 0, 0, 56,128, 0, 7,124,123, 27,120,127, 67,211,120,
|
||||
/* 0x0af0 */ 75,255,248,189,127, 35,203,120, 75,255,248,149, 96, 0, 0, 0,
|
||||
/* 0x0b00 */ 59,222, 0, 1, 59,156, 0, 56,123,222, 0, 32, 75,255,255, 68,
|
||||
/* 0x0b10 */ 56, 33, 0,240,127, 99,219,120, 72, 0, 0,136, 0, 0, 0, 0,
|
||||
/* 0x0b20 */ 0, 0, 0, 1,128, 8, 0, 0,249,193,255,112,249,225,255,120,
|
||||
/* 0x0b30 */ 250, 1,255,128,250, 33,255,136,250, 65,255,144,250, 97,255,152,
|
||||
/* 0x0b40 */ 250,129,255,160,250,161,255,168,250,193,255,176,250,225,255,184,
|
||||
/* 0x0b50 */ 251, 1,255,192,251, 33,255,200,251, 65,255,208,251, 97,255,216,
|
||||
/* 0x0b60 */ 251,129,255,224,251,161,255,232,251,193,255,240,251,225,255,248,
|
||||
/* 0x0b70 */ 248, 1, 0, 16, 78,128, 0, 32,233,193,255,112,233,225,255,120,
|
||||
/* 0x0b80 */ 234, 1,255,128,234, 33,255,136,234, 65,255,144,234, 97,255,152,
|
||||
/* 0x0b90 */ 234,129,255,160,234,161,255,168,234,193,255,176,234,225,255,184,
|
||||
/* 0x0ba0 */ 235, 1,255,192,235, 33,255,200,235, 65,255,208,235, 97,255,216,
|
||||
/* 0x0bb0 */ 235,129,255,224,232, 1, 0, 16,235,161,255,232,124, 8, 3,166,
|
||||
/* 0x0bc0 */ 235,193,255,240,235,225,255,248, 78,128, 0, 32, 0, 0, 0, 0,
|
||||
/* 0x09f0 */ 129, 35, 0, 4,248, 97, 0,120, 59,192, 0, 0,248, 97, 0,136,
|
||||
/* 0x0a00 */ 248,129, 0,128,249, 33, 0,112,248,225, 0,160,249, 1, 0,168,
|
||||
/* 0x0a10 */ 56, 97, 0,112, 56,129, 0,144, 75,255,250, 73,232,225, 0,160,
|
||||
/* 0x0a20 */ 233, 1, 0,168, 56,129, 0,128, 56,160, 0, 0,127, 70,211,120,
|
||||
/* 0x0a30 */ 127,169,235,120,127, 10,195,120,127,227,251,120, 75,255,251,197,
|
||||
/* 0x0a40 */ 56,128, 0, 9,124,123, 27,120,127, 67,211,120,127,101,219,120,
|
||||
/* 0x0a50 */ 75,255,249, 93,161, 63, 0, 56,127,137,240, 64, 64,157, 0,184,
|
||||
/* 0x0a60 */ 129, 60, 0, 0, 47,137, 0, 3, 64,158, 0,156,232,124, 0, 16,
|
||||
/* 0x0a70 */ 233, 61, 0, 0, 56,128, 0, 0, 56,160, 0, 0,124, 99, 74, 20,
|
||||
/* 0x0a80 */ 75,255,249, 5, 96, 0, 0, 0, 47,131, 0, 0,124,121, 27,120,
|
||||
/* 0x0a90 */ 64,252, 0, 16, 56, 96, 0,127, 75,255,248,205, 96, 0, 0, 0,
|
||||
/* 0x0aa0 */ 127,228,251,120, 56,160, 4, 0, 75,255,248,213, 96, 0, 0, 0,
|
||||
/* 0x0ab0 */ 47,163, 4, 0, 64,222,255,224, 57, 32, 0, 0, 56,128, 0, 0,
|
||||
/* 0x0ac0 */ 249, 61, 0, 0,127, 37,203,120, 56,192, 0, 0, 56,224, 0, 0,
|
||||
/* 0x0ad0 */ 57, 0, 0, 0,127,169,235,120,127, 10,195,120,127,227,251,120,
|
||||
/* 0x0ae0 */ 75,255,251, 33,232,189, 0, 0, 56,128, 0, 7,124,123, 27,120,
|
||||
/* 0x0af0 */ 127, 67,211,120, 75,255,248,185,127, 35,203,120, 75,255,248,145,
|
||||
/* 0x0b00 */ 96, 0, 0, 0, 59,222, 0, 1, 59,156, 0, 56,123,222, 0, 32,
|
||||
/* 0x0b10 */ 75,255,255, 68, 56, 33, 0,240,127, 99,219,120, 72, 0, 0,136,
|
||||
/* 0x0b20 */ 0, 0, 0, 0, 0, 0, 0, 1,128, 8, 0, 0,249,193,255,112,
|
||||
/* 0x0b30 */ 249,225,255,120,250, 1,255,128,250, 33,255,136,250, 65,255,144,
|
||||
/* 0x0b40 */ 250, 97,255,152,250,129,255,160,250,161,255,168,250,193,255,176,
|
||||
/* 0x0b50 */ 250,225,255,184,251, 1,255,192,251, 33,255,200,251, 65,255,208,
|
||||
/* 0x0b60 */ 251, 97,255,216,251,129,255,224,251,161,255,232,251,193,255,240,
|
||||
/* 0x0b70 */ 251,225,255,248,248, 1, 0, 16, 78,128, 0, 32,233,193,255,112,
|
||||
/* 0x0b80 */ 233,225,255,120,234, 1,255,128,234, 33,255,136,234, 65,255,144,
|
||||
/* 0x0b90 */ 234, 97,255,152,234,129,255,160,234,161,255,168,234,193,255,176,
|
||||
/* 0x0ba0 */ 234,225,255,184,235, 1,255,192,235, 33,255,200,235, 65,255,208,
|
||||
/* 0x0bb0 */ 235, 97,255,216,235,129,255,224,232, 1, 0, 16,235,161,255,232,
|
||||
/* 0x0bc0 */ 124, 8, 3,166,235,193,255,240,235,225,255,248, 78,128, 0, 32,
|
||||
/* 0x0bd0 */ 0, 0, 0, 0, 0, 16, 3,172, 0, 0, 0, 0, 0, 16,139,208,
|
||||
/* 0x0be0 */ 0, 0, 0, 0, 0, 16, 3,240, 0, 0, 0, 0, 0, 16,139,208,
|
||||
/* 0x0bf0 */ 0, 0, 0, 0, 0, 16, 4, 96, 0, 0, 0, 0, 0, 16,139,208,
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_ENTRY_SIZE 11186
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_ENTRY_ADLER32 0xbafd82a0
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_ENTRY_CRC32 0x9a9717a7
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_ENTRY_ADLER32 0x961282c1
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_ENTRY_CRC32 0x08758063
|
||||
|
||||
unsigned char stub_powerpc64le_linux_elf_entry[11186] = {
|
||||
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@@ -510,9 +510,9 @@ unsigned char stub_powerpc64le_linux_elf_entry[11186] = {
|
||||
/* 0x1d70 */ 80,200, 32,127, 0, 0, 96, 56, 80,176, 25,124, 20, 2,149,124,
|
||||
/* 0x1d80 */ 120, 35,156,124,153, 0, 0, 72,120, 27,125,124, 8, 0, 22,128,
|
||||
/* 0x1d90 */ 80,224,149,124,120,219,103,127, 18, 0,192, 56, 20, 2,132,124,
|
||||
/* 0x1da0 */ 125, 0, 0, 72, 80, 24,153,126, 0, 0,118,130, 16, 0,118, 56,
|
||||
/* 0x1db0 */ 20,162,214,126, 20,170,246,126, 56,240,216,126, 80,184,248,126,
|
||||
/* 0x1dc0 */ 166, 3,233,127, 20,162,255,127, 12, 0,246,136,104, 1,161,250,
|
||||
/* 0x1da0 */ 125, 0, 0, 72, 80, 24,153,126,166, 3,233,127, 20,162,255,127,
|
||||
/* 0x1db0 */ 0, 0,118,130, 16, 0,118, 56, 20,162,214,126, 20,170,246,126,
|
||||
/* 0x1dc0 */ 56,240,248,127, 80,184,248,126, 12, 0,246,136,104, 1,161,250,
|
||||
/* 0x1dd0 */ 104, 1,193, 56,120,179,197,126, 8, 0,150,128, 33, 4,128, 78,
|
||||
/* 0x1de0 */ 0, 0, 22,128, 66,186,195,123, 44, 4, 96,120, 0, 0, 22,144,
|
||||
/* 0x1df0 */ 5, 0,160, 56,120,187,228,126,120,195, 3,127,125, 0, 0, 56,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* powerpc64le-linux.elf-fold.h
|
||||
created from powerpc64le-linux.elf-fold.bin, 3043 (0xbe3) bytes
|
||||
created from powerpc64le-linux.elf-fold.bin, 3051 (0xbeb) bytes
|
||||
|
||||
This file is part of the UPX executable compressor.
|
||||
|
||||
@@ -31,21 +31,21 @@
|
||||
*/
|
||||
|
||||
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_SIZE 3043
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_ADLER32 0x0b7a29be
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_CRC32 0x7bca2af5
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_SIZE 3051
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_ADLER32 0xe5b22a47
|
||||
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_CRC32 0x030e31ba
|
||||
|
||||
unsigned char stub_powerpc64le_linux_elf_fold[3043] = {
|
||||
unsigned char stub_powerpc64le_linux_elf_fold[3051] = {
|
||||
/* 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,152, 11, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0010 */ 2, 0, 21, 0, 1, 0, 0, 0,160, 11, 16, 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,
|
||||
/* 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,
|
||||
/* 0x0060 */ 152, 11, 0, 0, 0, 0, 0, 0,152, 11, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0060 */ 156, 11, 0, 0, 0, 0, 0, 0,156, 11, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0070 */ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0,
|
||||
/* 0x0080 */ 152, 11, 0, 0, 0, 0, 0, 0,152, 11, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0090 */ 152, 11, 16, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0080 */ 160, 11, 0, 0, 0, 0, 0, 0,160, 11, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0090 */ 160, 11, 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,
|
||||
/* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,255, 96, 56,
|
||||
/* 0x00c0 */ 164, 77, 99,120, 32, 0,128, 78, 0, 0, 0, 96,125, 0, 0, 72,
|
||||
@@ -103,7 +103,7 @@ unsigned char stub_powerpc64le_linux_elf_fold[3043] = {
|
||||
/* 0x0400 */ 1, 0, 41, 57,240,255,255, 75, 8, 0, 67,233, 20, 74, 74,125,
|
||||
/* 0x0410 */ 8, 0, 67,249, 0, 0, 67,233, 80, 80, 41,125, 0, 0, 35,249,
|
||||
/* 0x0420 */ 32, 0,128, 78, 0, 0, 0, 0, 0, 0, 0, 1,128, 0, 0, 0,
|
||||
/* 0x0430 */ 38, 0,128,125,166, 2, 8,124, 8, 0,129,145,241, 6, 0, 72,
|
||||
/* 0x0430 */ 38, 0,128,125,166, 2, 8,124, 8, 0,129,145,245, 6, 0, 72,
|
||||
/* 0x0440 */ 81,255, 33,248,120, 27,126,124,120, 35,159,124,120, 43,189,124,
|
||||
/* 0x0450 */ 120, 51,220,124, 0, 0, 38, 46, 0, 0, 63,233, 0, 0,169, 47,
|
||||
/* 0x0460 */ 84, 1,158, 65,120,243,195,127,112, 0,129, 56, 12, 0,160, 56,
|
||||
@@ -128,8 +128,8 @@ unsigned char stub_powerpc64le_linux_elf_fold[3043] = {
|
||||
/* 0x0590 */ 49,254,255, 75,112, 0, 1,129, 8, 0, 95,233, 0, 0, 63,233,
|
||||
/* 0x05a0 */ 20, 66, 74,125, 80, 72, 40,125, 8, 0, 95,249, 0, 0, 63,249,
|
||||
/* 0x05b0 */ 168,254,255, 75,176, 0, 33, 56, 8, 0,129,129, 32,129,144,125,
|
||||
/* 0x05c0 */ 188, 5, 0, 72, 0, 0, 0, 0, 0, 0, 0, 3,128, 4, 0, 0,
|
||||
/* 0x05d0 */ 38, 0,128,125,166, 2, 8,124, 8, 0,129,145, 25, 5, 0, 72,
|
||||
/* 0x05c0 */ 192, 5, 0, 72, 0, 0, 0, 0, 0, 0, 0, 3,128, 4, 0, 0,
|
||||
/* 0x05d0 */ 38, 0,128,125,166, 2, 8,124, 8, 0,129,145, 29, 5, 0, 72,
|
||||
/* 0x05e0 */ 225,254, 33,248,120, 67, 15,125, 16, 0, 3,161,120, 75, 50,125,
|
||||
/* 0x05f0 */ 32, 0, 35,233,120, 83, 90,125,120, 27,125,124,120, 35,147,124,
|
||||
/* 0x0600 */ 3, 0,136, 47, 96, 1,161,248,120, 51,216,124,120, 59,240,124,
|
||||
@@ -185,46 +185,46 @@ unsigned char stub_powerpc64le_linux_elf_fold[3043] = {
|
||||
/* 0x0920 */ 0, 0, 0, 57,249,249,255, 75, 0, 0, 0, 96, 0, 24,190,127,
|
||||
/* 0x0930 */ 240,254,222, 64, 1, 0, 57, 59, 56, 0, 49, 58,180, 7, 57,127,
|
||||
/* 0x0940 */ 200,253,255, 75, 0, 0,242,251, 32, 1, 33, 56, 8, 0,129,129,
|
||||
/* 0x0950 */ 32,129,144,125, 24, 0,125,232, 20, 26,127,124,232, 1, 0, 72,
|
||||
/* 0x0950 */ 32,129,144,125, 24, 0,125,232, 20, 26,127,124,236, 1, 0, 72,
|
||||
/* 0x0960 */ 128, 0, 33,233, 8, 0, 17,233, 20, 74,167,124, 0, 0,168, 47,
|
||||
/* 0x0970 */ 8, 0,165, 56, 80,255,158, 65,104,255,255, 75, 0, 0, 0, 0,
|
||||
/* 0x0980 */ 0, 0, 0, 3,128, 18, 0, 0,166, 2, 8,124,145, 1, 0, 72,
|
||||
/* 0x0990 */ 17,255, 33,248,120, 43,191,124,120, 51,218,124,120, 75, 61,125,
|
||||
/* 0x09a0 */ 0, 0, 35,129, 0, 0,192, 56,120, 83, 88,125,152, 0,161,248,
|
||||
/* 0x09b0 */ 144, 0, 33,249,120, 59,229,124, 64, 0,159, 59,120, 0, 97,248,
|
||||
/* 0x09c0 */ 112, 0,129,248, 0, 0,192, 59,136, 0, 97,248,128, 0,129,248,
|
||||
/* 0x09d0 */ 160, 0,225,248,168, 0, 1,249,112, 0, 97, 56,144, 0,129, 56,
|
||||
/* 0x09e0 */ 81,250,255, 75,160, 0,225,232,168, 0, 1,233,128, 0,129, 56,
|
||||
/* 0x09f0 */ 0, 0,160, 56,120,211, 70,127,120,235,169,127,120,195, 10,127,
|
||||
/* 0x0a00 */ 120,251,227,127,205,251,255, 75, 9, 0,128, 56,120, 27,123,124,
|
||||
/* 0x0a10 */ 120,211, 67,127,120,219,101,127,101,249,255, 75, 56, 0, 63,161,
|
||||
/* 0x0a20 */ 64,240,137,127,184, 0,157, 64, 0, 0, 60,129, 3, 0,137, 47,
|
||||
/* 0x0a30 */ 156, 0,158, 64, 16, 0,124,232, 0, 0, 61,233, 0, 0,128, 56,
|
||||
/* 0x0a40 */ 0, 0,160, 56, 20, 74, 99,124, 13,249,255, 75, 0, 0, 0, 96,
|
||||
/* 0x0a50 */ 0, 0,131, 47,120, 27,121,124, 16, 0,252, 64,127, 0, 96, 56,
|
||||
/* 0x0a60 */ 213,248,255, 75, 0, 0, 0, 96,120,251,228,127, 0, 4,160, 56,
|
||||
/* 0x0a70 */ 221,248,255, 75, 0, 0, 0, 96, 0, 4,163, 47,224,255,222, 64,
|
||||
/* 0x0a80 */ 0, 0, 32, 57, 0, 0,128, 56, 0, 0, 61,249,120,203, 37,127,
|
||||
/* 0x0a90 */ 0, 0,192, 56, 0, 0,224, 56, 0, 0, 0, 57,120,235,169,127,
|
||||
/* 0x0aa0 */ 120,195, 10,127,120,251,227,127, 41,251,255, 75, 0, 0,189,232,
|
||||
/* 0x0ab0 */ 7, 0,128, 56,120, 27,123,124,120,211, 67,127,193,248,255, 75,
|
||||
/* 0x0ac0 */ 120,203, 35,127,153,248,255, 75, 0, 0, 0, 96, 1, 0,222, 59,
|
||||
/* 0x0ad0 */ 56, 0,156, 59, 32, 0,222,123, 68,255,255, 75,240, 0, 33, 56,
|
||||
/* 0x0ae0 */ 120,219, 99,127,136, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
/* 0x0af0 */ 128, 8, 0, 0,112,255,193,249,120,255,225,249,128,255, 1,250,
|
||||
/* 0x0b00 */ 136,255, 33,250,144,255, 65,250,152,255, 97,250,160,255,129,250,
|
||||
/* 0x0b10 */ 168,255,161,250,176,255,193,250,184,255,225,250,192,255, 1,251,
|
||||
/* 0x0b20 */ 200,255, 33,251,208,255, 65,251,216,255, 97,251,224,255,129,251,
|
||||
/* 0x0b30 */ 232,255,161,251,240,255,193,251,248,255,225,251, 16, 0, 1,248,
|
||||
/* 0x0b40 */ 32, 0,128, 78,112,255,193,233,120,255,225,233,128,255, 1,234,
|
||||
/* 0x0b50 */ 136,255, 33,234,144,255, 65,234,152,255, 97,234,160,255,129,234,
|
||||
/* 0x0b60 */ 168,255,161,234,176,255,193,234,184,255,225,234,192,255, 1,235,
|
||||
/* 0x0b70 */ 200,255, 33,235,208,255, 65,235,216,255, 97,235,224,255,129,235,
|
||||
/* 0x0b80 */ 16, 0, 1,232,232,255,161,235,166, 3, 8,124,240,255,193,235,
|
||||
/* 0x0b90 */ 248,255,225,235, 32, 0,128, 78,124, 3, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0ba0 */ 152,139, 16, 0, 0, 0, 0, 0,192, 3, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0bb0 */ 152,139, 16, 0, 0, 0, 0, 0, 48, 4, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0bc0 */ 152,139, 16, 0, 0, 0, 0, 0,208, 5, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0bd0 */ 152,139, 16, 0, 0, 0, 0, 0,136, 9, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0be0 */ 152,139, 16
|
||||
/* 0x0980 */ 0, 0, 0, 3,128, 18, 0, 0,166, 2, 8,124,149, 1, 0, 72,
|
||||
/* 0x0990 */ 17,255, 33,248,120, 75, 61,125, 0, 0, 35,129,120, 43,191,124,
|
||||
/* 0x09a0 */ 120, 51,218,124, 0, 0,192, 56,120, 83, 88,125,152, 0,161,248,
|
||||
/* 0x09b0 */ 144, 0, 33,249,120, 59,229,124, 64, 0,159, 59, 4, 0, 35,129,
|
||||
/* 0x09c0 */ 120, 0, 97,248, 0, 0,192, 59,136, 0, 97,248,128, 0,129,248,
|
||||
/* 0x09d0 */ 112, 0, 33,249,160, 0,225,248,168, 0, 1,249,112, 0, 97, 56,
|
||||
/* 0x09e0 */ 144, 0,129, 56, 77,250,255, 75,160, 0,225,232,168, 0, 1,233,
|
||||
/* 0x09f0 */ 128, 0,129, 56, 0, 0,160, 56,120,211, 70,127,120,235,169,127,
|
||||
/* 0x0a00 */ 120,195, 10,127,120,251,227,127,201,251,255, 75, 9, 0,128, 56,
|
||||
/* 0x0a10 */ 120, 27,123,124,120,211, 67,127,120,219,101,127, 97,249,255, 75,
|
||||
/* 0x0a20 */ 56, 0, 63,161, 64,240,137,127,184, 0,157, 64, 0, 0, 60,129,
|
||||
/* 0x0a30 */ 3, 0,137, 47,156, 0,158, 64, 16, 0,124,232, 0, 0, 61,233,
|
||||
/* 0x0a40 */ 0, 0,128, 56, 0, 0,160, 56, 20, 74, 99,124, 9,249,255, 75,
|
||||
/* 0x0a50 */ 0, 0, 0, 96, 0, 0,131, 47,120, 27,121,124, 16, 0,252, 64,
|
||||
/* 0x0a60 */ 127, 0, 96, 56,209,248,255, 75, 0, 0, 0, 96,120,251,228,127,
|
||||
/* 0x0a70 */ 0, 4,160, 56,217,248,255, 75, 0, 0, 0, 96, 0, 4,163, 47,
|
||||
/* 0x0a80 */ 224,255,222, 64, 0, 0, 32, 57, 0, 0,128, 56, 0, 0, 61,249,
|
||||
/* 0x0a90 */ 120,203, 37,127, 0, 0,192, 56, 0, 0,224, 56, 0, 0, 0, 57,
|
||||
/* 0x0aa0 */ 120,235,169,127,120,195, 10,127,120,251,227,127, 37,251,255, 75,
|
||||
/* 0x0ab0 */ 0, 0,189,232, 7, 0,128, 56,120, 27,123,124,120,211, 67,127,
|
||||
/* 0x0ac0 */ 189,248,255, 75,120,203, 35,127,149,248,255, 75, 0, 0, 0, 96,
|
||||
/* 0x0ad0 */ 1, 0,222, 59, 56, 0,156, 59, 32, 0,222,123, 68,255,255, 75,
|
||||
/* 0x0ae0 */ 240, 0, 33, 56,120,219, 99,127,136, 0, 0, 72, 0, 0, 0, 0,
|
||||
/* 0x0af0 */ 0, 0, 0, 1,128, 8, 0, 0,112,255,193,249,120,255,225,249,
|
||||
/* 0x0b00 */ 128,255, 1,250,136,255, 33,250,144,255, 65,250,152,255, 97,250,
|
||||
/* 0x0b10 */ 160,255,129,250,168,255,161,250,176,255,193,250,184,255,225,250,
|
||||
/* 0x0b20 */ 192,255, 1,251,200,255, 33,251,208,255, 65,251,216,255, 97,251,
|
||||
/* 0x0b30 */ 224,255,129,251,232,255,161,251,240,255,193,251,248,255,225,251,
|
||||
/* 0x0b40 */ 16, 0, 1,248, 32, 0,128, 78,112,255,193,233,120,255,225,233,
|
||||
/* 0x0b50 */ 128,255, 1,234,136,255, 33,234,144,255, 65,234,152,255, 97,234,
|
||||
/* 0x0b60 */ 160,255,129,234,168,255,161,234,176,255,193,234,184,255,225,234,
|
||||
/* 0x0b70 */ 192,255, 1,235,200,255, 33,235,208,255, 65,235,216,255, 97,235,
|
||||
/* 0x0b80 */ 224,255,129,235, 16, 0, 1,232,232,255,161,235,166, 3, 8,124,
|
||||
/* 0x0b90 */ 240,255,193,235,248,255,225,235, 32, 0,128, 78, 0, 0, 0, 0,
|
||||
/* 0x0ba0 */ 124, 3, 16, 0, 0, 0, 0, 0,160,139, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0bb0 */ 192, 3, 16, 0, 0, 0, 0, 0,160,139, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0bc0 */ 48, 4, 16, 0, 0, 0, 0, 0,160,139, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0bd0 */ 208, 5, 16, 0, 0, 0, 0, 0,160,139, 16, 0, 0, 0, 0, 0,
|
||||
/* 0x0be0 */ 136, 9, 16, 0, 0, 0, 0, 0,160,139, 16
|
||||
};
|
||||
|
||||
@@ -62,6 +62,16 @@
|
||||
/*out*/ : "=r"(r_fmt) ); \
|
||||
dprintf(r_fmt, args); \
|
||||
})
|
||||
#elif defined(__aarch64__) //{
|
||||
#define DPRINTF(fmt, args...) ({ \
|
||||
char const *r_fmt; \
|
||||
asm("bl 0f; .string \"" fmt "\"; .balign 4; 0: mov %0,x30" \
|
||||
/*out*/ : "=r"(r_fmt) \
|
||||
/* in*/ : \
|
||||
/*und*/ : "x30"); \
|
||||
dprintf(r_fmt, args); \
|
||||
})
|
||||
|
||||
#endif //}
|
||||
|
||||
static int dprintf(char const *fmt, ...); // forward
|
||||
@@ -179,7 +189,7 @@ ERR_LAB
|
||||
(unsigned char *)xo->buf, &out_len,
|
||||
#if defined(__x86_64) //{
|
||||
*(int *)(void *)&h.b_method
|
||||
#elif defined(__powerpc64__) //}{
|
||||
#elif defined(__powerpc64__) || defined(__aarch64__) //}{
|
||||
h.b_method
|
||||
#endif //}
|
||||
);
|
||||
@@ -208,7 +218,8 @@ static void *
|
||||
make_hatch_ppc64(
|
||||
Elf64_Phdr const *const phdr,
|
||||
Elf64_Addr reloc,
|
||||
unsigned const frag_mask)
|
||||
unsigned const frag_mask
|
||||
)
|
||||
{
|
||||
unsigned *hatch = 0;
|
||||
DPRINTF("make_hatch %%p %%x %%x\\n",phdr,reloc,frag_mask);
|
||||
@@ -231,9 +242,46 @@ make_hatch_ppc64(
|
||||
}
|
||||
return hatch;
|
||||
}
|
||||
#elif defined(__aarch64__) //{
|
||||
static void *
|
||||
make_hatch_arm64(
|
||||
Elf64_Phdr const *const phdr,
|
||||
uint64_t const reloc,
|
||||
unsigned const frag_mask
|
||||
)
|
||||
{
|
||||
unsigned *hatch = 0;
|
||||
//DPRINTF((STR_make_hatch(),phdr,reloc));
|
||||
if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) {
|
||||
// The format of the 'if' is
|
||||
// if ( ( (hatch = loc1), test_loc1 )
|
||||
// || ( (hatch = loc2), test_loc2 ) ) {
|
||||
// action
|
||||
// }
|
||||
// which uses the comma to save bytes when test_locj involves locj
|
||||
// and the action is the same when either test succeeds.
|
||||
|
||||
// Try page fragmentation just beyond .text .
|
||||
if ( ( (hatch = (void *)(~3ul & (3+ phdr->p_memsz + phdr->p_vaddr + reloc))),
|
||||
( phdr->p_memsz==phdr->p_filesz // don't pollute potential .bss
|
||||
&& (2*4)<=(frag_mask & -(int)(uint64_t)hatch) ) ) // space left on page
|
||||
// Try Elf64_Ehdr.e_ident[8..15] . warning: 'const' cast away
|
||||
|| ( (hatch = (void *)(&((Elf64_Ehdr *)phdr->p_vaddr + reloc)->e_ident[8])),
|
||||
(phdr->p_offset==0)
|
||||
)
|
||||
) {
|
||||
hatch[0]= 0xd4000001; // svc #0
|
||||
hatch[1]= 0xd65f03c0; // ret (jmp *lr)
|
||||
}
|
||||
else {
|
||||
hatch = 0;
|
||||
}
|
||||
}
|
||||
return hatch;
|
||||
}
|
||||
#endif //}
|
||||
|
||||
#if defined(__powerpc64__) /*{*/
|
||||
#if defined(__powerpc64__) || defined(__aarch64__) //{ bzero
|
||||
static void
|
||||
upx_bzero(char *p, size_t len)
|
||||
{
|
||||
@@ -245,7 +293,7 @@ upx_bzero(char *p, size_t len)
|
||||
#define bzero upx_bzero
|
||||
#else //}{
|
||||
#define bzero(a,b) __builtin_memset(a,0,b)
|
||||
#endif /*}*/
|
||||
#endif //}
|
||||
|
||||
static void
|
||||
auxv_up(Elf64_auxv_t *av, unsigned const type, uint64_t const value)
|
||||
@@ -283,7 +331,7 @@ static Elf64_Addr // returns relocation constant
|
||||
xfind_pages(unsigned mflags, Elf64_Phdr const *phdr, int phnum,
|
||||
Elf64_Addr *const p_brk
|
||||
, Elf64_Addr const elfaddr
|
||||
#if defined(__powerpc64__)
|
||||
#if defined(__powerpc64__) || defined(__aarch64__)
|
||||
, size_t const PAGE_MASK
|
||||
#endif
|
||||
)
|
||||
@@ -326,7 +374,7 @@ do_xmap(
|
||||
f_expand *const f_exp,
|
||||
f_unfilter *const f_unf,
|
||||
Elf64_Addr *p_reloc
|
||||
#if defined(__powerpc64__)
|
||||
#if defined(__powerpc64__) || defined(__aarch64__)
|
||||
, size_t const PAGE_MASK
|
||||
#endif
|
||||
)
|
||||
@@ -337,7 +385,7 @@ do_xmap(
|
||||
Elf64_Addr const reloc = xfind_pages(
|
||||
((ET_DYN!=ehdr->e_type) ? MAP_FIXED : 0), phdr, ehdr->e_phnum, &v_brk
|
||||
, *p_reloc
|
||||
#if defined(__powerpc64__)
|
||||
#if defined(__powerpc64__) || defined(__aarch64__)
|
||||
, PAGE_MASK
|
||||
#endif
|
||||
);
|
||||
@@ -392,6 +440,12 @@ do_xmap(
|
||||
if (0!=hatch) {
|
||||
auxv_up(av, AT_NULL, (size_t)hatch);
|
||||
}
|
||||
#elif defined(__aarch64__) //}{
|
||||
void *const hatch = make_hatch_arm64(phdr, reloc, ~PAGE_MASK);
|
||||
if (0!=hatch) {
|
||||
auxv_up(av, AT_NULL, (size_t)hatch);
|
||||
}
|
||||
|
||||
#endif //}
|
||||
if (0!=mprotect(addr, mlen, prot)) {
|
||||
err_exit(10);
|
||||
@@ -434,45 +488,35 @@ upx_main( // returns entry address
|
||||
f_expand *const f_exp,
|
||||
f_unfilter *const f_unf
|
||||
#if defined(__x86_64) //{
|
||||
, Elf64_Addr reloc // In: &Elf64_Ehdr for stub
|
||||
, Elf64_Addr elfaddr // In: &Elf64_Ehdr for stub
|
||||
#elif defined(__powerpc64__) //}{
|
||||
, Elf64_Addr *p_reloc // In: &Elf64_Ehdr for stub; Out: 'slide' for PT_INTERP
|
||||
, size_t const PAGE_MASK
|
||||
#elif defined(__aarch64__) //}{
|
||||
, Elf64_Addr elfaddr
|
||||
, size_t const PAGE_MASK
|
||||
#endif //}
|
||||
)
|
||||
{
|
||||
Extent xo, xi1, xi2;
|
||||
xo.buf = (char *)ehdr;
|
||||
xo.size = bi->sz_unc;
|
||||
xi2.buf = CONST_CAST(char *, bi); xi2.size = sz_compressed;
|
||||
xi2.buf = CONST_CAST(char *, bi); xi2.size = bi->sz_cpr;
|
||||
xi1.buf = CONST_CAST(char *, bi); xi1.size = sz_compressed;
|
||||
|
||||
// ehdr = Uncompress Ehdr and Phdrs
|
||||
unpackExtent(&xi2, &xo, f_exp, 0); // never filtered?
|
||||
|
||||
#if defined(__x86_64) //{
|
||||
Elf64_Addr *const p_reloc = &reloc;
|
||||
#elif defined(__powerpc64__) //}{
|
||||
Elf64_Addr const reloc = *p_reloc;
|
||||
#if defined(__x86_64) || defined(__aarch64__) //{
|
||||
Elf64_Addr *const p_reloc = &elfaddr;
|
||||
#endif //}
|
||||
DPRINTF("upx_main1 .e_entry=%%p p_reloc=%%p *p_reloc=%%p\\n",
|
||||
ehdr->e_entry, p_reloc, *p_reloc);
|
||||
Elf64_Phdr *phdr = (Elf64_Phdr *)(1+ ehdr);
|
||||
unsigned const orig_e_type = ehdr->e_type;
|
||||
if (0 && ET_DYN==orig_e_type /*&& phdr->p_vaddr==0*/) { // -pie /*FIXME: and not pre-linked*/
|
||||
// Unpacked must start at same place as packed, so that brk(0) works.
|
||||
ehdr->e_type = ET_EXEC;
|
||||
auxv_up(av, AT_ENTRY, ehdr->e_entry += reloc);
|
||||
unsigned j;
|
||||
for (j=0; j < ehdr->e_phnum; ++phdr, ++j) {
|
||||
phdr->p_vaddr += reloc;
|
||||
phdr->p_paddr += reloc;
|
||||
}
|
||||
}
|
||||
|
||||
// De-compress Ehdr again into actual position, then de-compress the rest.
|
||||
Elf64_Addr entry = do_xmap(ehdr, &xi1, 0, av, f_exp, f_unf, p_reloc
|
||||
#if defined(__powerpc64__)
|
||||
#if defined(__powerpc64__) || defined(__aarch64__)
|
||||
, PAGE_MASK
|
||||
#endif
|
||||
);
|
||||
@@ -496,7 +540,7 @@ ERR_LAB
|
||||
// Thus do_xmap will set *p_reloc = slide.
|
||||
*p_reloc = 0; // kernel picks where PT_INTERP goes
|
||||
entry = do_xmap(ehdr, 0, fdi, 0, 0, 0, p_reloc
|
||||
#if defined(__powerpc64__)
|
||||
#if defined(__powerpc64__) || defined(__aarch64__)
|
||||
, PAGE_MASK
|
||||
#endif
|
||||
);
|
||||
@@ -548,36 +592,6 @@ write(int fd, void const *ptr, size_t len)
|
||||
#endif //}
|
||||
#endif //}
|
||||
|
||||
#if defined(__i386__) /*{*/
|
||||
#define PIC_STRING(value, var) \
|
||||
__asm__ __volatile__ ( \
|
||||
"call 0f; .asciz \"" value "\"; \
|
||||
0: pop %0;" : "=r"(var) : \
|
||||
)
|
||||
#elif defined(__arm__) /*}{*/
|
||||
#define PIC_STRING(value, var) \
|
||||
__asm__ __volatile__ ( \
|
||||
"mov %0,pc; b 0f; \
|
||||
.asciz \"" value "\"; .balign 4; \
|
||||
0: " : "=r"(var) \
|
||||
)
|
||||
#elif defined(__mips__) /*}{*/
|
||||
#define PIC_STRING(value, var) \
|
||||
__asm__ __volatile__ ( \
|
||||
".set noreorder; bal 0f; move %0,$31; .set reorder; \
|
||||
.asciz \"" value "\"; .balign 4; \
|
||||
0: " \
|
||||
: "=r"(var) : : "ra" \
|
||||
)
|
||||
#elif defined(__powerpc__) || defined(__powerpc64__) /*}{*/
|
||||
#define PIC_STRING(value,var) \
|
||||
__asm__ ( \
|
||||
"bl 0f; .asciz \"" value "\"; .balign 4; \
|
||||
0: mflr %0" \
|
||||
: "=r"(var) : \
|
||||
)
|
||||
#endif /*}*/
|
||||
|
||||
static int
|
||||
unsimal(unsigned x, char *ptr, int n)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include "arch/arm64/v8/macros.S"
|
||||
NBPW= 8
|
||||
|
||||
sz_Elf64_Phdr= 56
|
||||
sz_Elf64_Ehdr= 64
|
||||
@@ -43,20 +44,38 @@ sz_l_info= 12
|
||||
sz_p_info= 12
|
||||
sz_o_binfo= 4
|
||||
|
||||
sz_b_info= 12
|
||||
sz_unc= 0
|
||||
sz_cpr= 4
|
||||
b_method= 8
|
||||
|
||||
AT_NULL= 0 // <elf.h>
|
||||
AT_PAGESZ= 6
|
||||
a_type= 0
|
||||
a_val= NBPW
|
||||
sz_auxv= 2*NBPW
|
||||
|
||||
AT_FDCWD= -100 // <fcntl.h>
|
||||
O_RDONLY= 0
|
||||
|
||||
PROT_READ= 1
|
||||
PROT_WRITE= 2
|
||||
PROT_EXEC= 4
|
||||
|
||||
MAP_PRIVATE= 2
|
||||
MAP_FIXED= 0x10
|
||||
MAP_ANONYMOUS= 0x20
|
||||
|
||||
PAGE_SHIFT= 12
|
||||
PAGE_SHIFT= 16 // 64KiB PAGE_SIZE
|
||||
PAGE_SIZE = -(~0<<PAGE_SHIFT)
|
||||
|
||||
__NR_exit = 93
|
||||
__NR_write = 64
|
||||
__NR_mmap64 = 222
|
||||
|
||||
__ARM_NR_cacheflush = 255 // FIXME
|
||||
// /usr/include/asm-generic/unistd.h
|
||||
__NR_exit = 0x5d // 93
|
||||
__NR_mmap = 0xde // 222
|
||||
__NR_mprotect = 0xe2 // 226
|
||||
__NR_munmap = 0xd7 // 215
|
||||
__NR_openat = 0x38 // 56
|
||||
__NR_write = 0x40 // 64
|
||||
|
||||
#ifndef DEBUG /*{*/
|
||||
#define DEBUG 0
|
||||
@@ -68,98 +87,157 @@ __ARM_NR_cacheflush = 255 // FIXME
|
||||
#endif //}
|
||||
|
||||
|
||||
//.long sz_pack2 // placed there by ::pack3()
|
||||
xfexp .req x28
|
||||
xPMASK .req x27
|
||||
xADRU .req x26
|
||||
wLENU .req w25
|
||||
wfd .req w24
|
||||
xauxv .req x23
|
||||
xelfa .req x22
|
||||
xADRM .req x21
|
||||
xADRX .req xADRM
|
||||
wLENM .req w20
|
||||
wLENX .req wLENM
|
||||
xLENM .req x20
|
||||
xLENX .req xLENM
|
||||
xFOLD .req x19
|
||||
wszuf .req w18
|
||||
xrelo .req x17
|
||||
wobinf .req w16
|
||||
|
||||
wmeth .req w4
|
||||
xmeth .req x4
|
||||
ldst .req x3
|
||||
dst .req x2
|
||||
lsrc .req w1
|
||||
src .req x0
|
||||
|
||||
#define call bl
|
||||
#define callr blr
|
||||
#define jr br
|
||||
|
||||
section ELFMAINX
|
||||
start_params:
|
||||
.long LENF // end_decompress - (start_params -4)
|
||||
.long CPR0 // cpr0 - (start_params -4)
|
||||
sz_pack2= .-4 // placed there by ::pack3()
|
||||
mflg:
|
||||
.long MFLG // MAP_{PRIVATE|ANONYMOUS} // QNX vs linux
|
||||
.xword ADRM // dst for map
|
||||
_start: .globl _start
|
||||
//// brk #0 // DEBUG
|
||||
/* Get some pages: enough
|
||||
to duplicate the entire compressed PT_LOAD, plus 1 page, located just after
|
||||
the brk() of the _un_compressed program. The address is pre-calculated
|
||||
calculated by PackLinuxElf64arm::addLinkerSymbols().
|
||||
*/
|
||||
|
||||
#if DEBUG /*{*/
|
||||
brk #0
|
||||
TRACE(#0)
|
||||
#endif /*}*/
|
||||
call main
|
||||
|
||||
adr x12,start_params -4 // &sz_pack2
|
||||
ldp w29,w10,[x12] // w29= sz_pack2; w10= LENF
|
||||
ldp w11,w3,[x12,#2*4] // w11= CPRO; w3= MFLG
|
||||
add x11,x11,x12 // cpr0
|
||||
ldr x0,[x12,#4*4] // ADRM
|
||||
add x10,x10,x12 // end_decompress
|
||||
ldr w4,[x11,# sz_unc]
|
||||
ldr w27,[x11,#o_binfo - cpr0] // O_BINFO
|
||||
sub x26,x12,w29,uxtw // &our_Elf64_Ehdr
|
||||
add x27,x27,x26 // &b_info for Elf64_Ehdr
|
||||
add w1,w29,w4 // sz_pack2 + cpr0.sz_unc
|
||||
add x1,x1,# PAGE_SIZE
|
||||
f_exp:
|
||||
f_decompress:
|
||||
|
||||
// It would be nice to choose a random address (x0= 0; x3 &~ MAP_FIXED).
|
||||
// But the kernel might put the region in the "hole" between compressed .text
|
||||
// and brk(0). The compressor could layout PT_LOAD[1] to cover that
|
||||
// entire region, but that might leave a mapping that covers a deliberate
|
||||
// hole between .text and .data. [Can be fixed with PROT_NONE for .p_flags ?]
|
||||
section ELFMAINXu
|
||||
mov w2,#PROT_READ | PROT_WRITE | PROT_EXEC
|
||||
orr w3,w3,#MAP_FIXED // MFLG: MAP_{PRIVATE|ANON}
|
||||
mov x5,#0 // offset= 0
|
||||
mov w4,#-1 // fd= -1; cater to *BSD for fd when MAP_ANON
|
||||
do_sys __NR_mmap64
|
||||
PUSH4(x0,x1,x2,x3) // ADRU, LENU, space for sz_unc, MFLG
|
||||
SP_MFLG= 3*8
|
||||
D_sz_unc=2*8 // stack displacement to sz_unc
|
||||
#if DEBUG /*{*/
|
||||
TRACE(#2)
|
||||
#endif /*}*/
|
||||
cmn x0,#4096
|
||||
bcs msg_SELinux
|
||||
mov x9,x26 // &our_Elf64_Ehdr
|
||||
copy_cl: // copy decompressor and folded code
|
||||
add x5,x0,#64; // FIXME(memcheck) dc zva,x5 // clear FOLLOWING 64-byte line
|
||||
ldp x1,x2,[x9],#2*8
|
||||
ldp x3,x4,[x9],#2*8
|
||||
stp x1,x2,[x0],#2*8
|
||||
stp x3,x4,[x0],#2*8
|
||||
section NRV_HEAD
|
||||
// empty
|
||||
section NRV_TAIL
|
||||
// empty
|
||||
|
||||
ldp x1,x2,[x9],#2*8
|
||||
ldp x3,x4,[x9],#2*8
|
||||
stp x1,x2,[x0],#2*8
|
||||
stp x3,x4,[x0],#2*8
|
||||
cmp x9,x10
|
||||
sub x5,x9,#64; // FIXME(memcheck) dc cvau,x5 // clean 64-byte line
|
||||
blo copy_cl // all source lines
|
||||
section NRV2E
|
||||
#include "arch/arm64/v8/nrv2e_d32.S"
|
||||
|
||||
ldr w1,[sp,#SP_MFLG]
|
||||
sub x4,x0,x9 // relocation amount
|
||||
str w1,[x0],#4 // MFLG at -4+ fold_begin
|
||||
adr x15,f_decompress
|
||||
mov lr,x0 // dst for unfolded code
|
||||
adr x28,f_decompress
|
||||
add x28,x28,x4 // relocated f_decompress
|
||||
add x27,x27,x4 // relocated &b_info
|
||||
section NRV2D
|
||||
#include "arch/arm64/v8/nrv2d_d32.S"
|
||||
|
||||
ldr w4,[x11,# b_method] // 5th param (whole word: endian issues!)
|
||||
D_stm1=0*8
|
||||
ldr w3,[x11,# sz_unc]
|
||||
add x0, x11,# sz_b_info
|
||||
ldr w1,[x11,# sz_cpr]
|
||||
mov x2,lr // dst
|
||||
str w3,[sp,#D_stm1 + D_sz_unc] // sz_unc; lzma needs for EOF
|
||||
add x3, sp,#D_stm1 + D_sz_unc // &sz_unc
|
||||
#if DEBUG /*{*/
|
||||
TRACE(#3)
|
||||
#endif /*}*/
|
||||
br x28 // decompress folded code, return to *lr
|
||||
section NRV2B
|
||||
#include "arch/arm64/v8/nrv2b_d32.S"
|
||||
|
||||
#if DEBUG /*{*/
|
||||
#include "arch/arm64/v8/lzma_d.S"
|
||||
|
||||
section ELFMAINY
|
||||
end_decompress: .globl end_decompress
|
||||
|
||||
msg_SELinux:
|
||||
mov w2,#L71 - L70 // length
|
||||
adr x1,L70 // message text
|
||||
mov w0,#2 // fd stderr
|
||||
do_sys __NR_write
|
||||
die:
|
||||
mov w0,#127
|
||||
do_sys __NR_exit
|
||||
L70:
|
||||
.asciz "PROT_EXEC|PROT_WRITE failed.\n"
|
||||
L71:
|
||||
/* IDENTSTR goes here */
|
||||
|
||||
section ELFMAINZ
|
||||
.balign 4
|
||||
mmapRW0:
|
||||
mov x5,#0 // offset
|
||||
mmapRW:
|
||||
mov w2,#PROT_WRITE|PROT_READ
|
||||
mmap:
|
||||
do_sys __NR_mmap
|
||||
ret
|
||||
|
||||
unfold:
|
||||
mov xFOLD,lr
|
||||
// Reserve enough space to decompress the folded code onto xFOLD
|
||||
ldr w0, [xfexp,#sz_pack2 - f_exp]
|
||||
add xelfa,xfexp,#sz_pack2 - f_exp
|
||||
sub xelfa,xelfa,x0 // &Elf64_Ehdr of stub
|
||||
ldr w0,[xFOLD,#sz_unc + LBINFO - LxFOLD] // sz_unc of fold
|
||||
sub x1,xFOLD,xelfa // offset(FOLD)
|
||||
mov w4,#-1 // fd
|
||||
mov wszuf,w0 // save sz_unc of fold
|
||||
mov w3,#MAP_PRIVATE|MAP_ANONYMOUS
|
||||
add x1,x1,x0; mov wLENU,w1 // length needed
|
||||
mov x0,#0 // kernel chooses addr
|
||||
call mmapRW0; mov xADRU,x0
|
||||
|
||||
// Duplicate the input data.
|
||||
ldr w8,[xFOLD,#sz_cpr + LBINFO - LxFOLD] // sz_cpr of fold
|
||||
sub x1,xFOLD,xelfa // offset(FOLD)
|
||||
mov w4,wfd // from file
|
||||
mov w3,#MAP_PRIVATE|MAP_FIXED
|
||||
add x1,x1,x8 // + sz_cpr of fold; x1 <= .st_size
|
||||
call mmapRW0
|
||||
sub xrelo,x0,xelfa // relocation amount
|
||||
mov x8,xfexp; add xfexp,xfexp,xrelo // use old f_exp; xfexp= new &f_exp
|
||||
|
||||
// Decompress from old folded code, overwriting new copy of folded code
|
||||
ldr wobinf,[xFOLD,# LOBINFO - LxFOLD] // O_BINFO
|
||||
add src,xFOLD,#sz_b_info + LBINFO - LxFOLD // old folded code
|
||||
add xFOLD,xFOLD,xrelo // dst for unfolding; use copied data
|
||||
add xLENM,xFOLD,wszuf,uxtw // + sz_unc = last of unfolded
|
||||
and xADRM,xfexp,xPMASK // base for PROT_EXEC
|
||||
sub xLENM,xLENM,xADRM // length for PROT_EXEC
|
||||
|
||||
// The new f_exp has PROT_WRITE, so use the old f_exp to decompress
|
||||
ldrb wmeth,[xFOLD,#b_method + LBINFO - LxFOLD]
|
||||
PUSH1(xmeth) // lzma uses for EOF
|
||||
mov ldst,sp // &slot on stack
|
||||
mov dst,xFOLD // dst for unfolding
|
||||
ldr lsrc,[xFOLD,#sz_cpr + LBINFO - LxFOLD]
|
||||
callr x8 // decompress it
|
||||
POP1(x8)
|
||||
|
||||
// Generate code to compute PAGE_MASK
|
||||
ldr x0,[xFOLD,#1*4] // 2nd instr
|
||||
rbit x1,xPMASK
|
||||
clz x1,x1 // # trailing 0's in xPMASK
|
||||
add x1,x1,#1
|
||||
lsl x1,x1,#2*5 // past two register numbers
|
||||
orr x0,x0,x1
|
||||
str x0,[xFOLD,#1*4] // modify 2nd instr: "add x1,x0,#1+ count"
|
||||
|
||||
// PROT_EXEC
|
||||
mov w2,#PROT_EXEC|PROT_READ
|
||||
mov w1,wLENM // length
|
||||
mov x0,xADRM // base
|
||||
do_sys __NR_mprotect
|
||||
|
||||
// Use the unfolded code
|
||||
ldr wLENX,[xfexp,#sz_pack2 - f_exp]
|
||||
add xADRX,xelfa,wobinf,uxtw // old compressed data
|
||||
add xADRX,xADRX,xrelo // new compressed data
|
||||
|
||||
add x0,xFOLD,#4*4 // jmp over get_page_mask()
|
||||
jr x0
|
||||
|
||||
#if DEBUG //{
|
||||
TRACE_BUFLEN=1024
|
||||
trace: // preserves condition code (thank you, CBNZ) [if write() does!]
|
||||
stp x0, x1,[sp,#-32*8]!
|
||||
@@ -251,49 +329,41 @@ L620:
|
||||
ret
|
||||
hex:
|
||||
.ascii "0123456789abcdef"
|
||||
#endif /*}*/
|
||||
#endif //}
|
||||
|
||||
f_decompress:
|
||||
#define LINUX_ARM_CACHEFLUSH 1
|
||||
proc_self_exe:
|
||||
.asciz "/proc/self/exe"; .balign 4
|
||||
|
||||
section NRV_HEAD
|
||||
// empty
|
||||
section NRV_TAIL
|
||||
// empty
|
||||
zfind:
|
||||
ldr x1,[x0],#NBPW; cbnz x1,zfind
|
||||
ret
|
||||
|
||||
section NRV2E
|
||||
#include "arch/arm64/v8/nrv2e_d32.S"
|
||||
main:
|
||||
mov xfexp,lr
|
||||
mov x0,sp; call zfind // x0= &envp
|
||||
call zfind; mov xauxv,x0 // &Elf64_auxv
|
||||
|
||||
section NRV2D
|
||||
#include "arch/arm64/v8/nrv2d_d32.S"
|
||||
// set xPMASK by finding actual page size in Elf64_auxv
|
||||
1:
|
||||
ldp x1,x2,[x0],#8
|
||||
cmp w1,#AT_PAGESZ; beq 2f
|
||||
cbnz w1,1b // AT_NULL
|
||||
mov x2,#PAGE_SIZE // default
|
||||
2:
|
||||
neg xPMASK,x2 // save for folded code
|
||||
|
||||
section NRV2B
|
||||
#include "arch/arm64/v8/nrv2b_d32.S"
|
||||
|
||||
#include "arch/arm64/v8/lzma_d.S"
|
||||
|
||||
section ELFMAINY
|
||||
end_decompress: .globl end_decompress
|
||||
|
||||
msg_SELinux:
|
||||
mov w2,#L71 - L70 // length
|
||||
adr x1,L70 // message text
|
||||
mov w0,#2 // fd stderr
|
||||
do_sys __NR_write
|
||||
die:
|
||||
mov w0,#127
|
||||
do_sys __NR_exit
|
||||
L70:
|
||||
.asciz "PROT_EXEC|PROT_WRITE failed.\n"
|
||||
L71:
|
||||
/* IDENTSTR goes here */
|
||||
|
||||
section ELFMAINZ
|
||||
o_binfo:
|
||||
.word O_BINFO
|
||||
cpr0: .globl cpr0
|
||||
/* { b_info={sz_unc, sz_cpr, {4 char}}, folded_loader...} */
|
||||
// Open /proc/self/exe
|
||||
mov w0,#AT_FDCWD
|
||||
adr x1,proc_self_exe
|
||||
mov w2,O_RDONLY
|
||||
do_sys __NR_openat; mov wfd,w0
|
||||
|
||||
call unfold
|
||||
LxFOLD:
|
||||
LOBINFO:
|
||||
.int O_BINFO
|
||||
LBINFO:
|
||||
// { b_info={sz_unc, sz_cpr, {4 char}}, folded_loader...}
|
||||
/*
|
||||
vi:ts=8:et:nowrap
|
||||
*/
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
// <jreiser@users.sourceforge.net>
|
||||
//
|
||||
|
||||
NBPW= 8
|
||||
#define ARM_OLDABI 1
|
||||
#include "arch/arm64/v8/macros.S"
|
||||
|
||||
@@ -38,6 +39,7 @@ sz_b_info = 12
|
||||
sz_unc= 0
|
||||
sz_cpr= 4
|
||||
b_method= 8
|
||||
sz_auxv= 2*NBPW
|
||||
|
||||
MAP_PRIVATE= 0x02
|
||||
MAP_FIXED= 0x10
|
||||
@@ -62,62 +64,72 @@ PATH_MAX= 4096
|
||||
#define OVERHEAD 2048
|
||||
#define MAX_ELF_HDR 512
|
||||
|
||||
get_page_size:
|
||||
mov x0,#~0 // all 1's; -1
|
||||
add x1,x0,#0 // constant is modified to (1+ count)
|
||||
lsl x0,x0,x1 // generate the mask
|
||||
ret
|
||||
|
||||
fold_begin:
|
||||
//// brk #0 // DEBUG
|
||||
/* In:
|
||||
x26= &Elf64_Ehdr
|
||||
x27= &b_info of first compressed block (after move)
|
||||
x28= f_decompress
|
||||
w29= total size of compressed data
|
||||
sp/ ADRU,LENU,sz_unc,MFLG, argc,argv...
|
||||
*/
|
||||
POP4(x3,x4,x5,x8) // x3= ADRU; x4= LENU; x5= sz_unc; x8= MFLG
|
||||
|
||||
// In: sp/ argc,argv,...
|
||||
xfexp .req x28
|
||||
xPMASK .req x27
|
||||
xADRU .req x26
|
||||
wLENU .req w25
|
||||
wfd .req w24
|
||||
xauxv .req x23
|
||||
xelfa .req x22
|
||||
xADRM .req x21
|
||||
xADRX .req xADRM
|
||||
wLENM .req w20
|
||||
wLENX .req wLENM
|
||||
xLENM .req x20
|
||||
xLENX .req xLENM
|
||||
xFOLD .req x19 // unused
|
||||
xauxe .req xFOLD // past new auxv
|
||||
xrelo .req x17
|
||||
wobinf .req w16
|
||||
|
||||
ldr x7,[sp,#0] // argc
|
||||
mov x0,sp // current stack pointer
|
||||
|
||||
add x1,sp,#2*8 // skip argc and terminator of argv
|
||||
add x1,x1,x7,lsl #3 // skip argv
|
||||
.L10: // skip env
|
||||
ldr x2,[x1],#8
|
||||
cbnz x2,.L10
|
||||
mov x1,xauxv
|
||||
.L20: // skip auxv
|
||||
ldr x2,[x1],#2*8
|
||||
ldr x2,[x1],#2*NBPW
|
||||
cbnz x2,.L20 // AT_NULL
|
||||
|
||||
sub x0,x1,#PATH_MAX // buffer for readlink
|
||||
sub x6,x0,#4 // space for copy of space3eq
|
||||
sub x1,x1,x6 // amount needed for argc,argv,env,auxv
|
||||
sub x0,x6,x1 // space for argc,argv,env,auxv
|
||||
sub x0,x0,#8 // room for added env ptr
|
||||
sub x0,x0,#NBPW // room for added env ptr
|
||||
and x0,x0,#~0<<4 // sp must be 16-byte aligned
|
||||
add x1,sp,#8 // old_argv; avoid 0==argc impostor for terminator of argv
|
||||
add x1,sp,#NBPW // old_argv; avoid 0==argc impostor for terminator of argv
|
||||
mov sp,x0 // new_argc
|
||||
PUSH3(x3,x4,x5) // ADRU, LENU, sz_unc
|
||||
SP_sz_unc= 2*8
|
||||
SP_argc= 4*8 // remember the hole from PUSH3
|
||||
|
||||
str x7,[x0],#8 // argc
|
||||
str x7,[x0],#NBPW // argc
|
||||
|
||||
.Larg: // copy argv
|
||||
ldr x2,[x1],#8
|
||||
str x2,[x0],#8
|
||||
ldr x2,[x1],#NBPW
|
||||
str x2,[x0],#NBPW
|
||||
cbnz x2,.Larg
|
||||
|
||||
.Lenv: // copy env
|
||||
ldr x2,[x1],#8
|
||||
str x2,[x0],#8
|
||||
ldr x2,[x1],#NBPW
|
||||
str x2,[x0],#NBPW
|
||||
cbnz x2,.Lenv
|
||||
|
||||
sub x4,x0,#8 // added env ptr goes here
|
||||
str xzr,[x0],#8 // terminator after added ptr
|
||||
sub x4,x0,#NBPW // added env ptr goes here
|
||||
str xzr,[x0],#NBPW // terminator after added ptr
|
||||
mov x7,x0 // new &Elf64_auxv_t
|
||||
|
||||
mov xauxv,x0 // new auxv
|
||||
.Laux: // copy auxv
|
||||
ldp x2,x3,[x1],#2*8 // .a_type, .a_val
|
||||
stp x2,x3,[x0],#2*8
|
||||
ldp x2,x3,[x1],#2*NBPW // .a_type, .a_val
|
||||
stp x2,x3,[x0],#2*NBPW
|
||||
cbnz x2,.Laux // AT_NULL
|
||||
|
||||
str x0,[sp,#SP_sz_unc] // clobber sz_unc with 1+ &Elf64_auxv_t[AT_NULL@.a_type]
|
||||
mov xauxe,x0 // last of new auxv
|
||||
|
||||
mov x1,x6
|
||||
str x1,[x4] // new env ptr
|
||||
@@ -132,48 +144,44 @@ SP_argc= 4*8 // remember the hole from PUSH3
|
||||
0:
|
||||
|
||||
/* Construct arglist for upx_main */
|
||||
mov x6,x26 // Elf64_Ehdr (reloc if ET_DYN and not pre-link)
|
||||
mov x7,xPMASK
|
||||
mov x6,xelfa // Elf64_Ehdr (reloc if ET_DYN and not pre-link)
|
||||
sub sp,sp,#MAX_ELF_HDR + OVERHEAD // alloca
|
||||
adr x5,f_unfilter
|
||||
mov x4,x28 // f_decompress
|
||||
mov x3,x7 // new &Elf64_auxv_t
|
||||
mov x4,xfexp // &f_decompress
|
||||
mov x3,xauxv // new &Elf64_auxv_t
|
||||
mov x2,sp // ehdr
|
||||
mov w1,w29 // total size of compressed data
|
||||
mov x0,x27 // &b_info
|
||||
mov w1,wLENX // total size of compressed data
|
||||
mov x0,xADRX // &b_info
|
||||
bl upx_main
|
||||
add sp,sp,#MAX_ELF_HDR + OVERHEAD // un-alloca
|
||||
str x0,[sp,#3*8] // entry address
|
||||
mov xfexp,x0 // entry address
|
||||
|
||||
// Map 1 page of /proc/self/exe so that munmap does not remove all references
|
||||
adr x0,proc_self_exe
|
||||
mov w1,#O_RDONLY
|
||||
bl open
|
||||
mov w15,w0 // fd
|
||||
|
||||
mov x5,xzr // offset
|
||||
mov w4,w0 // fd
|
||||
mov x5,#0 // offset
|
||||
mov w4,wfd // fd
|
||||
mov w3,#MAP_PRIVATE
|
||||
mov w2,#PROT_READ
|
||||
mov x1,#PAGE_SIZE
|
||||
mov x0,xzr // addr
|
||||
mov x0,#0 // addr
|
||||
bl mmap
|
||||
|
||||
mov w0,w15 // fd
|
||||
mov w0,wfd // fd
|
||||
bl close
|
||||
|
||||
POP4(x0,x1,x2,lr) // x0= ADRU; x1= LENU; x2= 1+ &Elf64_auxv_t[AT_NULL@.atype]; lr= entry
|
||||
|
||||
mov lr,xfexp // entry
|
||||
mov x0,xADRU
|
||||
mov w1,wLENU
|
||||
ldr x2,[xauxe,#NBPW - sz_auxv] // Elf64_auxv_t[AT_NULL@.a_type].a_val
|
||||
mov w8,#__NR_munmap
|
||||
#if DEBUG /*{*/
|
||||
ldr x4,[x2,#8 -2*8] // Elf64_auxv_t[AT_NULL@.a_type].a_val
|
||||
ldr w5,[x4,#0] // 1st instr
|
||||
ldr w6,[x4,#4] // 2nd instr
|
||||
ldr w3,[x4,#0] // 1st instr
|
||||
ldr w4,[x4,#4] // 2nd instr
|
||||
#define TRACE_REGS r0-r12,r14,r15
|
||||
stmdb sp!,{TRACE_REGS}; mov r0,#4; bl trace
|
||||
#endif /*}*/
|
||||
|
||||
ldr x3,[x2,#8 -2*8] // Elf64_auxv_t[AT_NULL@.a_type].a_val
|
||||
mov w8,#__NR_munmap
|
||||
br x3
|
||||
br x2 // goto escape hatch
|
||||
|
||||
space3eq:
|
||||
.ascii " ="
|
||||
@@ -215,7 +223,7 @@ unfret:
|
||||
#if DEBUG /*{*/
|
||||
TRACE_BUFLEN=512
|
||||
trace:
|
||||
str lr,[sp,#(-1+ 15)*4] // return pc; [remember: sp is not stored]
|
||||
str lr,[sp,#(-1+ 15)*NBPW] // return pc; [remember: sp is not stored]
|
||||
mov r4,sp // &saved_r0
|
||||
sub sp,sp,#TRACE_BUFLEN
|
||||
mov r2,sp // output string
|
||||
@@ -223,15 +231,15 @@ trace:
|
||||
mov r1,#'\n'; bl trace_hex // In: r0 as label
|
||||
mov r1,#'>'; strb r1,[r2],#1
|
||||
|
||||
mov r5,#3 // rows to print
|
||||
mov r5,#6 // rows to print
|
||||
L600: // each row
|
||||
sub r0,r4,#TRACE_BUFLEN
|
||||
sub r0,r0,sp
|
||||
mov r0,r0,lsr #2; mov r1,#'\n'; bl trace_hex // which block of 8
|
||||
|
||||
mov r6,#8 // words per row
|
||||
mov r6,#4 // words per row
|
||||
L610: // each word
|
||||
ldr r0,[r4],#4; mov r1,#' '; bl trace_hex // next word
|
||||
ldr r0,[r4],#NBPW; mov r1,#' '; bl trace_hex // next word
|
||||
subs r6,r6,#1; bgt L610
|
||||
|
||||
subs r5,r5,#1; bgt L600
|
||||
@@ -251,7 +259,7 @@ L610: // each word
|
||||
|
||||
trace_hex: // In: r0=val, r1=punctuation before, r2=ptr; Uses: r3, ip
|
||||
strb r1,[r2],#1 // punctuation
|
||||
mov r3,#4*(8 -1) // shift count
|
||||
mov r3,#4*(2*NBPW -1) // shift count
|
||||
adr ip,hex
|
||||
L620:
|
||||
mov r1,r0,lsr r3
|
||||
@@ -270,24 +278,20 @@ hex:
|
||||
|
||||
__NR_SYSCALL_BASE= 0
|
||||
|
||||
__NR_exit = 0x5e + __NR_SYSCALL_BASE // 94 exit_group
|
||||
__NR_read = 0x3f + __NR_SYSCALL_BASE // 63
|
||||
__NR_write = 0x40 + __NR_SYSCALL_BASE // 64
|
||||
__NR_open = 0x38 + __NR_SYSCALL_BASE // 56
|
||||
__NR_close = 0x39 + __NR_SYSCALL_BASE // 57
|
||||
__NR_unlink= 0x23 + __NR_SYSCALL_BASE // 35
|
||||
__NR_getpid= 0xad + __NR_SYSCALL_BASE // 172
|
||||
__NR_brk = 0xd6 + __NR_SYSCALL_BASE // 214
|
||||
__NR_readlink=0x4e+ __NR_SYSCALL_BASE // 78
|
||||
|
||||
__NR_exit = 0x5d + __NR_SYSCALL_BASE // 93
|
||||
__NR_read = 0x3f + __NR_SYSCALL_BASE // 63
|
||||
__NR_write = 0x40 + __NR_SYSCALL_BASE // 64
|
||||
__NR_openat = 0x38 + __NR_SYSCALL_BASE // 56
|
||||
__NR_close = 0x39 + __NR_SYSCALL_BASE // 57
|
||||
__NR_unlinkat = 0x23 + __NR_SYSCALL_BASE // 35
|
||||
__NR_getpid = 0xad + __NR_SYSCALL_BASE // 172
|
||||
__NR_brk = 0xd6 + __NR_SYSCALL_BASE // 214
|
||||
__NR_readlink = 0x4e + __NR_SYSCALL_BASE // 78
|
||||
|
||||
__NR_mmap = 0xde + __NR_SYSCALL_BASE // 222
|
||||
__NR_mprotect = 0xe2 + __NR_SYSCALL_BASE // 226
|
||||
__NR_munmap = 0xd7 + __NR_SYSCALL_BASE // 215
|
||||
|
||||
__ARM_NR_BASE = 0x0f0000 + __NR_SYSCALL_BASE
|
||||
__ARM_NR_cacheflush = 2 + __ARM_NR_BASE
|
||||
|
||||
.globl my_bkpt
|
||||
my_bkpt:
|
||||
brk #0
|
||||
@@ -340,8 +344,10 @@ mmap:
|
||||
|
||||
.globl unlink
|
||||
unlink:
|
||||
mov x1,#0 // flags as last arg
|
||||
mov w8,#__NR_unlink
|
||||
mov x2,#0 // flags as last arg
|
||||
mov x1,x0 // path
|
||||
mov w0,#AT_FDCWD
|
||||
mov w8,#__NR_unlinkat
|
||||
b svc_AT
|
||||
|
||||
.globl readlink
|
||||
@@ -351,7 +357,7 @@ readlink:
|
||||
|
||||
.globl open
|
||||
open:
|
||||
mov w8,#__NR_open
|
||||
mov w8,#__NR_openat
|
||||
svc_AT:
|
||||
//mov x4,x3
|
||||
mov x3,x2 // mode
|
||||
|
||||
@@ -1,576 +1 @@
|
||||
/* arm64-linux.elf-main.c -- stub loader for Linux 64-bit ELF executable
|
||||
|
||||
This file is part of the UPX executable compressor.
|
||||
|
||||
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2017 Laszlo Molnar
|
||||
Copyright (C) 2000-2017 John F. Reiser
|
||||
All Rights Reserved.
|
||||
|
||||
UPX and the UCL library are free software; you can redistribute them
|
||||
and/or modify them under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; see the file COPYING.
|
||||
If not, write to the Free Software Foundation, Inc.,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
Markus F.X.J. Oberhumer Laszlo Molnar
|
||||
<markus@oberhumer.com> <ezerotven+github@gmail.com>
|
||||
|
||||
John F. Reiser
|
||||
<jreiser@users.sourceforge.net>
|
||||
*/
|
||||
|
||||
|
||||
#include "include/linux.h"
|
||||
|
||||
#ifndef DEBUG //{
|
||||
#define DEBUG 0
|
||||
#endif //}
|
||||
|
||||
#if !DEBUG //{
|
||||
#define DPRINTF(fmt, args...) /*empty*/
|
||||
#else //}{
|
||||
// DPRINTF is defined as an expression using "({ ... })"
|
||||
// so that DPRINTF can be invoked inside an expression,
|
||||
// and then followed by a comma to ignore the return value.
|
||||
// The only complication is that percent and backslash
|
||||
// must be doubled in the format string, because the format
|
||||
// string is processd twice: once at compile-time by 'asm'
|
||||
// to produce the assembled value, and once at runtime to use it.
|
||||
#if defined(__powerpc__) //{
|
||||
#define DPRINTF(fmt, args...) ({ \
|
||||
char const *r_fmt; \
|
||||
asm("bl 0f; .string \"" fmt "\"; .balign 4; 0: mflr %0" \
|
||||
/*out*/ : "=r"(r_fmt) \
|
||||
/* in*/ : \
|
||||
/*und*/ : "lr"); \
|
||||
dprintf(r_fmt, args); \
|
||||
})
|
||||
#elif defined(__x86_64) //}{
|
||||
#define DPRINTF(fmt, args...) ({ \
|
||||
char const *r_fmt; \
|
||||
asm("call 0f; .asciz \"" fmt "\"; 0: pop %0" \
|
||||
/*out*/ : "=r"(r_fmt) ); \
|
||||
dprintf(r_fmt, args); \
|
||||
})
|
||||
#elif defined(__AARCH64EL__) //}{
|
||||
#define DPRINTF(fmt, args...) ({ \
|
||||
char const *r_fmt; \
|
||||
asm("bl 0f; .string \"" fmt "\"; .balign 4; 0: mov %0,x30" \
|
||||
/*out*/ : "=r"(r_fmt) \
|
||||
/* in*/ : \
|
||||
/*und*/ : "x30"); \
|
||||
dprintf(r_fmt, args); \
|
||||
})
|
||||
#endif //}
|
||||
|
||||
static int dprintf(char const *fmt, ...); // forward
|
||||
#endif /*}*/
|
||||
|
||||
/*************************************************************************
|
||||
// configuration section
|
||||
**************************************************************************/
|
||||
|
||||
// In order to make it much easier to move this code at runtime and execute
|
||||
// it at an address different from it load address: there must be no
|
||||
// static data, and no string constants.
|
||||
|
||||
#define MAX_ELF_HDR 1024 // Elf64_Ehdr + n*Elf64_Phdr must fit in this
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// "file" util
|
||||
**************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
size_t size; // must be first to match size[0] uncompressed size
|
||||
char *buf;
|
||||
} Extent;
|
||||
|
||||
|
||||
static void
|
||||
xread(Extent *x, char *buf, size_t count)
|
||||
{
|
||||
char *p=x->buf, *q=buf;
|
||||
size_t j;
|
||||
if (x->size < count) {
|
||||
exit(127);
|
||||
}
|
||||
for (j = count; 0!=j--; ++p, ++q) {
|
||||
*q = *p;
|
||||
}
|
||||
x->buf += count;
|
||||
x->size -= count;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// util
|
||||
**************************************************************************/
|
||||
|
||||
#if 1 //{ save space
|
||||
#define ERR_LAB error: exit(127);
|
||||
#define err_exit(a) goto error
|
||||
#else //}{ save debugging time
|
||||
#define ERR_LAB /*empty*/
|
||||
static void
|
||||
err_exit(int a)
|
||||
{
|
||||
(void)a; // debugging convenience
|
||||
exit(127);
|
||||
}
|
||||
#endif //}
|
||||
|
||||
/*************************************************************************
|
||||
// UPX & NRV stuff
|
||||
**************************************************************************/
|
||||
|
||||
typedef void f_unfilter(
|
||||
nrv_byte *, // also addvalue
|
||||
nrv_uint,
|
||||
unsigned cto8, // junk in high 24 bits
|
||||
unsigned ftid
|
||||
);
|
||||
typedef int f_expand(
|
||||
const nrv_byte *, nrv_uint,
|
||||
nrv_byte *, nrv_uint *, unsigned );
|
||||
|
||||
static void
|
||||
unpackExtent(
|
||||
Extent *const xi, // input
|
||||
Extent *const xo, // output
|
||||
f_expand *const f_decompress,
|
||||
f_unfilter *f_unf
|
||||
)
|
||||
{
|
||||
while (xo->size) {
|
||||
struct b_info h;
|
||||
// Note: if h.sz_unc == h.sz_cpr then the block was not
|
||||
// compressible and is stored in its uncompressed form.
|
||||
|
||||
// Read and check block sizes.
|
||||
xread(xi, (char *)&h, sizeof(h));
|
||||
if (h.sz_unc == 0) { // uncompressed size 0 -> EOF
|
||||
if (h.sz_cpr != UPX_MAGIC_LE32) // h.sz_cpr must be h->magic
|
||||
err_exit(2);
|
||||
if (xi->size != 0) // all bytes must be written
|
||||
err_exit(3);
|
||||
break;
|
||||
}
|
||||
if (h.sz_cpr <= 0) {
|
||||
err_exit(4);
|
||||
ERR_LAB
|
||||
}
|
||||
if (h.sz_cpr > h.sz_unc
|
||||
|| h.sz_unc > xo->size ) {
|
||||
err_exit(5);
|
||||
}
|
||||
// Now we have:
|
||||
// assert(h.sz_cpr <= h.sz_unc);
|
||||
// assert(h.sz_unc > 0 && h.sz_unc <= blocksize);
|
||||
// assert(h.sz_cpr > 0 && h.sz_cpr <= blocksize);
|
||||
|
||||
if (h.sz_cpr < h.sz_unc) { // Decompress block
|
||||
nrv_uint out_len = h.sz_unc; // EOF for lzma
|
||||
int const j = (*f_decompress)((unsigned char *)xi->buf, h.sz_cpr,
|
||||
(unsigned char *)xo->buf, &out_len, h.b_method );
|
||||
if (j != 0 || out_len != (nrv_uint)h.sz_unc)
|
||||
err_exit(7);
|
||||
// Skip Ehdr+Phdrs: separate 1st block, not filtered
|
||||
if (h.b_ftid!=0 && f_unf // have filter
|
||||
&& ((512 < out_len) // this block is longer than Ehdr+Phdrs
|
||||
|| (xo->size==(unsigned)h.sz_unc) ) // block is last in Extent
|
||||
) {
|
||||
(*f_unf)((unsigned char *)xo->buf, out_len, h.b_cto8, h.b_ftid);
|
||||
}
|
||||
xi->buf += h.sz_cpr;
|
||||
xi->size -= h.sz_cpr;
|
||||
}
|
||||
else { // copy literal block
|
||||
xread(xi, xo->buf, h.sz_cpr);
|
||||
}
|
||||
xo->buf += h.sz_unc;
|
||||
xo->size -= h.sz_unc;
|
||||
}
|
||||
}
|
||||
|
||||
//DEBUG_STRCON(STR_make_hatch, "make_hatch %%p %%x\\n");
|
||||
|
||||
static void *
|
||||
make_hatch_arm64(
|
||||
Elf64_Phdr const *const phdr,
|
||||
uint64_t const reloc
|
||||
)
|
||||
{
|
||||
unsigned *hatch = 0;
|
||||
//DPRINTF((STR_make_hatch(),phdr,reloc));
|
||||
if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) {
|
||||
// The format of the 'if' is
|
||||
// if ( ( (hatch = loc1), test_loc1 )
|
||||
// || ( (hatch = loc2), test_loc2 ) ) {
|
||||
// action
|
||||
// }
|
||||
// which uses the comma to save bytes when test_locj involves locj
|
||||
// and the action is the same when either test succeeds.
|
||||
|
||||
// Try page fragmentation just beyond .text .
|
||||
if ( ( (hatch = (void *)(~3ul & (3+ phdr->p_memsz + phdr->p_vaddr + reloc))),
|
||||
( phdr->p_memsz==phdr->p_filesz // don't pollute potential .bss
|
||||
&& (2*4)<=(~PAGE_MASK & -(uint64_t)hatch) ) ) // space left on page
|
||||
) {
|
||||
hatch[0]= 0xd4000001; // svc #0
|
||||
hatch[1]= 0xd65f03c0; // ret (jmp *lr)
|
||||
}
|
||||
else {
|
||||
hatch = 0;
|
||||
}
|
||||
}
|
||||
return hatch;
|
||||
}
|
||||
|
||||
#if 1 /*{*/
|
||||
static void
|
||||
upx_bzero(char *p, size_t len)
|
||||
{
|
||||
if (len) do {
|
||||
*p++= 0;
|
||||
} while (--len);
|
||||
}
|
||||
#define bzero upx_bzero
|
||||
#else
|
||||
#define bzero(a,b) __builtin_memset(a,0,b)
|
||||
#endif /*}*/
|
||||
|
||||
static void
|
||||
auxv_up(Elf64_auxv_t *av, unsigned const type, uint64_t const value)
|
||||
{
|
||||
if (!av)
|
||||
return;
|
||||
DPRINTF("\\nauxv_up %%d %%p\\n", type, value);
|
||||
for (;; ++av) {
|
||||
DPRINTF(" %%d %%p\\n", av->a_type, av->a_un.a_val);
|
||||
if (av->a_type==type || (av->a_type==AT_IGNORE && type!=AT_NULL)) {
|
||||
av->a_type = type;
|
||||
av->a_un.a_val = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The PF_* and PROT_* bits are {1,2,4}; the conversion table fits in 32 bits.
|
||||
#define REP8(x) \
|
||||
((x)|((x)<<4)|((x)<<8)|((x)<<12)|((x)<<16)|((x)<<20)|((x)<<24)|((x)<<28))
|
||||
#define EXP8(y) \
|
||||
((1&(y)) ? 0xf0f0f0f0 : (2&(y)) ? 0xff00ff00 : (4&(y)) ? 0xffff0000 : 0)
|
||||
#define PF_TO_PROT(pf) \
|
||||
((PROT_READ|PROT_WRITE|PROT_EXEC) & ( \
|
||||
( (REP8(PROT_EXEC ) & EXP8(PF_X)) \
|
||||
|(REP8(PROT_READ ) & EXP8(PF_R)) \
|
||||
|(REP8(PROT_WRITE) & EXP8(PF_W)) \
|
||||
) >> ((pf & (PF_R|PF_W|PF_X))<<2) ))
|
||||
|
||||
|
||||
// Find convex hull of PT_LOAD (the minimal interval which covers all PT_LOAD),
|
||||
// and mmap that much, to be sure that a kernel using exec-shield-randomize
|
||||
// won't place the first piece in a way that leaves no room for the rest.
|
||||
static unsigned long // returns relocation constant
|
||||
xfind_pages(unsigned mflags, Elf64_Phdr const *phdr, int phnum,
|
||||
char **const p_brk
|
||||
)
|
||||
{
|
||||
size_t lo= ~0, hi= 0, szlo= 0;
|
||||
char *addr;
|
||||
mflags += MAP_PRIVATE | MAP_ANONYMOUS; // '+' can optimize better than '|'
|
||||
for (; --phnum>=0; ++phdr) if (PT_LOAD==phdr->p_type) {
|
||||
if (phdr->p_vaddr < lo) {
|
||||
lo = phdr->p_vaddr;
|
||||
szlo = phdr->p_filesz;
|
||||
}
|
||||
if (hi < (phdr->p_memsz + phdr->p_vaddr)) {
|
||||
hi = phdr->p_memsz + phdr->p_vaddr;
|
||||
}
|
||||
}
|
||||
szlo += ~PAGE_MASK & lo; // page fragment on lo edge
|
||||
lo -= ~PAGE_MASK & lo; // round down to page boundary
|
||||
hi = PAGE_MASK & (hi - lo - PAGE_MASK -1); // page length
|
||||
szlo = PAGE_MASK & (szlo - PAGE_MASK -1); // page length
|
||||
addr = mmap((void *)lo, hi, PROT_NONE, mflags, -1, 0);
|
||||
*p_brk = hi + addr; // the logical value of brk(0)
|
||||
//mprotect(szlo + addr, hi - szlo, PROT_NONE); // no access, but keep the frames!
|
||||
return (unsigned long)addr - lo;
|
||||
}
|
||||
|
||||
static Elf64_Addr // entry address
|
||||
do_xmap(
|
||||
Elf64_Ehdr const *const ehdr,
|
||||
Extent *const xi,
|
||||
int const fdi,
|
||||
Elf64_auxv_t *const av,
|
||||
f_expand *const f_decompress,
|
||||
f_unfilter *const f_unf,
|
||||
Elf64_Addr *p_reloc
|
||||
)
|
||||
{
|
||||
Elf64_Phdr const *phdr = (Elf64_Phdr const *) (ehdr->e_phoff +
|
||||
(char const *)ehdr);
|
||||
char *v_brk;
|
||||
unsigned long const reloc = xfind_pages(
|
||||
((ET_DYN!=ehdr->e_type) ? MAP_FIXED : 0), phdr, ehdr->e_phnum, &v_brk);
|
||||
DPRINTF("do_xmap reloc=%%p", reloc);
|
||||
int j;
|
||||
for (j=0; j < ehdr->e_phnum; ++phdr, ++j)
|
||||
if (xi && PT_PHDR==phdr->p_type) {
|
||||
auxv_up(av, AT_PHDR, phdr->p_vaddr + reloc);
|
||||
} else
|
||||
if (PT_LOAD==phdr->p_type) {
|
||||
unsigned const prot = PF_TO_PROT(phdr->p_flags);
|
||||
Extent xo;
|
||||
size_t mlen = xo.size = phdr->p_filesz;
|
||||
char *addr = xo.buf = reloc + (char *)phdr->p_vaddr;
|
||||
char *haddr = phdr->p_memsz + addr;
|
||||
size_t frag = (long)addr &~ PAGE_MASK;
|
||||
mlen += frag;
|
||||
addr -= frag;
|
||||
|
||||
if (addr != mmap(addr, mlen, prot | (xi ? PROT_WRITE : 0),
|
||||
MAP_FIXED | MAP_PRIVATE | (xi ? MAP_ANONYMOUS : 0),
|
||||
(xi ? -1 : fdi), phdr->p_offset - frag) ) {
|
||||
err_exit(8);
|
||||
}
|
||||
if (xi) {
|
||||
unpackExtent(xi, &xo, f_decompress, f_unf);
|
||||
}
|
||||
// Linux does not fixup the low end, so neither do we.
|
||||
//if (PROT_WRITE & prot) {
|
||||
// bzero(addr, frag); // fragment at lo end
|
||||
//}
|
||||
frag = (-mlen) &~ PAGE_MASK; // distance to next page boundary
|
||||
if (PROT_WRITE & prot) { // note: read-only .bss not supported here
|
||||
bzero(mlen+addr, frag); // fragment at hi end
|
||||
}
|
||||
if (xi) {
|
||||
void *const hatch = make_hatch_arm64(phdr, reloc);
|
||||
if (0!=hatch) {
|
||||
auxv_up(av, AT_NULL, (uint64_t)hatch);
|
||||
}
|
||||
if (0!=mprotect(addr, mlen, prot)) {
|
||||
err_exit(10);
|
||||
ERR_LAB
|
||||
}
|
||||
}
|
||||
addr += mlen + frag; /* page boundary on hi end */
|
||||
if (addr < haddr) { // need pages for .bss
|
||||
if (addr != mmap(addr, haddr - addr, prot,
|
||||
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 ) ) {
|
||||
err_exit(9);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (xi) { // 1st call (main); also have (0!=av) here
|
||||
if (ET_DYN!=ehdr->e_type) {
|
||||
// Needed only if compressed shell script invokes compressed shell.
|
||||
// brk(v_brk); // SIGSEGV when is_big [unmaps ourself!]
|
||||
}
|
||||
}
|
||||
if (0!=p_reloc) {
|
||||
*p_reloc = reloc;
|
||||
}
|
||||
return ehdr->e_entry + reloc;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// upx_main - called by our entry code
|
||||
//
|
||||
// This function is optimized for size.
|
||||
**************************************************************************/
|
||||
|
||||
void *
|
||||
upx_main( // returns entry address
|
||||
/*x0*/ struct b_info const *const bi, // 1st block header
|
||||
/*x1*/ size_t const sz_compressed, // total length
|
||||
/*x2*/ Elf64_Ehdr *const ehdr, // temp char[sz_ehdr] for decompressing
|
||||
/*x3*/ Elf64_auxv_t *const av,
|
||||
/*x4*/ f_expand *const f_decompress,
|
||||
/*x5*/ f_unfilter *const f_unf,
|
||||
/*x6*/ Elf64_Addr reloc
|
||||
)
|
||||
{
|
||||
Extent xo, xi1, xi2;
|
||||
xo.buf = (char *)ehdr;
|
||||
xo.size = bi->sz_unc;
|
||||
xi2.buf = CONST_CAST(char *, bi); xi2.size = sz_compressed;
|
||||
xi1.buf = CONST_CAST(char *, bi); xi1.size = sz_compressed;
|
||||
|
||||
// ehdr = Uncompress Ehdr and Phdrs
|
||||
unpackExtent(&xi2, &xo, f_decompress, 0); // never filtered?
|
||||
|
||||
// AT_PHDR.a_un.a_val is set again by do_xmap if PT_PHDR is present.
|
||||
auxv_up(av, AT_PHDR , reloc + ehdr->e_phoff);
|
||||
auxv_up(av, AT_PHNUM, ehdr->e_phnum);
|
||||
//auxv_up(av, AT_PHENT , ehdr->e_phentsize); /* this can never change */
|
||||
//auxv_up(av, AT_PAGESZ, PAGE_SIZE); /* ld-linux.so.2 does not need this */
|
||||
|
||||
DPRINTF("upx_main1 .e_entry=%%p reloc=%%p", ehdr->e_entry, reloc);
|
||||
Elf64_Phdr *phdr = (Elf64_Phdr *)(1+ ehdr);
|
||||
unsigned const orig_e_type = ehdr->e_type;
|
||||
if (ET_DYN==orig_e_type /*&& phdr->p_vaddr==0*/) { // -pie /*FIXME: and not pre-linked*/
|
||||
// Unpacked must start at same place as packed, so that brk(0) works.
|
||||
ehdr->e_type = ET_EXEC;
|
||||
auxv_up(av, AT_ENTRY, ehdr->e_entry += reloc);
|
||||
unsigned j;
|
||||
for (j=0; j < ehdr->e_phnum; ++phdr, ++j) {
|
||||
phdr->p_vaddr += reloc;
|
||||
phdr->p_paddr += reloc;
|
||||
}
|
||||
}
|
||||
|
||||
// De-compress Ehdr again into actual position, then de-compress the rest.
|
||||
Elf64_Addr entry = do_xmap(ehdr, &xi1, 0, av, f_decompress, f_unf, &reloc);
|
||||
DPRINTF("upx_main2 entry=%%p reloc=%%p", entry, reloc);
|
||||
if (ET_DYN!=orig_e_type) {
|
||||
auxv_up(av, AT_ENTRY , entry);
|
||||
}
|
||||
|
||||
{ // Map PT_INTERP program interpreter
|
||||
phdr = (Elf64_Phdr *)(1+ ehdr);
|
||||
unsigned j;
|
||||
for (j=0; j < ehdr->e_phnum; ++phdr, ++j) if (PT_INTERP==phdr->p_type) {
|
||||
char const *const iname = reloc + (char const *)phdr->p_vaddr;
|
||||
int const fdi = open(iname, O_RDONLY, 0);
|
||||
if (0 > fdi) {
|
||||
err_exit(18);
|
||||
}
|
||||
if (MAX_ELF_HDR!=read(fdi, (void *)ehdr, MAX_ELF_HDR)) {
|
||||
ERR_LAB
|
||||
err_exit(19);
|
||||
}
|
||||
{
|
||||
Elf64_Addr i_reloc = 0;
|
||||
entry = do_xmap(ehdr, 0, fdi, 0, 0, 0, &i_reloc);
|
||||
auxv_up(av, AT_BASE, i_reloc); // musl
|
||||
}
|
||||
close(fdi);
|
||||
}
|
||||
}
|
||||
|
||||
return (void *)entry;
|
||||
}
|
||||
|
||||
#if DEBUG //{
|
||||
|
||||
static int
|
||||
unsimal(unsigned x, char *ptr, int n)
|
||||
{
|
||||
unsigned m = 10;
|
||||
while (10 <= (x / m)) m *= 10;
|
||||
while (10 <= x) {
|
||||
unsigned d = x / m;
|
||||
x -= m * d;
|
||||
m /= 10;
|
||||
ptr[n++] = '0' + d;
|
||||
}
|
||||
ptr[n++] = '0' + x;
|
||||
return n;
|
||||
}
|
||||
|
||||
static int
|
||||
decimal(int x, char *ptr, int n)
|
||||
{
|
||||
if (x < 0) {
|
||||
x = -x;
|
||||
ptr[n++] = '-';
|
||||
}
|
||||
return unsimal(x, ptr, n);
|
||||
}
|
||||
|
||||
static int
|
||||
heximal(unsigned long x, char *ptr, int n)
|
||||
{
|
||||
unsigned j = -1+ 2*sizeof(unsigned long);
|
||||
unsigned long m = 0xful << (4 * j);
|
||||
for (; j; --j, m >>= 4) { // omit leading 0 digits
|
||||
if (m & x) break;
|
||||
}
|
||||
for (; m; --j, m >>= 4) {
|
||||
unsigned d = 0xf & (x >> (4 * j));
|
||||
ptr[n++] = ((10<=d) ? ('a' - 10) : '0') + d;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
#define va_list __builtin_va_list
|
||||
#define va_start __builtin_va_start
|
||||
|
||||
static int
|
||||
dprintf(char const *fmt, ...)
|
||||
{
|
||||
int n= 0;
|
||||
char const *literal = 0; // NULL
|
||||
char buf[24]; // ~0ull == 18446744073709551615 ==> 20 chars
|
||||
va_list va; va_start(va, fmt);
|
||||
for (;;) {
|
||||
char c = *fmt++;
|
||||
if (!c) { // end of fmt
|
||||
if (literal) {
|
||||
goto finish;
|
||||
}
|
||||
break; // goto done
|
||||
}
|
||||
if ('%'!=c) {
|
||||
if (!literal) {
|
||||
literal = fmt; // 1 beyond start of literal
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// '%' == c
|
||||
if (literal) {
|
||||
finish:
|
||||
n += write(2, -1+ literal, fmt - literal);
|
||||
literal = 0; // NULL
|
||||
if (!c) { // fmt already ended
|
||||
break; // goto done
|
||||
}
|
||||
}
|
||||
switch (c= *fmt++) { // deficiency: does not handle _long_
|
||||
default: { // un-implemented conversion
|
||||
n+= write(2, -1+ fmt, 1);
|
||||
} break;
|
||||
case 0: { // fmt ends with "%\0" ==> ignore
|
||||
goto done;
|
||||
} break;
|
||||
case 'u': {
|
||||
n+= write(2, buf, unsimal(va_arg(va, unsigned), buf, 0));
|
||||
} break;
|
||||
case 'd': {
|
||||
n+= write(2, buf, decimal(va_arg(va, int), buf, 0));
|
||||
} break;
|
||||
case 'p': {
|
||||
buf[0] = '0';
|
||||
buf[1] = 'x';
|
||||
n+= write(2, buf, heximal((unsigned long)va_arg(va, void *), buf, 2));
|
||||
} break;
|
||||
case 'x': {
|
||||
buf[0] = '0';
|
||||
buf[1] = 'x';
|
||||
n+= write(2, buf, heximal(va_arg(va, int), buf, 2));
|
||||
} break;
|
||||
} // 'switch'
|
||||
}
|
||||
done:
|
||||
va_end(va);
|
||||
return n;
|
||||
}
|
||||
#endif //}
|
||||
/* vim:set ts=4 sw=4 et: */
|
||||
#include "amd64-linux.elf-main.c"
|
||||
|
||||
@@ -101,7 +101,7 @@ struct timespec {
|
||||
#elif defined(__amd64__) //}{
|
||||
#define PAGE_MASK (~0ul<<12) // discards the offset, keeps the page
|
||||
#define PAGE_SIZE ( 1ul<<12)
|
||||
#elif defined(__i386__) || defined(__powerpc__) || defined(__arm__) || defined(__AARCH64EL__) //}{
|
||||
#elif defined(__i386__) || defined(__powerpc__) || defined(__arm__) //}{
|
||||
#define PAGE_MASK (~0ul<<12) // discards the offset, keeps the page
|
||||
#define PAGE_SIZE ( 1ul<<12)
|
||||
#endif //}
|
||||
|
||||
@@ -42,13 +42,6 @@ sz_b_info= 12
|
||||
sz_cpr= 4
|
||||
b_method= 8
|
||||
|
||||
szElf64_Ehdr= 16 + 2*2 + 4 + 3*NBPW + 4 + 6*2
|
||||
p_memsz= 2*4 + 4*NBPW
|
||||
|
||||
e_type= 16
|
||||
ET_EXEC= 2
|
||||
ET_DYN= 3
|
||||
|
||||
AT_NULL= 0 // <elf.h>
|
||||
AT_PAGESZ= 6
|
||||
a_type= 0
|
||||
@@ -225,17 +218,17 @@ unfold: // IN: r_exp, r_auxv, r_PMASK
|
||||
add a1,a1,r0 // + sz_cpr of fold; a1 <= .st_size
|
||||
call mmapRW0
|
||||
sub r_relo,a0,r_elfa // relocation amount
|
||||
mtctr r_exp; add r_exp,r_exp,r_relo // use old f_exp; r_exp= new &f_exp
|
||||
|
||||
// Decompress from old folded code, overwriting new copy of folded code.
|
||||
lwz r_obinf, LOBINFO - LrFLD(r_FLD) // O_BINFO
|
||||
la src,sz_b_info + LBINFO - LrFLD(r_FLD) // old folded code
|
||||
la src,sz_b_info + LBINFO - LrFLD(r_FLD) // old folded code
|
||||
add r_FLD,r_FLD,r_relo // dst for unfolding; use copied data
|
||||
add r_LENM,r_FLD,r_szuf // + sz_unc = last of unfolded
|
||||
and r_ADRM,r_FLD,r_PMASK // base for PROT_EXEC
|
||||
and r_ADRM,r_exp,r_PMASK // base for PROT_EXEC
|
||||
sub r_LENM,r_LENM,r_ADRM // length for PROT_EXEC
|
||||
|
||||
// The new f_exp has PROT_WRITE, so use the old f_exp to decompress.
|
||||
mtctr r_exp; add r_exp,r_exp,r_relo // use old f_exp; r_exp= new &f_exp
|
||||
lbz meth,b_method + LBINFO - LrFLD(r_FLD)
|
||||
std r_szuf,SZ_FRAME+31*NBPW(sp) // lzma uses for EOF
|
||||
la ldst,SZ_FRAME+31*NBPW(sp) // &slot on stack
|
||||
|
||||
@@ -21,10 +21,9 @@ Linker script and memory map
|
||||
0x000000000010023e mprotect
|
||||
0x0000000000100232 close
|
||||
*fill* 0x000000000010024a 0x2 00
|
||||
.text 0x000000000010024c 0x5d5 tmp/amd64-linux.elf-main.o
|
||||
.text 0x000000000010024c 0x5d8 tmp/amd64-linux.elf-main.o
|
||||
0x00000000001006e0 upx_main
|
||||
*(.data)
|
||||
*fill* 0x0000000000100821 0x3 00
|
||||
.data 0x0000000000100824 0x0 tmp/amd64-linux.elf-fold.o
|
||||
.data 0x0000000000100824 0x0 tmp/amd64-linux.elf-main.o
|
||||
|
||||
|
||||
@@ -2,24 +2,22 @@ file format elf64-littleaarch64
|
||||
|
||||
Sections:
|
||||
Idx Name Size VMA LMA File off Algn Flags
|
||||
0 ELFMAINX 00000044 0000000000000000 0000000000000000 00000040 2**0 CONTENTS, RELOC, READONLY
|
||||
1 ELFMAINXu 0000009c 0000000000000000 0000000000000000 00000084 2**0 CONTENTS, RELOC, READONLY
|
||||
2 NRV_HEAD 00000000 0000000000000000 0000000000000000 00000120 2**0 CONTENTS, READONLY
|
||||
3 NRV_TAIL 00000000 0000000000000000 0000000000000000 00000120 2**0 CONTENTS, READONLY
|
||||
4 NRV2E 00000128 0000000000000000 0000000000000000 00000120 2**0 CONTENTS, READONLY
|
||||
5 NRV2D 0000011c 0000000000000000 0000000000000000 00000248 2**0 CONTENTS, READONLY
|
||||
6 NRV2B 000000f0 0000000000000000 0000000000000000 00000364 2**0 CONTENTS, READONLY
|
||||
7 LZMA_ELF00 000000d0 0000000000000000 0000000000000000 00000454 2**0 CONTENTS, RELOC, READONLY
|
||||
8 LZMA_DEC20 00000968 0000000000000000 0000000000000000 00000524 2**0 CONTENTS, READONLY
|
||||
9 LZMA_DEC10 0000049c 0000000000000000 0000000000000000 00000e8c 2**0 CONTENTS, READONLY
|
||||
10 LZMA_DEC30 00000000 0000000000000000 0000000000000000 00001328 2**0 CONTENTS, READONLY
|
||||
11 ELFMAINY 0000003e 0000000000000000 0000000000000000 00001328 2**0 CONTENTS, READONLY
|
||||
12 ELFMAINZ 00000004 0000000000000000 0000000000000000 00001366 2**0 CONTENTS, RELOC, READONLY
|
||||
0 ELFMAINX 00000008 0000000000000000 0000000000000000 00000040 2**0 CONTENTS, RELOC, READONLY
|
||||
1 NRV_HEAD 00000000 0000000000000000 0000000000000000 00000048 2**0 CONTENTS, READONLY
|
||||
2 NRV_TAIL 00000000 0000000000000000 0000000000000000 00000048 2**0 CONTENTS, READONLY
|
||||
3 NRV2E 00000128 0000000000000000 0000000000000000 00000048 2**0 CONTENTS, READONLY
|
||||
4 NRV2D 0000011c 0000000000000000 0000000000000000 00000170 2**0 CONTENTS, READONLY
|
||||
5 NRV2B 000000f0 0000000000000000 0000000000000000 0000028c 2**0 CONTENTS, READONLY
|
||||
6 LZMA_ELF00 000000d0 0000000000000000 0000000000000000 0000037c 2**0 CONTENTS, RELOC, READONLY
|
||||
7 LZMA_DEC20 00000968 0000000000000000 0000000000000000 0000044c 2**0 CONTENTS, READONLY
|
||||
8 LZMA_DEC10 0000049c 0000000000000000 0000000000000000 00000db4 2**0 CONTENTS, READONLY
|
||||
9 LZMA_DEC30 00000000 0000000000000000 0000000000000000 00001250 2**0 CONTENTS, READONLY
|
||||
10 ELFMAINY 0000003e 0000000000000000 0000000000000000 00001250 2**0 CONTENTS, READONLY
|
||||
11 ELFMAINZ 00000150 0000000000000000 0000000000000000 00001290 2**2 CONTENTS, RELOC, READONLY
|
||||
SYMBOL TABLE:
|
||||
0000000000000000 l d LZMA_DEC30 0000000000000000 LZMA_DEC30
|
||||
0000000000000000 l d ELFMAINY 0000000000000000 ELFMAINY
|
||||
0000000000000000 l d ELFMAINZ 0000000000000000 ELFMAINZ
|
||||
0000000000000000 l d ELFMAINX 0000000000000000 ELFMAINX
|
||||
0000000000000000 l d ELFMAINXu 0000000000000000 ELFMAINXu
|
||||
0000000000000000 l d NRV_HEAD 0000000000000000 NRV_HEAD
|
||||
0000000000000000 l d NRV_TAIL 0000000000000000 NRV_TAIL
|
||||
0000000000000000 l d NRV2E 0000000000000000 NRV2E
|
||||
@@ -28,13 +26,9 @@ SYMBOL TABLE:
|
||||
0000000000000000 l d LZMA_ELF00 0000000000000000 LZMA_ELF00
|
||||
0000000000000000 l d LZMA_DEC20 0000000000000000 LZMA_DEC20
|
||||
0000000000000000 l d LZMA_DEC10 0000000000000000 LZMA_DEC10
|
||||
0000000000000000 l d ELFMAINZ 0000000000000000 ELFMAINZ
|
||||
0000000000000000 *UND* 0000000000000000 LENF
|
||||
0000000000000000 *UND* 0000000000000000 CPR0
|
||||
0000000000000000 l d ELFMAINY 0000000000000000 ELFMAINY
|
||||
0000000000000000 *UND* 0000000000000000 MFLG
|
||||
0000000000000000 *UND* 0000000000000000 ADRM
|
||||
0000000000000014 g ELFMAINX 0000000000000000 _start
|
||||
0000000000000004 g ELFMAINZ 0000000000000000 cpr0
|
||||
0000000000000004 g ELFMAINX 0000000000000000 _start
|
||||
0000000000000000 g F NRV2E 0000000000000128 ucl_nrv2e_decompress_32
|
||||
0000000000000000 g F NRV2D 000000000000011c ucl_nrv2d_decompress_32
|
||||
0000000000000000 g F NRV2B 00000000000000f0 ucl_nrv2b_decompress_32
|
||||
@@ -44,14 +38,8 @@ SYMBOL TABLE:
|
||||
|
||||
RELOCATION RECORDS FOR [ELFMAINX]:
|
||||
OFFSET TYPE VALUE
|
||||
0000000000000000 R_AARCH64_ABS32 LENF
|
||||
0000000000000004 R_AARCH64_ABS32 CPR0
|
||||
0000000000000008 R_AARCH64_ABS32 MFLG
|
||||
000000000000000c R_AARCH64_ABS64 ADRM
|
||||
|
||||
RELOCATION RECORDS FOR [ELFMAINXu]:
|
||||
OFFSET TYPE VALUE
|
||||
0000000000000024 R_AARCH64_CONDBR19 ELFMAINY
|
||||
0000000000000000 R_AARCH64_ABS32 MFLG
|
||||
0000000000000004 R_AARCH64_CALL26 ELFMAINZ+0x0000000000000104
|
||||
|
||||
RELOCATION RECORDS FOR [LZMA_ELF00]:
|
||||
OFFSET TYPE VALUE
|
||||
@@ -59,4 +47,4 @@ OFFSET TYPE VALUE
|
||||
|
||||
RELOCATION RECORDS FOR [ELFMAINZ]:
|
||||
OFFSET TYPE VALUE
|
||||
0000000000000000 R_AARCH64_ABS32 O_BINFO
|
||||
000000000000014c R_AARCH64_ABS32 O_BINFO
|
||||
|
||||
@@ -8,44 +8,44 @@ Linker script and memory map
|
||||
|
||||
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
|
||||
|
||||
.text 0x00000000001000bc 0x904
|
||||
.text 0x00000000001000bc 0x924
|
||||
*(.text)
|
||||
.text 0x00000000001000bc 0x238 tmp/arm64-linux.elf-fold.o
|
||||
0x0000000000100230 my_bkpt
|
||||
0x0000000000100238 exit
|
||||
0x0000000000100240 read
|
||||
0x000000000010024c write
|
||||
0x0000000000100258 close
|
||||
0x0000000000100264 getpid
|
||||
0x0000000000100270 brk
|
||||
0x000000000010027c munmap
|
||||
0x0000000000100288 mprotect
|
||||
0x0000000000100294 mmap_privanon
|
||||
0x00000000001002a4 mmap
|
||||
0x00000000001002b0 unlink
|
||||
0x00000000001002bc readlink
|
||||
0x00000000001002c4 open
|
||||
0x00000000001002e0 __clear_cache
|
||||
.text 0x00000000001002f4 0x6cc tmp/arm64-linux.elf-main.o
|
||||
0x00000000001007c4 upx_main
|
||||
.text 0x00000000001000bc 0x230 tmp/arm64-linux.elf-fold.o
|
||||
0x0000000000100220 my_bkpt
|
||||
0x0000000000100228 exit
|
||||
0x0000000000100230 read
|
||||
0x000000000010023c write
|
||||
0x0000000000100248 close
|
||||
0x0000000000100254 getpid
|
||||
0x0000000000100260 brk
|
||||
0x000000000010026c munmap
|
||||
0x0000000000100278 mprotect
|
||||
0x0000000000100284 mmap_privanon
|
||||
0x0000000000100294 mmap
|
||||
0x00000000001002a0 unlink
|
||||
0x00000000001002b4 readlink
|
||||
0x00000000001002bc open
|
||||
0x00000000001002d8 __clear_cache
|
||||
.text 0x00000000001002ec 0x6f4 tmp/arm64-linux.elf-main.o
|
||||
0x000000000010087c upx_main
|
||||
*(.data)
|
||||
.data 0x00000000001009c0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
.data 0x00000000001009c0 0x0 tmp/arm64-linux.elf-main.o
|
||||
.data 0x00000000001009e0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
.data 0x00000000001009e0 0x0 tmp/arm64-linux.elf-main.o
|
||||
|
||||
.iplt 0x00000000001009c0 0x0
|
||||
.iplt 0x00000000001009c0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
.iplt 0x00000000001009e0 0x0
|
||||
.iplt 0x00000000001009e0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
|
||||
.rela.dyn 0x00000000001009c0 0x0
|
||||
.rela.iplt 0x00000000001009c0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
.rela.dyn 0x00000000001009e0 0x0
|
||||
.rela.iplt 0x00000000001009e0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
|
||||
.data
|
||||
LOAD tmp/arm64-linux.elf-fold.o
|
||||
LOAD tmp/arm64-linux.elf-main.o
|
||||
OUTPUT(tmp/arm64-linux.elf-fold.bin elf64-littleaarch64)
|
||||
|
||||
.igot.plt 0x00000000001009c0 0x0
|
||||
.igot.plt 0x00000000001009c0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
.igot.plt 0x00000000001009e0 0x0
|
||||
.igot.plt 0x00000000001009e0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
|
||||
.bss 0x00000000001009c0 0x0
|
||||
.bss 0x00000000001009c0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
.bss 0x00000000001009c0 0x0 tmp/arm64-linux.elf-main.o
|
||||
.bss 0x00000000001009e0 0x0
|
||||
.bss 0x00000000001009e0 0x0 tmp/arm64-linux.elf-fold.o
|
||||
.bss 0x00000000001009e0 0x0 tmp/arm64-linux.elf-main.o
|
||||
|
||||
@@ -9,7 +9,7 @@ Linker script and memory map
|
||||
TARGET(elf64-powerpc)
|
||||
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
|
||||
|
||||
.text 0x00000000001000bc 0xa6c
|
||||
.text 0x00000000001000bc 0xa70
|
||||
*(.text)
|
||||
.text 0x00000000001000bc 0x2f0 tmp/powerpc64-linux.elf-fold.o
|
||||
0x00000000001000bc get_page_mask
|
||||
@@ -23,25 +23,25 @@ TARGET(elf64-powerpc)
|
||||
0x0000000000100394 mprotect
|
||||
0x000000000010039c munmap
|
||||
0x00000000001003a4 my_bkpt
|
||||
.text 0x00000000001003ac 0x77c tmp/powerpc64-linux.elf-main.o
|
||||
.text 0x00000000001003ac 0x780 tmp/powerpc64-linux.elf-main.o
|
||||
*(.data)
|
||||
.data 0x0000000000100b28 0x0 tmp/powerpc64-linux.elf-fold.o
|
||||
.data 0x0000000000100b28 0x0 tmp/powerpc64-linux.elf-main.o
|
||||
.data 0x0000000000100b2c 0x0 tmp/powerpc64-linux.elf-fold.o
|
||||
.data 0x0000000000100b2c 0x0 tmp/powerpc64-linux.elf-main.o
|
||||
|
||||
.sfpr 0x0000000000100b28 0xa4
|
||||
.sfpr 0x0000000000100b28 0xa4 linker stubs
|
||||
0x0000000000100b28 _savegpr0_14
|
||||
0x0000000000100b50 _savegpr0_24
|
||||
0x0000000000100b60 _savegpr0_28
|
||||
0x0000000000100b78 _restgpr0_14
|
||||
0x0000000000100ba0 _restgpr0_24
|
||||
0x0000000000100bb0 _restgpr0_28
|
||||
.sfpr 0x0000000000100b2c 0xa4
|
||||
.sfpr 0x0000000000100b2c 0xa4 linker stubs
|
||||
0x0000000000100b2c _savegpr0_14
|
||||
0x0000000000100b54 _savegpr0_24
|
||||
0x0000000000100b64 _savegpr0_28
|
||||
0x0000000000100b7c _restgpr0_14
|
||||
0x0000000000100ba4 _restgpr0_24
|
||||
0x0000000000100bb4 _restgpr0_28
|
||||
|
||||
.glink 0x0000000000100bd0 0x0
|
||||
.glink 0x0000000000100bd0 0x0 linker stubs
|
||||
|
||||
.eh_frame 0x0000000000100bcc 0x0
|
||||
.eh_frame 0x0000000000100bcc 0x0 linker stubs
|
||||
.eh_frame 0x0000000000100bd0 0x0
|
||||
.eh_frame 0x0000000000100bd0 0x0 linker stubs
|
||||
|
||||
.rela.dyn 0x0000000000100bd0 0x0
|
||||
.rela.iplt 0x0000000000100bd0 0x0 linker stubs
|
||||
|
||||
@@ -9,7 +9,7 @@ Linker script and memory map
|
||||
TARGET(elf64-powerpcle)
|
||||
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
|
||||
|
||||
.text 0x00000000001000bc 0xa38
|
||||
.text 0x00000000001000bc 0xa3c
|
||||
*(.text)
|
||||
.text 0x00000000001000bc 0x2c0 tmp/powerpc64le-linux.elf-fold.o
|
||||
0x00000000001000bc get_page_mask
|
||||
@@ -23,47 +23,47 @@ TARGET(elf64-powerpcle)
|
||||
0x0000000000100364 mprotect
|
||||
0x000000000010036c munmap
|
||||
0x0000000000100374 my_bkpt
|
||||
.text 0x000000000010037c 0x778 tmp/powerpc64le-linux.elf-main.o
|
||||
.text 0x000000000010037c 0x77c tmp/powerpc64le-linux.elf-main.o
|
||||
*(.data)
|
||||
.data 0x0000000000100af4 0x0 tmp/powerpc64le-linux.elf-fold.o
|
||||
.data 0x0000000000100af4 0x0 tmp/powerpc64le-linux.elf-main.o
|
||||
.data 0x0000000000100af8 0x0 tmp/powerpc64le-linux.elf-fold.o
|
||||
.data 0x0000000000100af8 0x0 tmp/powerpc64le-linux.elf-main.o
|
||||
|
||||
.sfpr 0x0000000000100af4 0xa4
|
||||
.sfpr 0x0000000000100af4 0xa4 linker stubs
|
||||
0x0000000000100af4 _savegpr0_14
|
||||
0x0000000000100b1c _savegpr0_24
|
||||
0x0000000000100b2c _savegpr0_28
|
||||
0x0000000000100b44 _restgpr0_14
|
||||
0x0000000000100b6c _restgpr0_24
|
||||
0x0000000000100b7c _restgpr0_28
|
||||
.sfpr 0x0000000000100af8 0xa4
|
||||
.sfpr 0x0000000000100af8 0xa4 linker stubs
|
||||
0x0000000000100af8 _savegpr0_14
|
||||
0x0000000000100b20 _savegpr0_24
|
||||
0x0000000000100b30 _savegpr0_28
|
||||
0x0000000000100b48 _restgpr0_14
|
||||
0x0000000000100b70 _restgpr0_24
|
||||
0x0000000000100b80 _restgpr0_28
|
||||
|
||||
.glink 0x0000000000100b98 0x0
|
||||
.glink 0x0000000000100b98 0x0 linker stubs
|
||||
.glink 0x0000000000100ba0 0x0
|
||||
.glink 0x0000000000100ba0 0x0 linker stubs
|
||||
|
||||
.eh_frame 0x0000000000100b98 0x0
|
||||
.eh_frame 0x0000000000100b98 0x0 linker stubs
|
||||
.eh_frame 0x0000000000100b9c 0x0
|
||||
.eh_frame 0x0000000000100b9c 0x0 linker stubs
|
||||
|
||||
.rela.dyn 0x0000000000100b98 0x0
|
||||
.rela.iplt 0x0000000000100b98 0x0 linker stubs
|
||||
.rela.dyn 0x0000000000100ba0 0x0
|
||||
.rela.iplt 0x0000000000100ba0 0x0 linker stubs
|
||||
|
||||
.data
|
||||
LOAD tmp/powerpc64le-linux.elf-fold.o
|
||||
LOAD tmp/powerpc64le-linux.elf-main.o
|
||||
OUTPUT(tmp/powerpc64le-linux.elf-fold.bin elf64-powerpcle)
|
||||
|
||||
.branch_lt 0x0000000000100b98 0x0
|
||||
.branch_lt 0x0000000000100b98 0x0 linker stubs
|
||||
.branch_lt 0x0000000000100ba0 0x0
|
||||
.branch_lt 0x0000000000100ba0 0x0 linker stubs
|
||||
|
||||
.toc 0x0000000000100b98 0x0
|
||||
.toc 0x0000000000100b98 0x0 tmp/powerpc64le-linux.elf-main.o
|
||||
.toc 0x0000000000100ba0 0x0
|
||||
.toc 0x0000000000100ba0 0x0 tmp/powerpc64le-linux.elf-main.o
|
||||
|
||||
.opd 0x0000000000100b98 0x58
|
||||
.opd 0x0000000000100b98 0x58 tmp/powerpc64le-linux.elf-main.o
|
||||
0x0000000000100bd8 upx_main
|
||||
.opd 0x0000000000100ba0 0x58
|
||||
.opd 0x0000000000100ba0 0x58 tmp/powerpc64le-linux.elf-main.o
|
||||
0x0000000000100be0 upx_main
|
||||
|
||||
.iplt 0x0000000000100bf0 0x0
|
||||
.iplt 0x0000000000100bf0 0x0 linker stubs
|
||||
.iplt 0x0000000000100bf8 0x0
|
||||
.iplt 0x0000000000100bf8 0x0 linker stubs
|
||||
|
||||
.bss 0x0000000000100bf0 0x0
|
||||
.bss 0x0000000000100bf0 0x0 tmp/powerpc64le-linux.elf-fold.o
|
||||
.bss 0x0000000000100bf0 0x0 tmp/powerpc64le-linux.elf-main.o
|
||||
.bss 0x0000000000100bf8 0x0
|
||||
.bss 0x0000000000100bf8 0x0 tmp/powerpc64le-linux.elf-fold.o
|
||||
.bss 0x0000000000100bf8 0x0 tmp/powerpc64le-linux.elf-main.o
|
||||
|
||||
Reference in New Issue
Block a user