From 4ae157672601e0602ce18ab210085cc6b3b357b8 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Sat, 30 May 2020 02:54:09 -0700 Subject: [PATCH] Mach-o LC_SEGMENTs not monotonic in file (__DWARF for 'go') https://github.com/upx/upx/issues/222 go-1.14 (but not go-1.14.3 ?) modified: ../p_mach.cpp modified: ../p_mach.h modified: ../p_unix.cpp modified: ../p_unix.h modified: ../stub/src/amd64-darwin.macho-main.c modified: ../stub/amd64-darwin.macho-fold.h modified: ../stub/arm.v5a-darwin.macho-fold.h modified: ../stub/arm64-darwin.macho-fold.h modified: ../stub/tmp/amd64-darwin.macho-fold.map modified: ../stub/tmp/arm.v5a-darwin.macho-fold.map modified: ../stub/tmp/arm64-darwin.macho-fold.map --- src/p_mach.cpp | 13 +- src/p_mach.h | 2 +- src/p_unix.cpp | 4 +- src/p_unix.h | 8 +- src/stub/amd64-darwin.macho-fold.h | 233 ++++++++++---------- src/stub/arm.v5a-darwin.macho-fold.h | 211 +++++++++--------- src/stub/arm64-darwin.macho-fold.h | 237 +++++++++++---------- src/stub/src/amd64-darwin.macho-main.c | 227 +++++++++++--------- src/stub/tmp/amd64-darwin.macho-fold.map | 68 +++--- src/stub/tmp/arm.v5a-darwin.macho-fold.map | 68 +++--- src/stub/tmp/arm64-darwin.macho-fold.map | 90 ++++---- 11 files changed, 618 insertions(+), 543 deletions(-) diff --git a/src/p_mach.cpp b/src/p_mach.cpp index 91e7ea9a..851bf041 100644 --- a/src/p_mach.cpp +++ b/src/p_mach.cpp @@ -1089,8 +1089,19 @@ int PackMachBase::pack2(OutputFile *fo, Filter &ft) // append compressed bo } bool const do_filter = (msegcmd[k].filesize==exe_filesize_max) && 0!=(Mach_command::VM_PROT_EXECUTE & msegcmd[k].initprot); + Mach_segment_command const *ptr = rawmseg; + unsigned b_extra = 0; + for (unsigned j= 0; j < mhdri.ncmds; ++j) { + if (msegcmd[k].cmd == ptr->cmd + && msegcmd[k].vmaddr == ptr->vmaddr + && msegcmd[k].vmsize == ptr->vmsize) { + b_extra = j; + break; + } + ptr = (Mach_segment_command const *)(ptr->cmdsize + (char const *)ptr); + } packExtent(x, total_in, total_out, - (do_filter ? &ft : 0 ), fo, hdr_u_len ); + (do_filter ? &ft : 0 ), fo, hdr_u_len, b_extra ); if (do_filter) { exe_filesize_max = 0; } diff --git a/src/p_mach.h b/src/p_mach.h index 7c2284d8..d68b4efc 100644 --- a/src/p_mach.h +++ b/src/p_mach.h @@ -844,7 +844,7 @@ protected: unsigned char b_method; // compression algorithm unsigned char b_ftid; // filter id unsigned char b_cto8; // filter parameter - unsigned char b_unused; + unsigned char b_segseq; // LC_SEGMENT ordinal __packed_struct_end() __packed_struct(l_info) // 12-byte trailer in header for loader diff --git a/src/p_unix.cpp b/src/p_unix.cpp index 3fedb903..be9b45ca 100644 --- a/src/p_unix.cpp +++ b/src/p_unix.cpp @@ -322,7 +322,8 @@ void PackUnix::packExtent( unsigned &total_out, Filter *ft, OutputFile *fo, - unsigned hdr_u_len + unsigned hdr_u_len, + unsigned b_extra ) { unsigned const init_u_adler = ph.u_adler; @@ -425,6 +426,7 @@ void PackUnix::packExtent( tmp.b_cto8 = ft->cto; } } + tmp.b_extra = b_extra; fo->write(&tmp, sizeof(tmp)); b_len += sizeof(b_info); diff --git a/src/p_unix.h b/src/p_unix.h index d0111643..5ba7dc90 100644 --- a/src/p_unix.h +++ b/src/p_unix.h @@ -73,7 +73,7 @@ protected: }; virtual void packExtent(const Extent &x, unsigned &total_in, unsigned &total_out, Filter *, OutputFile *, - unsigned hdr_len = 0); + unsigned hdr_len = 0, unsigned b_extra = 0); virtual void unpackExtent(unsigned wanted, OutputFile *fo, unsigned &total_in, unsigned &total_out, unsigned &c_adler, unsigned &u_adler, @@ -98,7 +98,7 @@ protected: unsigned char b_method; // compression algorithm unsigned char b_ftid; // filter id unsigned char b_cto8; // filter parameter - unsigned char b_unused; + unsigned char b_extra; __packed_struct_end() __packed_struct(l_info) // 12-byte trailer in header for loader @@ -139,7 +139,7 @@ protected: unsigned char b_method; // compression algorithm unsigned char b_ftid; // filter id unsigned char b_cto8; // filter parameter - unsigned char b_unused; + unsigned char b_extra; __packed_struct_end() __packed_struct(l_info) // 12-byte trailer in header for loader @@ -171,7 +171,7 @@ protected: unsigned char b_method; // compression algorithm unsigned char b_ftid; // filter id unsigned char b_cto8; // filter parameter - unsigned char b_unused; + unsigned char b_extra; __packed_struct_end() __packed_struct(l_info) // 12-byte trailer in header for loader diff --git a/src/stub/amd64-darwin.macho-fold.h b/src/stub/amd64-darwin.macho-fold.h index c1e12a6d..cee7367c 100644 --- a/src/stub/amd64-darwin.macho-fold.h +++ b/src/stub/amd64-darwin.macho-fold.h @@ -1,5 +1,5 @@ /* amd64-darwin.macho-fold.h - created from amd64-darwin.macho-fold.bin, 2187 (0x88b) bytes + created from amd64-darwin.macho-fold.bin, 2360 (0x938) bytes This file is part of the UPX executable compressor. @@ -31,11 +31,11 @@ */ -#define STUB_AMD64_DARWIN_MACHO_FOLD_SIZE 2187 -#define STUB_AMD64_DARWIN_MACHO_FOLD_ADLER32 0xf9ad84de -#define STUB_AMD64_DARWIN_MACHO_FOLD_CRC32 0x2577d36b +#define STUB_AMD64_DARWIN_MACHO_FOLD_SIZE 2360 +#define STUB_AMD64_DARWIN_MACHO_FOLD_ADLER32 0xcbc6c932 +#define STUB_AMD64_DARWIN_MACHO_FOLD_CRC32 0x38b14abc -unsigned char stub_amd64_darwin_macho_fold[2187] = { +unsigned char stub_amd64_darwin_macho_fold[2360] = { /* 0x0000 */ 232, 74, 0, 0, 0,131,249, 73,117, 68, 83, 87, 72,141, 76, 55, /* 0x0010 */ 253, 94, 86, 91,235, 47, 72, 57,206,115, 50, 86, 94,172, 60,128, /* 0x0020 */ 114, 10, 60,143,119, 6,128,126,254, 15,116, 6, 44,232, 60, 1, @@ -43,7 +43,7 @@ unsigned char stub_amd64_darwin_macho_fold[2187] = { /* 0x0040 */ 41,248, 1,216,171, 72, 57,206,115, 3,172,235,223, 91,195, 65, /* 0x0050 */ 89, 76,137,247, 76,137,254, 73,137,228,139, 79, 24,184, 0, 8, /* 0x0060 */ 0, 0, 57,193, 15, 66,200, 73,141, 68, 36, 32, 73,137,232, 72, -/* 0x0070 */ 41,204, 72,137,226, 80,232,123, 6, 0, 0, 72,139, 40, 72,139, +/* 0x0070 */ 41,204, 72,137,226, 80,232, 41, 7, 0, 0, 72,139, 40, 72,139, /* 0x0080 */ 136,128, 0, 0, 0, 76,137,228, 72,137, 76, 36, 24, 95,232, 45, /* 0x0090 */ 0, 0, 0, 95, 94,184, 73, 0, 0, 2,255,229,139, 7, 15,200, /* 0x00a0 */ 137, 7,131,238, 4, 72,141,127, 4,119,241,195,176, 4,235, 2, @@ -68,109 +68,120 @@ unsigned char stub_amd64_darwin_macho_fold[2187] = { /* 0x01d0 */ 81, 72, 57, 23, 76,139, 71, 8, 72,141, 74,255,115, 10,191,127, /* 0x01e0 */ 0, 0, 0,232,200,254,255,255, 72,131,249,255,116, 17, 65, 15, /* 0x01f0 */ 182, 0, 72,255,201, 73,255,192,136, 6, 72,255,198,235,233, 72, -/* 0x0200 */ 1, 87, 8, 72, 41, 23, 88,195, 86,232,162,254,255,255, 65, 85, -/* 0x0210 */ 73,137,213, 65, 84, 73,137,204, 85, 72,137,253, 83, 72,137,243, -/* 0x0220 */ 72,131,236, 40, 72,131, 62, 0, 15,132, 19, 1, 0, 0, 72,141, -/* 0x0230 */ 116, 36, 16,186, 12, 0, 0, 0, 72,137,239,232,144,255,255,255, -/* 0x0240 */ 131,124, 36, 16, 0,139, 68, 36, 20,117, 43, 61, 85, 80, 88, 33, -/* 0x0250 */ 116, 10,191, 2, 0, 0, 0,232,172,255,255,255, 72,131,125, 0, -/* 0x0260 */ 0, 15,132,218, 0, 0, 0,191, 3, 0, 0, 0,232,151,255,255, -/* 0x0270 */ 255,233,203, 0, 0, 0,133,192,117, 10,191, 4, 0, 0, 0,232, -/* 0x0280 */ 132,255,255,255,139, 68, 36, 16, 57, 68, 36, 20,119, 7,137,192, -/* 0x0290 */ 72, 59, 3,118, 10,191, 5, 0, 0, 0,232,105,255,255,255,139, -/* 0x02a0 */ 116, 36, 20,139, 68, 36, 16, 76,139, 75, 8, 57,198,115,108,137, -/* 0x02b0 */ 192, 68, 15,182, 68, 36, 24, 72,139,125, 8, 72,137, 68, 36, 8, -/* 0x02c0 */ 72,141, 76, 36, 8, 76,137,202, 65,255,213,133,192,117, 11,139, -/* 0x02d0 */ 68, 36, 16, 72, 57, 68, 36, 8,116, 10,191, 7, 0, 0, 0,232, -/* 0x02e0 */ 36,255,255,255, 15,182, 76, 36, 25,132,201, 15,149,194, 49,192, -/* 0x02f0 */ 77,133,228, 15,149,192,133,194,116, 19, 15,182, 84, 36, 26, 15, -/* 0x0300 */ 182,201, 72,139,123, 8,139,116, 36, 8, 65,255,212,139, 68, 36, -/* 0x0310 */ 20, 72, 1, 69, 8, 72, 41, 69, 0,235, 13,137,242, 72,137,239, -/* 0x0320 */ 76,137,206,232,168,254,255,255,139, 84, 36, 16, 72,139, 3, 72, -/* 0x0330 */ 1, 83, 8, 72, 41,208, 72,133,192, 72,137, 3,233,231,254,255, -/* 0x0340 */ 255, 72,131,196, 40, 91, 93, 65, 92, 65, 93,195, 65, 87, 73,137, -/* 0x0350 */ 255, 65, 86, 73,137,214, 65, 85, 76,141,111, 32, 65, 84, 73,131, -/* 0x0360 */ 204,255, 85, 83, 49,219, 72,131,236,120, 76,137, 76, 36, 56, 68, -/* 0x0370 */ 139, 79, 12, 72,139,132, 36,176, 0, 0, 0,137,116, 36, 76, 76, -/* 0x0380 */ 137,238,137, 76, 36, 72, 76,137, 68, 36, 64, 65,131,249, 7, 72, -/* 0x0390 */ 199, 68, 36, 40, 0, 0, 0, 0, 72,199, 68, 36, 32, 0, 0, 0, -/* 0x03a0 */ 0, 72,137, 68, 36, 48,139, 71, 16,116, 11,246, 71, 26, 32,189, -/* 0x03b0 */ 16, 0, 0, 0,116, 2, 49,237,129,197, 2, 16, 0, 0,133,192, -/* 0x03c0 */ 126, 96,137,199,131, 62, 25,117, 73, 76,139, 70, 32, 77,133,192, -/* 0x03d0 */ 116, 64, 72,139, 78, 24, 72,133,201,117, 6, 64,246,197, 16,117, -/* 0x03e0 */ 49, 65,131,249, 7, 15,148,194, 49,192, 73,131,252,255, 15,148, -/* 0x03f0 */ 192,133,194,116, 11,137,232,131,200, 16, 72,133,201, 15, 69,232, -/* 0x0400 */ 73,141, 4, 8, 73, 57,204, 76, 15, 71,225, 72, 57,195, 72, 15, -/* 0x0410 */ 66,216,139, 70, 4,193,232, 2,255,207,137,192, 72,141, 52,134, -/* 0x0420 */ 117,162, 73,129,228, 0,240,255,255, 76, 41,227, 72,129,195,255, -/* 0x0430 */ 15, 0, 0, 72,129,227, 0,240,255,255, 64,246,197, 16,116, 16, -/* 0x0440 */ 72,137,222, 76,137,231, 76,137,100, 36, 32,232,104,252,255,255, -/* 0x0450 */ 72,139,124, 36, 32, 69, 49,201, 65,131,200,255, 49,210,137,233, -/* 0x0460 */ 72,137,222,232, 96,252,255,255,169,255, 15, 0, 0, 72,137, 68, -/* 0x0470 */ 36, 32,116, 10,191, 6, 0, 0, 0,232,138,253,255,255, 72,139, -/* 0x0480 */ 68, 36, 32,199, 68, 36, 20, 0, 0, 0, 0, 76, 41,224, 72,137, -/* 0x0490 */ 68, 36, 24, 49,192, 65, 59, 71, 16, 15,131, 67, 2, 0, 0, 65, -/* 0x04a0 */ 131,125, 0, 25,117, 33, 73,131,125, 32, 0,117, 26, 72,141,116, -/* 0x04b0 */ 36, 96,186, 12, 0, 0, 0, 76,137,247,232, 17,253,255,255,139, -/* 0x04c0 */ 68, 36,100, 73, 1, 70, 8, 65,139, 69, 0,131,248, 25, 15,133, -/* 0x04d0 */ 209, 1, 0, 0, 73,139, 85, 32, 72,133,210, 15,132,196, 1, 0, -/* 0x04e0 */ 0, 73,139, 69, 48, 72,139,124, 36, 24, 72,137, 68, 36, 80, 73, -/* 0x04f0 */ 3,125, 24, 73,137,196, 72,137,251, 72,137,253, 72, 1,250,129, -/* 0x0500 */ 227,255, 15, 0, 0, 72,137,124, 36, 88, 72,137, 84, 36, 8, 72, -/* 0x0510 */ 41,221, 73, 1,220,116,107, 77,133,246, 76,137,230,116, 7, 73, -/* 0x0520 */ 141,116, 36, 3,235, 10, 72,133,192,185, 18, 0, 0, 0,117, 10, -/* 0x0530 */ 77,133,246,185, 18, 16, 0, 0,117, 9, 72,133,192,139, 84, 36, -/* 0x0540 */ 72,117, 3,131,202,255, 68,139, 76, 36, 76, 69, 3, 77, 40, 65, -/* 0x0550 */ 137,208, 72,137,239,186, 3, 0, 0, 0,232,105,251,255,255, 72, -/* 0x0560 */ 57,232, 72,137,195,116, 10,191, 8, 0, 0, 0,232,151,252,255, -/* 0x0570 */ 255, 72,139, 68, 36, 64, 72,137,221, 72,131, 56, 0,117, 3, 72, -/* 0x0580 */ 137, 24, 77,133,246,116, 45, 73,131,125, 48, 0,116, 38, 73,131, -/* 0x0590 */ 125, 40, 0,117, 8, 72,139, 68, 36, 64, 72,137, 40, 72,139, 76, -/* 0x05a0 */ 36, 48, 72,139, 84, 36, 56, 72,141,116, 36, 80, 76,137,247,232, -/* 0x05b0 */ 90,252,255,255, 77,133,246, 15,149,194, 49,192, 77,133,228, 15, -/* 0x05c0 */ 149,192,133,194,116, 49, 73,131,125, 40, 0,117, 42, 65,131,125, -/* 0x05d0 */ 64, 0,116, 35, 76,137,232, 76, 41,248, 72,131,224,252,139, 68, -/* 0x05e0 */ 5,120,193,232, 2,255,200, 72,141, 68,133, 0,199, 0,144, 15, -/* 0x05f0 */ 5,195, 72,137, 68, 36, 40, 76,137,227, 73,141, 20, 44, 72,247, -/* 0x0600 */ 219,129,227,255, 15, 0, 0, 72,137,216, 72,133,219,116, 11,198, -/* 0x0610 */ 2, 0, 72,255,194, 72,255,200,235,243, 77,133,228,116, 29, 65, -/* 0x0620 */ 139, 85, 60, 76,137,230, 72,137,239,232,134,250,255,255,133,192, -/* 0x0630 */ 116, 10,191, 10, 0, 0, 0,232,204,251,255,255, 73,141, 4, 28, -/* 0x0640 */ 72, 1,197, 72, 59,108, 36, 8,115, 56, 72,133,237,116,120, 72, -/* 0x0650 */ 41,108, 36, 8, 65,139, 85, 60, 69, 49,201, 72,139,116, 36, 8, -/* 0x0660 */ 65,131,200,255,185, 18, 16, 0, 0, 72,137,239,232, 87,250,255, -/* 0x0670 */ 255, 72, 57,197,116, 81,191, 9, 0, 0, 0,232,136,251,255,255, -/* 0x0680 */ 235, 69, 77,133,246,116, 64, 73,131,196, 3, 65,129,228,255, 15, -/* 0x0690 */ 0, 0, 73,131,252, 3,119, 47, 76,137,230, 72,137,239,232, 21, -/* 0x06a0 */ 250,255,255,235, 34, 77,133,246,117, 29,131,232, 4,131,248, 1, -/* 0x06b0 */ 119, 21, 72,139, 68, 36, 24, 73, 1,133,144, 0, 0, 0, 73,141, -/* 0x06c0 */ 69, 16, 72,137, 68, 36, 40, 65,139, 69, 4,255, 68, 36, 20,193, -/* 0x06d0 */ 232, 2,137,192, 77,141,108,133, 0,139, 68, 36, 20,233,179,253, -/* 0x06e0 */ 255,255, 72,139, 68, 36, 40, 72,131,196,120, 91, 93, 65, 92, 65, -/* 0x06f0 */ 93, 65, 94, 65, 95,195, 65, 87, 73,137,207, 49,201, 65, 86, 69, -/* 0x0700 */ 49,246, 65, 85, 69, 49,237, 65, 84, 77,137,204, 85, 72,137,213, -/* 0x0710 */ 72,141, 87, 24, 83, 76,137,195, 72,131,236, 88,139,127, 24, 72, -/* 0x0720 */ 137,116, 36, 72, 72,139, 68, 36, 72, 72,141,116, 36, 32, 72,137, -/* 0x0730 */ 84, 36, 56, 72,137, 84, 36, 24, 76,137,194, 72,137,108, 36, 40, -/* 0x0740 */ 72,137,124, 36, 32, 72,141,124, 36, 48, 72,131,232, 24, 72,137, -/* 0x0750 */ 68, 36, 48, 72,137, 68, 36, 16,232,177,250,255,255, 80,131,201, -/* 0x0760 */ 255, 49,246, 73,137,217, 72,137,239, 72,141, 84, 36, 24, 65, 84, -/* 0x0770 */ 76,139,132, 36,160, 0, 0, 0,232,207,251,255,255, 72,137, 68, -/* 0x0780 */ 36, 16,139,117, 16, 72,141, 85, 32, 65, 90, 65, 91, 49,201, 57, -/* 0x0790 */ 241, 15,131,226, 0, 0, 0,131, 58, 14, 15,133,204, 0, 0, 0, -/* 0x07a0 */ 139,122, 8, 49,246, 49,192, 72,141, 60, 58, 49,210,232, 18,249, -/* 0x07b0 */ 255,255,133,192, 65,137,196,121, 10,191, 18, 0, 0, 0,232, 69, -/* 0x07c0 */ 250,255,255, 68,137,241, 76,137,250, 72,137,238, 68,137,231,232, -/* 0x07d0 */ 232,248,255,255, 73, 57,199,116, 10,191, 19, 0, 0, 0,232, 37, -/* 0x07e0 */ 250,255,255,139, 69, 0, 61,202,254,186,190,116, 7, 61,190,186, -/* 0x07f0 */ 254,202,117, 49, 72, 15,182,117, 7, 72,137,239, 72,141, 93, 8, -/* 0x0800 */ 72,107,246, 20,131,198, 8,232,144,248,255,255,139, 69, 4, 49, -/* 0x0810 */ 201, 57,193,115, 16,129, 59, 7, 0, 0, 1,116, 70,255,193, 72, -/* 0x0820 */ 131,195, 20,235,236, 72,199, 68, 36, 8, 0, 0, 0, 0, 65, 81, -/* 0x0830 */ 68,137,225, 69, 49,201, 49,210,106, 0, 68,137,246, 72,137,239, -/* 0x0840 */ 76,141, 68, 36, 24,232, 2,251,255,255, 73,137,197, 72,139, 68, -/* 0x0850 */ 36, 16, 68,137,231, 73,137, 69, 0,232, 98,248,255,255, 95, 65, -/* 0x0860 */ 88,235, 22, 68,139,115, 8,233, 87,255,255,255,139, 66, 4,255, -/* 0x0870 */ 193, 72, 1,194,233, 22,255,255,255, 72,131,196, 88, 76,137,232, -/* 0x0880 */ 91, 93, 65, 92, 65, 93, 65, 94, 65, 95,195 +/* 0x0200 */ 1, 87, 8, 72, 41, 23, 88,195, 65, 84, 73,137,212, 83, 72,137, +/* 0x0210 */ 251, 65, 80,232,184,255,255,255, 76, 1, 35, 76, 41, 99, 8, 94, +/* 0x0220 */ 91, 65, 92,195, 65, 81,232,133,254,255,255, 65, 85, 73,137,213, +/* 0x0230 */ 65, 84, 73,137,204, 85, 72,137,253, 83, 72,137,243, 72,131,236, +/* 0x0240 */ 40, 72,131, 62, 0, 15,132, 19, 1, 0, 0, 72,141,116, 36, 16, +/* 0x0250 */ 186, 12, 0, 0, 0, 72,137,239,232,115,255,255,255,131,124, 36, +/* 0x0260 */ 16, 0,139, 68, 36, 20,117, 43, 61, 85, 80, 88, 33,116, 10,191, +/* 0x0270 */ 2, 0, 0, 0,232,171,255,255,255, 72,131,125, 0, 0, 15,132, +/* 0x0280 */ 218, 0, 0, 0,191, 3, 0, 0, 0,232,150,255,255,255,233,203, +/* 0x0290 */ 0, 0, 0,133,192,117, 10,191, 4, 0, 0, 0,232,131,255,255, +/* 0x02a0 */ 255,139, 68, 36, 16, 57, 68, 36, 20,119, 7,137,192, 72, 59, 3, +/* 0x02b0 */ 118, 10,191, 5, 0, 0, 0,232,104,255,255,255,139,116, 36, 20, +/* 0x02c0 */ 139, 68, 36, 16, 76,139, 75, 8, 57,198,115,108,137,192, 68, 15, +/* 0x02d0 */ 182, 68, 36, 24, 72,139,125, 8, 72,137, 68, 36, 8, 72,141, 76, +/* 0x02e0 */ 36, 8, 76,137,202, 65,255,213,133,192,117, 11,139, 68, 36, 16, +/* 0x02f0 */ 72, 57, 68, 36, 8,116, 10,191, 7, 0, 0, 0,232, 35,255,255, +/* 0x0300 */ 255, 15,182, 76, 36, 25,132,201, 15,149,194, 49,192, 77,133,228, +/* 0x0310 */ 15,149,192,133,194,116, 19, 15,182, 84, 36, 26, 15,182,201, 72, +/* 0x0320 */ 139,123, 8,139,116, 36, 8, 65,255,212,139, 68, 36, 20, 72, 1, +/* 0x0330 */ 69, 8, 72, 41, 69, 0,235, 13,137,242, 72,137,239, 76,137,206, +/* 0x0340 */ 232,139,254,255,255,139, 84, 36, 16, 72,139, 3, 72, 1, 83, 8, +/* 0x0350 */ 72, 41,208, 72,133,192, 72,137, 3,233,231,254,255,255, 72,131, +/* 0x0360 */ 196, 40, 91, 93, 65, 92, 65, 93,195, 65, 87, 69, 49,255, 65, 86, +/* 0x0370 */ 73,137,254, 73,131,198, 32, 65, 85, 73,137,213, 65, 84, 73,131, +/* 0x0380 */ 204,255, 85, 83, 49,219, 72,131,236,120, 76,137, 76, 36, 32, 68, +/* 0x0390 */ 139, 79, 12, 72,139,132, 36,176, 0, 0, 0,137,116, 36, 52, 76, +/* 0x03a0 */ 137,246, 72,137,124, 36, 56,137, 76, 36, 48, 65,131,249, 7, 76, +/* 0x03b0 */ 137, 68, 36, 40, 72,199, 68, 36, 16, 0, 0, 0, 0, 72,137, 68, +/* 0x03c0 */ 36, 24, 72,199, 68, 36, 96, 0, 0, 0, 0, 72,199, 68, 36,104, +/* 0x03d0 */ 0, 0, 0, 0,139, 71, 16,116, 11,246, 71, 26, 32,189, 16, 0, +/* 0x03e0 */ 0, 0,116, 2, 49,237,129,197, 2, 16, 0, 0,133,192,126, 96, +/* 0x03f0 */ 137,199,131, 62, 25,117, 73, 76,139, 70, 32, 77,133,192,116, 64, +/* 0x0400 */ 72,139, 78, 24, 72,133,201,117, 6, 64,246,197, 16,117, 49, 65, +/* 0x0410 */ 131,249, 7, 15,148,194, 49,192, 73,131,252,255, 15,148,192,133, +/* 0x0420 */ 194,116, 11,137,232,131,200, 16, 72,133,201, 15, 69,232, 73,141, +/* 0x0430 */ 4, 8, 73, 57,204, 76, 15, 71,225, 72, 57,195, 72, 15, 66,216, +/* 0x0440 */ 139, 70, 4,193,232, 2,255,207,137,192, 72,141, 52,134,117,162, +/* 0x0450 */ 73,129,228, 0,240,255,255, 76, 41,227, 72,129,195,255, 15, 0, +/* 0x0460 */ 0, 72,129,227, 0,240,255,255, 64,246,197, 16,116, 14, 72,137, +/* 0x0470 */ 222, 76,137,231, 77,137,231,232, 60,252,255,255, 69, 49,201, 65, +/* 0x0480 */ 131,200,255, 49,210, 76,137,255,137,233, 72,137,222,232, 54,252, +/* 0x0490 */ 255,255,169,255, 15, 0, 0, 73,137,199,116, 10,191, 6, 0, 0, +/* 0x04a0 */ 0,232,126,253,255,255, 77, 41,231, 77,133,237, 76,137,124, 36, +/* 0x04b0 */ 8,116, 18, 73,139, 69, 0, 72,137, 68, 36, 96, 73,139, 69, 8, +/* 0x04c0 */ 72,137, 68, 36,104,199, 68, 36, 4, 0, 0, 0, 0, 49,210, 72, +/* 0x04d0 */ 139, 68, 36, 56, 59, 80, 16, 15,131,179, 2, 0, 0, 65,139, 6, +/* 0x04e0 */ 131,248, 25, 15,133,107, 2, 0, 0, 77,133,237,116,116, 73,131, +/* 0x04f0 */ 126, 48, 0,116,109, 72,141,116, 36, 80,186, 12, 0, 0, 0, 76, +/* 0x0500 */ 137,239,232, 1,253,255,255, 15,182, 68, 36, 91, 59, 68, 36, 4, +/* 0x0510 */ 116, 80, 72,139, 68, 36, 96, 73,137, 69, 0, 72,139, 68, 36,104, +/* 0x0520 */ 73,137, 69, 8, 72,141,116, 36, 80,186, 12, 0, 0, 0, 76,137, +/* 0x0530 */ 239,232,210,252,255,255, 15,182, 68, 36, 91, 59, 68, 36, 4,116, +/* 0x0540 */ 33,139, 84, 36, 84, 73,139, 69, 0, 72, 41,208, 73, 3, 85, 8, +/* 0x0550 */ 72,131,232, 12, 73,137, 69, 0, 72,131,194, 12, 73,137, 85, 8, +/* 0x0560 */ 235,194, 73,139, 86, 32, 72,133,210,117, 45, 77,133,237, 15,132, +/* 0x0570 */ 2, 2, 0, 0,139, 84, 36, 84, 73,139, 69, 0, 72, 41,208, 73, +/* 0x0580 */ 3, 85, 8, 72,131,232, 12, 73,137, 69, 0, 72,131,194, 12, 73, +/* 0x0590 */ 137, 85, 8,233,222, 1, 0, 0, 73,139, 70, 48, 72,139,124, 36, +/* 0x05a0 */ 8, 72,137, 68, 36, 64, 73, 3,126, 24, 73,137,196, 72,137,251, +/* 0x05b0 */ 72,137,253, 72,137,124, 36, 72,129,227,255, 15, 0, 0, 76,141, +/* 0x05c0 */ 60, 58, 72, 41,221, 73, 1,220,116,107, 77,133,237, 76,137,230, +/* 0x05d0 */ 116, 7, 73,141,116, 36, 3,235, 10, 72,133,192,185, 18, 0, 0, +/* 0x05e0 */ 0,117, 10, 77,133,237,185, 18, 16, 0, 0,117, 9, 72,133,192, +/* 0x05f0 */ 139, 84, 36, 48,117, 3,131,202,255, 68,139, 76, 36, 52, 69, 3, +/* 0x0600 */ 78, 40, 65,137,208, 72,137,239,186, 3, 0, 0, 0,232,182,250, +/* 0x0610 */ 255,255, 72, 57,232, 72,137,195,116, 10,191, 8, 0, 0, 0,232, +/* 0x0620 */ 0,252,255,255, 72,139, 68, 36, 40, 72,137,221, 72,131, 56, 0, +/* 0x0630 */ 117, 3, 72,137, 24, 77,133,237,116, 45, 73,131,126, 48, 0,116, +/* 0x0640 */ 38, 73,131,126, 40, 0,117, 8, 72,139, 84, 36, 40, 72,137, 42, +/* 0x0650 */ 72,139, 76, 36, 24, 72,139, 84, 36, 32, 72,141,116, 36, 64, 76, +/* 0x0660 */ 137,239,232,196,251,255,255, 77,133,237, 15,149,194, 49,192, 77, +/* 0x0670 */ 133,228, 15,149,192,133,194,116, 51, 73,131,126, 40, 0,117, 44, +/* 0x0680 */ 65,131,126, 64, 0,116, 37, 76,137,240, 72, 43, 68, 36, 56, 72, +/* 0x0690 */ 131,224,252,139, 68, 5,120,193,232, 2,255,200, 72,141, 68,133, +/* 0x06a0 */ 0,199, 0,144, 15, 5,195, 72,137, 68, 36, 16, 76,137,227, 73, +/* 0x06b0 */ 141, 20, 44, 72,247,219,129,227,255, 15, 0, 0, 72,137,216, 72, +/* 0x06c0 */ 133,219,116, 11,198, 2, 0, 72,255,194, 72,255,200,235,243, 77, +/* 0x06d0 */ 133,228,116, 29, 65,139, 86, 60, 76,137,230, 72,137,239,232,209, +/* 0x06e0 */ 249,255,255,133,192,116, 10,191, 10, 0, 0, 0,232, 51,251,255, +/* 0x06f0 */ 255, 73,141, 4, 28, 72, 1,197, 76, 57,253,115, 52, 72,133,237, +/* 0x0700 */ 116,116, 65,139, 86, 60, 73, 41,239, 69, 49,201, 65,131,200,255, +/* 0x0710 */ 185, 18, 16, 0, 0, 76,137,254, 72,137,239,232,168,249,255,255, +/* 0x0720 */ 72, 57,197,116, 81,191, 9, 0, 0, 0,232,245,250,255,255,235, +/* 0x0730 */ 69, 77,133,237,116, 64, 73,131,196, 3, 65,129,228,255, 15, 0, +/* 0x0740 */ 0, 73,131,252, 3,119, 47, 76,137,230, 72,137,239,232,102,249, +/* 0x0750 */ 255,255,235, 34, 77,133,237,117, 29,131,232, 4,131,248, 1,119, +/* 0x0760 */ 21, 72,139, 68, 36, 8, 73, 1,134,144, 0, 0, 0, 73,141, 86, +/* 0x0770 */ 16, 72,137, 84, 36, 16, 65,139, 70, 4,255, 68, 36, 4,139, 84, +/* 0x0780 */ 36, 4,193,232, 2,137,192, 77,141, 52,134,233, 63,253,255,255, +/* 0x0790 */ 72,139, 68, 36, 16, 72,131,196,120, 91, 93, 65, 92, 65, 93, 65, +/* 0x07a0 */ 94, 65, 95,195, 65, 87, 73,137,207, 49,201, 65, 86, 69, 49,246, +/* 0x07b0 */ 65, 85, 69, 49,237, 65, 84, 77,137,204, 85, 72,137,213, 72,141, +/* 0x07c0 */ 87, 24, 83, 76,137,195, 72,131,236, 88,139,127, 24, 72,137,116, +/* 0x07d0 */ 36, 72, 72,139, 68, 36, 72, 72,141,116, 36, 32, 72,137, 84, 36, +/* 0x07e0 */ 56, 72,137, 84, 36, 24, 76,137,194, 72,137,108, 36, 40, 72,137, +/* 0x07f0 */ 124, 36, 32, 72,141,124, 36, 48, 72,131,232, 24, 72,137, 68, 36, +/* 0x0800 */ 48, 72,137, 68, 36, 16,232, 32,250,255,255, 80,131,201,255, 49, +/* 0x0810 */ 246, 73,137,217, 72,137,239, 72,141, 84, 36, 24, 65, 84, 76,139, +/* 0x0820 */ 132, 36,160, 0, 0, 0,232, 62,251,255,255, 72,137, 68, 36, 16, +/* 0x0830 */ 139,117, 16, 72,141, 85, 32, 65, 92, 88, 49,201, 57,241, 15,131, +/* 0x0840 */ 226, 0, 0, 0,131, 58, 14, 15,133,204, 0, 0, 0,139,122, 8, +/* 0x0850 */ 49,246, 49,192, 72,141, 60, 58, 49,210,232,101,248,255,255,133, +/* 0x0860 */ 192, 65,137,196,121, 10,191, 18, 0, 0, 0,232,180,249,255,255, +/* 0x0870 */ 68,137,241, 76,137,250, 72,137,238, 68,137,231,232, 59,248,255, +/* 0x0880 */ 255, 73, 57,199,116, 10,191, 19, 0, 0, 0,232,148,249,255,255, +/* 0x0890 */ 139, 69, 0, 61,202,254,186,190,116, 7, 61,190,186,254,202,117, +/* 0x08a0 */ 49, 72, 15,182,117, 7, 72,137,239, 72,141, 93, 8, 72,107,246, +/* 0x08b0 */ 20,131,198, 8,232,227,247,255,255,139, 69, 4, 49,201, 57,193, +/* 0x08c0 */ 115, 16,129, 59, 7, 0, 0, 1,116, 70,255,193, 72,131,195, 20, +/* 0x08d0 */ 235,236, 72,199, 68, 36, 8, 0, 0, 0, 0, 83, 69, 49,201, 68, +/* 0x08e0 */ 137,225, 49,210,106, 0, 68,137,246, 72,137,239, 76,141, 68, 36, +/* 0x08f0 */ 24,232,115,250,255,255, 73,137,197, 72,139, 68, 36, 16, 68,137, +/* 0x0900 */ 231, 73,137, 69, 0,232,182,247,255,255, 65, 90, 65, 91,235, 22, +/* 0x0910 */ 68,139,115, 8,233, 87,255,255,255,139, 66, 4,255,193, 72, 1, +/* 0x0920 */ 194,233, 22,255,255,255, 72,131,196, 88, 76,137,232, 91, 93, 65, +/* 0x0930 */ 92, 65, 93, 65, 94, 65, 95,195 }; diff --git a/src/stub/arm.v5a-darwin.macho-fold.h b/src/stub/arm.v5a-darwin.macho-fold.h index 0ba649da..7480ea04 100644 --- a/src/stub/arm.v5a-darwin.macho-fold.h +++ b/src/stub/arm.v5a-darwin.macho-fold.h @@ -1,5 +1,5 @@ /* arm.v5a-darwin.macho-fold.h - created from arm.v5a-darwin.macho-fold.bin, 2488 (0x9b8) bytes + created from arm.v5a-darwin.macho-fold.bin, 2668 (0xa6c) bytes This file is part of the UPX executable compressor. @@ -31,15 +31,15 @@ */ -#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_SIZE 2488 -#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_ADLER32 0xac8114ab -#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_CRC32 0x5aed6310 +#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_SIZE 2668 +#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_ADLER32 0x7cca544e +#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_CRC32 0x1387c871 -unsigned char stub_arm_v5a_darwin_macho_fold[2488] = { +unsigned char stub_arm_v5a_darwin_macho_fold[2668] = { /* 0x0000 */ 24, 48,154,229, 2,202,160,227, 12, 0, 83,225, 12, 48,160, 49, /* 0x0010 */ 13,128,160,225, 3,208, 77,224, 13, 32,160,225, 11, 16,160,225, /* 0x0020 */ 10, 0,160,225, 16, 96,136,226, 52, 80,143,226, 9, 64,160,225, -/* 0x0030 */ 112, 0, 45,233,241, 1, 0,235, 56,160,144,229, 0,144,144,229, +/* 0x0030 */ 112, 0, 45,233, 30, 2, 0,235, 56,160,144,229, 0,144,144,229, /* 0x0040 */ 8,208,160,225, 0, 0,157,229, 44, 0, 0,235, 4, 0,157,229, /* 0x0050 */ 8, 16,157,229, 73,112,160,227, 10,224,160,225, 16,208,141,226, /* 0x0060 */ 25,255, 47,225,255, 48, 3,226, 80, 0, 83,227, 14,240,160, 17, @@ -98,98 +98,109 @@ unsigned char stub_arm_v5a_darwin_macho_fold[2488] = { /* 0x03b0 */ 4, 16,148,229,158,255,255,235, 4, 48,157,229, 6, 0,148,232, /* 0x03c0 */ 3, 32,130,224, 1, 16, 99,224, 6, 0,132,232, 0, 48,148,229, /* 0x03d0 */ 0, 0, 83,227,180,255,255, 26, 20,208,141,226,240,128,189,232, -/* 0x03e0 */ 85, 80, 88, 33,240, 79, 45,233, 12, 64,144,229, 48,208, 77,226, -/* 0x03f0 */ 7, 0, 84,227, 0,144,160,225, 12, 16,141,229, 2,160,160,225, -/* 0x0400 */ 8, 48,141,229, 28,112,128,226, 16, 96,144,229, 3, 0, 0, 10, -/* 0x0410 */ 24, 48,144,229, 2, 6, 19,227, 16, 48,160, 3, 0, 0, 0, 10, -/* 0x0420 */ 0, 48,160,227, 1, 90,131,226, 0,192,160,227, 2, 80,133,226, -/* 0x0430 */ 7, 16,160,225, 0, 0,224,227, 12,224,160,225, 23, 0, 0,234, -/* 0x0440 */ 0, 48,145,229, 1, 0, 83,227, 17, 0, 0, 26, 28, 32,145,229, -/* 0x0450 */ 0, 0, 82,227, 14, 0, 0, 10, 24, 48,145,229, 0, 0, 83,227, -/* 0x0460 */ 3, 32,130,224, 1, 0, 0, 26, 16, 0, 21,227, 8, 0, 0, 26, -/* 0x0470 */ 7, 0, 84,227, 1, 0,112, 3, 1, 0, 0, 26, 0, 0, 83,227, -/* 0x0480 */ 16, 80,133, 19, 2, 0, 92,225, 2,192,160, 49, 3, 0, 80,225, -/* 0x0490 */ 3, 0,160, 33, 4, 48,145,229, 3, 48,195,227, 3, 16,129,224, -/* 0x04a0 */ 6, 0, 94,225, 1,224,142,226,228,255,255,186,255,110,192,227, -/* 0x04b0 */ 15, 96,198,227, 12, 48,102,224,255, 62,131,226, 15, 48,131,226, -/* 0x04c0 */ 255, 78,195,227, 16, 0, 21,226, 15, 64,196,227, 3, 0, 0, 10, -/* 0x04d0 */ 6, 0,160,225, 4, 16,160,225, 18,255,255,235, 6, 0,160,225, -/* 0x04e0 */ 0,128,160,227, 4, 16,160,225, 5, 48,160,225, 0,192,224,227, -/* 0x04f0 */ 8, 32,160,225, 0,192,141,229, 4,128,141,229, 19,255,255,235, -/* 0x0500 */ 0, 58,160,225, 35, 58,160,225, 8, 0, 83,225, 0, 64,160,225, -/* 0x0510 */ 6, 0,160, 19, 68,255,255, 27, 4, 64,102,224, 8,176,160,225, -/* 0x0520 */ 16, 64,141,229, 20,128,141,229,163, 0, 0,234, 0, 48,151,229, -/* 0x0530 */ 1, 0, 83,227,165, 0, 0, 26, 28, 48,151,229, 0, 0, 83,227, -/* 0x0540 */ 13, 0, 0, 26, 28, 16,141,226, 12, 32,160,227, 10, 0,160,225, -/* 0x0550 */ 55,255,255,235, 4, 48,154,229, 0, 16,151,229, 32, 32,157,229, -/* 0x0560 */ 1, 0, 81,227, 2, 48,131,224, 4, 48,138,229,140, 0, 0, 26, -/* 0x0570 */ 28, 48,151,229, 0, 0, 83,227,137, 0, 0, 10, 24, 48,151,229, -/* 0x0580 */ 16, 32,157,229, 3, 48,130,224, 36, 0,151,229, 28, 16,151,229, -/* 0x0590 */ 3, 42,160,225, 34, 42,160,225, 1, 16,131,224, 2, 96,144,224, -/* 0x05a0 */ 40, 0,141,229, 44, 48,141,229, 24, 16,141,229, 3, 80, 98,224, -/* 0x05b0 */ 26, 0, 0, 10, 0, 0, 90,227, 3, 0, 0, 26, 0, 0, 80,227, -/* 0x05c0 */ 8,224,157, 21, 18, 48,160, 19, 1, 0, 0, 26, 36, 50,159,229, -/* 0x05d0 */ 0,224,224,227, 32,192,151,229, 12, 32,157,229, 5, 0,160,225, -/* 0x05e0 */ 12,192,130,224, 6, 16,160,225, 3, 32,160,227, 0,224,141,229, -/* 0x05f0 */ 4,192,141,229,213,254,255,235, 5, 0, 80,225, 0, 64,160,225, -/* 0x0600 */ 8, 0,160, 19, 8,255,255, 27, 84, 32,157,229, 0, 48,146,229, -/* 0x0610 */ 0, 0, 83,227, 84, 48,157, 5, 0, 64,131, 5, 4, 80,160,225, -/* 0x0620 */ 0, 0, 90,227,108, 0, 0, 10, 36, 48,151,229, 0, 0, 83,227, -/* 0x0630 */ 8, 0, 0, 10, 32, 48,151,229, 0, 0, 83,227, 84, 32,157, 5, -/* 0x0640 */ 10, 0,160,225, 0, 80,130, 5, 40, 16,141,226, 88, 32,141,226, -/* 0x0650 */ 12, 0,146,232, 13,255,255,235, 0, 0, 86,226, 1, 0,160, 19, -/* 0x0660 */ 0, 0, 80,227, 18, 0, 0, 10, 32, 48,151,229, 0, 0, 83,227, -/* 0x0670 */ 15, 0, 0, 26, 48, 48,151,229, 0, 0, 83,227, 12, 0, 0, 10, -/* 0x0680 */ 7, 48,105,224, 3, 48,195,227, 5, 48,131,224, 96, 48,147,229, -/* 0x0690 */ 3, 48,195,227, 3, 48,133,224,239, 36,160,227, 8, 32, 3,229, -/* 0x06a0 */ 84, 33,159,229, 8,176, 67,226, 1,128,160,227, 4, 32, 3,229, -/* 0x06b0 */ 0, 0, 0,234, 1,128,160,227, 0, 48,102,226, 3, 74,160,225, -/* 0x06c0 */ 36, 74,160,225, 0, 0, 84,227, 6, 0, 0, 10, 5, 16,134,224, -/* 0x06d0 */ 0, 32,160,227, 0, 48,160,227, 1, 48,194,231, 1, 32,130,226, -/* 0x06e0 */ 4, 0, 82,225,250,255,255, 26, 0, 0, 80,227, 6, 0, 0, 10, -/* 0x06f0 */ 5, 0,160,225, 6, 16,160,225, 44, 32,151,229,142,254,255,235, -/* 0x0700 */ 0, 0, 80,227, 10, 0,160, 19,199,254,255, 27, 5, 48,134,224, -/* 0x0710 */ 3, 64,132,224, 24, 48,157,229, 3, 0, 84,225, 15, 0, 0, 42, -/* 0x0720 */ 0, 0, 84,227, 30, 0, 0, 10, 0,192,224,227, 44, 32,151,229, -/* 0x0730 */ 3, 16,100,224, 0,192,141,229, 4, 0,160,225, 1,192,140,226, -/* 0x0740 */ 176, 48,159,229, 4,192,141,229,128,254,255,235, 0, 0, 84,225, -/* 0x0750 */ 19, 0, 0, 10, 9, 0,160,227,179,254,255,235, 16, 0, 0,234, -/* 0x0760 */ 0, 0, 88,227, 14, 0, 0, 10, 3, 48,134,226, 3, 26,160,225, -/* 0x0770 */ 33, 26,160,225, 3, 0, 81,227, 9, 0, 0,138, 4, 0,160,225, -/* 0x0780 */ 104,254,255,235, 6, 0, 0,234, 4, 48, 67,226, 1, 0, 83,227, -/* 0x0790 */ 76, 48,151,149, 16, 32,157,149, 2, 48,131,144, 76, 48,135,149, -/* 0x07a0 */ 16,176,135,146, 4, 48,151,229, 3, 48,195,227, 3,112,135,224, -/* 0x07b0 */ 20, 48,157,229, 1, 48,131,226, 20, 48,141,229, 16, 48,153,229, -/* 0x07c0 */ 20, 32,157,229, 3, 0, 82,225, 87,255,255, 58, 6, 0, 0,234, -/* 0x07d0 */ 0, 0, 90,227,242,255,255, 26,234,255,255,234, 0, 0, 86,226, -/* 0x07e0 */ 1, 0,160, 19, 10,128,160,225,178,255,255,234, 11, 0,160,225, -/* 0x07f0 */ 48,208,141,226,240,143,189,232, 18, 16, 0, 0, 30,255, 47,225, -/* 0x0800 */ 240, 67, 45,233, 44,208, 77,226, 12, 16,141,229, 12, 16,157,229, -/* 0x0810 */ 24,192,144,229, 24, 16, 65,226, 24, 0,128,226, 72, 64,157,229, -/* 0x0820 */ 36, 0,141,229, 32, 16,141,229, 32,128,141,226, 0, 3,152,232, -/* 0x0830 */ 2, 80,160,225, 32, 0,141,226, 24, 16,141,226, 4, 32,160,225, -/* 0x0840 */ 3,112,160,225, 0, 48,160,227, 24,192,141,229, 16,128,141,229, -/* 0x0850 */ 20,144,141,229, 28, 80,141,229,140,254,255,235, 80,192,157,229, -/* 0x0860 */ 0,192,141,229, 76,192,157,229, 0, 16,160,227, 16, 32,141,226, -/* 0x0870 */ 5, 0,160,225, 0, 48,224,227, 16, 16,141,233,216,254,255,235, -/* 0x0880 */ 0,128,160,225, 16, 0,149,229, 28, 32,133,226, 0, 16,160,227, -/* 0x0890 */ 62, 0, 0,234, 0, 48,146,229, 14, 0, 83,227, 57, 0, 0, 26, -/* 0x08a0 */ 8, 0,146,229, 0, 16,160,227, 0, 0,130,224, 1, 32,160,225, -/* 0x08b0 */ 13,254,255,235, 0, 96, 80,226, 18, 0,160,179, 90,254,255,187, -/* 0x08c0 */ 0, 64,160,227, 6, 0,160,225, 5, 16,160,225, 7, 32,160,225, -/* 0x08d0 */ 4, 48,160,225, 39,254,255,235, 0, 0, 87,225, 19, 0,160, 19, -/* 0x08e0 */ 81,254,255, 27, 0, 32,149,229,188, 48,159,229, 3, 0, 82,225, -/* 0x08f0 */ 2, 0, 0, 10,180, 48,159,229, 3, 0, 82,225, 18, 0, 0, 26, -/* 0x0900 */ 7, 48,213,229, 20, 32,160,227,147, 2, 1,224, 5, 0,160,225, -/* 0x0910 */ 8, 16,129,226, 31,254,255,235, 4,192,149,229, 8, 16,133,226, -/* 0x0920 */ 0, 0,160,227, 5, 0, 0,234, 0, 32,145,229,128, 48,159,229, -/* 0x0930 */ 3, 0, 82,225, 8, 64,145, 5,225,255,255, 10, 20, 16,129,226, -/* 0x0940 */ 12, 0, 80,225, 1, 0,128,226,246,255,255, 26, 0,224,160,227, -/* 0x0950 */ 44,192,141,226, 4,224, 44,229, 4, 16,160,225, 5, 0,160,225, -/* 0x0960 */ 14, 32,160,225, 6, 48,160,225, 0, 80,141,232, 8,224,141,229, -/* 0x0970 */ 155,254,255,235, 0, 64,160,225, 0,128,128,229, 6, 0,160,225, -/* 0x0980 */ 222,253,255,235, 5, 0, 0,234, 4, 48,146,229, 3, 32,130,224, -/* 0x0990 */ 0, 0, 81,225, 1, 16,129,226,189,255,255, 26, 0, 64,160,227, -/* 0x09a0 */ 4, 0,160,225, 44,208,141,226,240,131,189,232,202,254,186,190, -/* 0x09b0 */ 190,186,254,202, 7, 0, 0, 1 +/* 0x03e0 */ 85, 80, 88, 33, 48, 64, 45,233, 0, 64,160,225, 2, 80,160,225, +/* 0x03f0 */ 143,255,255,235, 12, 0,148,232, 5, 32,130,224, 3, 48,101,224, +/* 0x0400 */ 12, 0,132,232, 48,128,189,232,240, 79, 45,233, 12, 64,144,229, +/* 0x0410 */ 56,208, 77,226, 7, 0, 84,227, 0,144,160,225, 12, 16,141,229, +/* 0x0420 */ 2,112,160,225, 8, 48,141,229, 28,128,128,226, 16, 96,144,229, +/* 0x0430 */ 3, 0, 0, 10, 24, 48,144,229, 2, 6, 19,227, 16, 48,160, 3, +/* 0x0440 */ 0, 0, 0, 10, 0, 48,160,227, 1, 90,131,226, 0,192,160,227, +/* 0x0450 */ 2, 80,133,226, 8, 16,160,225, 0, 0,224,227, 12,224,160,225, +/* 0x0460 */ 23, 0, 0,234, 0, 48,145,229, 1, 0, 83,227, 17, 0, 0, 26, +/* 0x0470 */ 28, 32,145,229, 0, 0, 82,227, 14, 0, 0, 10, 24, 48,145,229, +/* 0x0480 */ 0, 0, 83,227, 3, 32,130,224, 1, 0, 0, 26, 16, 0, 21,227, +/* 0x0490 */ 8, 0, 0, 26, 7, 0, 84,227, 1, 0,112, 3, 1, 0, 0, 26, +/* 0x04a0 */ 0, 0, 83,227, 16, 80,133, 19, 2, 0, 92,225, 2,192,160, 49, +/* 0x04b0 */ 3, 0, 80,225, 3, 0,160, 33, 4, 48,145,229, 3, 48,195,227, +/* 0x04c0 */ 3, 16,129,224, 6, 0, 94,225, 1,224,142,226,228,255,255,186, +/* 0x04d0 */ 255,110,192,227, 15, 96,198,227, 12, 48,102,224,255, 62,131,226, +/* 0x04e0 */ 15, 48,131,226,255, 78,195,227, 16, 0, 21,226, 15, 64,196,227, +/* 0x04f0 */ 3, 0, 0, 10, 6, 0,160,225, 4, 16,160,225, 9,255,255,235, +/* 0x0500 */ 6, 0,160,225, 0,224,160,227, 4, 16,160,225, 5, 48,160,225, +/* 0x0510 */ 0,192,224,227, 14, 32,160,225, 0, 80,141,232, 11,255,255,235, +/* 0x0520 */ 0, 58,160,225, 35, 58,160,225, 0, 0, 83,227, 0, 64,160,225, +/* 0x0530 */ 6, 0,160, 19, 60,255,255, 27, 0, 0, 87,227, 4, 32,151, 21, +/* 0x0540 */ 0, 48,151, 21, 32, 32,141, 21, 0, 32,160,227, 4, 64,102,224, +/* 0x0550 */ 2,176,160,225, 20, 64,141,229, 28,112,141, 5, 32,112,141, 5, +/* 0x0560 */ 28, 48,141, 21, 16, 32,141,229,196, 0, 0,234, 0, 48,152,229, +/* 0x0570 */ 1, 0, 83,227,178, 0, 0, 26, 0, 0, 87,227, 30, 0, 0, 10, +/* 0x0580 */ 36, 48,152,229, 0, 0, 83,227, 27, 0, 0, 10, 36, 64,141,226, +/* 0x0590 */ 7, 0,160,225, 4, 16,160,225, 12, 32,160,227,144,255,255,235, +/* 0x05a0 */ 47, 48,221,229, 11, 0, 83,225, 19, 0, 0, 10, 28, 32,141,226, +/* 0x05b0 */ 12, 0,146,232, 12, 0,135,232, 7, 0,160,225, 4, 16,160,225, +/* 0x05c0 */ 12, 32,160,227,134,255,255,235, 47, 48,221,229, 11, 0, 83,225, +/* 0x05d0 */ 9, 0, 0, 10, 40, 48,157,229, 0, 32,151,229, 4, 16,151,229, +/* 0x05e0 */ 2, 32, 99,224, 1, 16,131,224, 12, 32, 66,226, 12, 16,129,226, +/* 0x05f0 */ 0, 32,135,229, 4, 16,135,229,238,255,255,234, 28, 16,152,229, +/* 0x0600 */ 0, 0, 81,227, 11, 0, 0, 26, 0, 0, 87,227,151, 0, 0, 10, +/* 0x0610 */ 40, 48,157,229, 0, 32,151,229, 4, 16,151,229, 2, 32, 99,224, +/* 0x0620 */ 1, 16,131,224, 12, 32, 66,226, 12, 16,129,226, 0, 32,135,229, +/* 0x0630 */ 4, 16,135,229,141, 0, 0,234, 24, 32,152,229, 20, 48,157,229, +/* 0x0640 */ 2, 32,131,224, 36, 0,152,229, 2, 58,160,225, 35, 58,160,225, +/* 0x0650 */ 1, 16,130,224, 3, 96,144,224, 48, 0,141,229, 52, 32,141,229, +/* 0x0660 */ 24, 16,141,229, 2, 80, 99,224, 26, 0, 0, 10, 0, 0, 87,227, +/* 0x0670 */ 3, 0, 0, 26, 0, 0, 80,227, 8,224,157, 21, 18, 48,160, 19, +/* 0x0680 */ 1, 0, 0, 26, 32, 50,159,229, 0,224,224,227, 32,192,152,229, +/* 0x0690 */ 12, 32,157,229, 5, 0,160,225, 12,192,130,224, 6, 16,160,225, +/* 0x06a0 */ 3, 32,160,227, 0,224,141,229, 4,192,141,229,167,254,255,235, +/* 0x06b0 */ 5, 0, 80,225, 0, 64,160,225, 8, 0,160, 19,218,254,255, 27, +/* 0x06c0 */ 92, 32,157,229, 0, 48,146,229, 0, 0, 83,227, 92, 48,157, 5, +/* 0x06d0 */ 0, 64,131, 5, 4, 80,160,225, 0, 0, 87,227,107, 0, 0, 10, +/* 0x06e0 */ 36, 48,152,229, 0, 0, 83,227, 8, 0, 0, 10, 32, 48,152,229, +/* 0x06f0 */ 0, 0, 83,227, 92, 32,157, 5, 7, 0,160,225, 0, 80,130, 5, +/* 0x0700 */ 48, 16,141,226, 96, 32,141,226, 12, 0,146,232,223,254,255,235, +/* 0x0710 */ 0, 0, 86,226, 1, 0,160, 19, 0, 0, 80,227, 19, 0, 0, 10, +/* 0x0720 */ 32, 48,152,229, 0, 0, 83,227, 16, 0, 0, 26, 48, 48,152,229, +/* 0x0730 */ 0, 0, 83,227, 13, 0, 0, 10, 8, 48,105,224, 3, 48,195,227, +/* 0x0740 */ 5, 48,131,224, 96, 48,147,229, 3, 48,195,227, 3, 48,133,224, +/* 0x0750 */ 8, 32, 67,226, 16, 32,141,229,239, 36,160,227, 8, 32, 3,229, +/* 0x0760 */ 72, 33,159,229, 1,160,160,227, 4, 32, 3,229, 0, 0, 0,234, +/* 0x0770 */ 1,160,160,227, 0, 48,102,226, 3, 74,160,225, 36, 74,160,225, +/* 0x0780 */ 0, 0, 84,227, 6, 0, 0, 10, 5, 16,134,224, 0, 32,160,227, +/* 0x0790 */ 0, 48,160,227, 1, 48,194,231, 1, 32,130,226, 4, 0, 82,225, +/* 0x07a0 */ 250,255,255, 26, 0, 0, 80,227, 6, 0, 0, 10, 5, 0,160,225, +/* 0x07b0 */ 6, 16,160,225, 44, 32,152,229, 95,254,255,235, 0, 0, 80,227, +/* 0x07c0 */ 10, 0,160, 19,152,254,255, 27, 5, 48,134,224, 3, 64,132,224, +/* 0x07d0 */ 24, 48,157,229, 3, 0, 84,225, 15, 0, 0, 42, 0, 0, 84,227, +/* 0x07e0 */ 34, 0, 0, 10, 0,192,224,227, 44, 32,152,229, 3, 16,100,224, +/* 0x07f0 */ 0,192,141,229, 4, 0,160,225, 1,192,140,226,168, 48,159,229, +/* 0x0800 */ 4,192,141,229, 81,254,255,235, 0, 0, 84,225, 23, 0, 0, 10, +/* 0x0810 */ 9, 0,160,227,132,254,255,235, 20, 0, 0,234, 0, 0, 90,227, +/* 0x0820 */ 18, 0, 0, 10, 3, 48,134,226, 3, 26,160,225, 33, 26,160,225, +/* 0x0830 */ 3, 0, 81,227, 13, 0, 0,138, 4, 0,160,225, 57,254,255,235, +/* 0x0840 */ 10, 0, 0,234, 0, 0, 87,227, 8, 0, 0, 26, 4, 48, 67,226, +/* 0x0850 */ 1, 0, 83,227, 5, 0, 0,138, 76, 48,152,229, 20, 32,157,229, +/* 0x0860 */ 2, 48,131,224, 76, 48,136,229, 16, 48,136,226, 16, 48,141,229, +/* 0x0870 */ 4, 48,152,229, 3, 48,195,227, 3,128,136,224, 1,176,139,226, +/* 0x0880 */ 16, 48,153,229, 3, 0, 91,225, 55,255,255, 58, 3, 0, 0,234, +/* 0x0890 */ 0, 0, 86,226, 1, 0,160, 19, 7,160,160,225,180,255,255,234, +/* 0x08a0 */ 16, 0,157,229, 56,208,141,226,240,143,189,232, 18, 16, 0, 0, +/* 0x08b0 */ 30,255, 47,225,240, 67, 45,233, 44,208, 77,226, 12, 16,141,229, +/* 0x08c0 */ 12, 16,157,229, 24,192,144,229, 24, 16, 65,226, 24, 0,128,226, +/* 0x08d0 */ 72, 64,157,229, 36, 0,141,229, 32, 16,141,229, 32,128,141,226, +/* 0x08e0 */ 0, 3,152,232, 2, 80,160,225, 32, 0,141,226, 24, 16,141,226, +/* 0x08f0 */ 4, 32,160,225, 3,112,160,225, 0, 48,160,227, 24,192,141,229, +/* 0x0900 */ 16,128,141,229, 20,144,141,229, 28, 80,141,229, 95,254,255,235, +/* 0x0910 */ 80,192,157,229, 0,192,141,229, 76,192,157,229, 0, 16,160,227, +/* 0x0920 */ 16, 32,141,226, 5, 0,160,225, 0, 48,224,227, 16, 16,141,233, +/* 0x0930 */ 180,254,255,235, 0,128,160,225, 16, 0,149,229, 28, 32,133,226, +/* 0x0940 */ 0, 16,160,227, 62, 0, 0,234, 0, 48,146,229, 14, 0, 83,227, +/* 0x0950 */ 57, 0, 0, 26, 8, 0,146,229, 0, 16,160,227, 0, 0,130,224, +/* 0x0960 */ 1, 32,160,225,224,253,255,235, 0, 96, 80,226, 18, 0,160,179, +/* 0x0970 */ 45,254,255,187, 0, 64,160,227, 6, 0,160,225, 5, 16,160,225, +/* 0x0980 */ 7, 32,160,225, 4, 48,160,225,250,253,255,235, 0, 0, 87,225, +/* 0x0990 */ 19, 0,160, 19, 36,254,255, 27, 0, 32,149,229,188, 48,159,229, +/* 0x09a0 */ 3, 0, 82,225, 2, 0, 0, 10,180, 48,159,229, 3, 0, 82,225, +/* 0x09b0 */ 18, 0, 0, 26, 7, 48,213,229, 20, 32,160,227,147, 2, 1,224, +/* 0x09c0 */ 5, 0,160,225, 8, 16,129,226,242,253,255,235, 4,192,149,229, +/* 0x09d0 */ 8, 16,133,226, 0, 0,160,227, 5, 0, 0,234, 0, 32,145,229, +/* 0x09e0 */ 128, 48,159,229, 3, 0, 82,225, 8, 64,145, 5,225,255,255, 10, +/* 0x09f0 */ 20, 16,129,226, 12, 0, 80,225, 1, 0,128,226,246,255,255, 26, +/* 0x0a00 */ 0,224,160,227, 44,192,141,226, 4,224, 44,229, 4, 16,160,225, +/* 0x0a10 */ 5, 0,160,225, 14, 32,160,225, 6, 48,160,225, 0, 80,141,232, +/* 0x0a20 */ 8,224,141,229,119,254,255,235, 0, 64,160,225, 0,128,128,229, +/* 0x0a30 */ 6, 0,160,225,177,253,255,235, 5, 0, 0,234, 4, 48,146,229, +/* 0x0a40 */ 3, 32,130,224, 0, 0, 81,225, 1, 16,129,226,189,255,255, 26, +/* 0x0a50 */ 0, 64,160,227, 4, 0,160,225, 44,208,141,226,240,131,189,232, +/* 0x0a60 */ 202,254,186,190,190,186,254,202, 7, 0, 0, 1 }; diff --git a/src/stub/arm64-darwin.macho-fold.h b/src/stub/arm64-darwin.macho-fold.h index c66a6b11..fc487b09 100644 --- a/src/stub/arm64-darwin.macho-fold.h +++ b/src/stub/arm64-darwin.macho-fold.h @@ -1,5 +1,5 @@ /* arm64-darwin.macho-fold.h - created from arm64-darwin.macho-fold.bin, 2536 (0x9e8) bytes + created from arm64-darwin.macho-fold.bin, 2720 (0xaa0) bytes This file is part of the UPX executable compressor. @@ -31,15 +31,15 @@ */ -#define STUB_ARM64_DARWIN_MACHO_FOLD_SIZE 2536 -#define STUB_ARM64_DARWIN_MACHO_FOLD_ADLER32 0xae9ba614 -#define STUB_ARM64_DARWIN_MACHO_FOLD_CRC32 0x34f0eff2 +#define STUB_ARM64_DARWIN_MACHO_FOLD_SIZE 2720 +#define STUB_ARM64_DARWIN_MACHO_FOLD_ADLER32 0xb19bd21b +#define STUB_ARM64_DARWIN_MACHO_FOLD_CRC32 0x30558727 -unsigned char stub_arm64_darwin_macho_fold[2536] = { +unsigned char stub_arm64_darwin_macho_fold[2720] = { /* 0x0000 */ 224, 3, 20,170,225, 3, 21,170,131, 26, 64,185, 9, 0,132, 82, /* 0x0010 */ 127, 0, 9,107, 99,128,137, 26, 99, 60, 0, 17, 99,108, 28, 18, /* 0x0020 */ 230,131, 0,145,243, 3, 0,145,255, 67, 35,203,226, 3, 0,145, -/* 0x0030 */ 228, 3, 28,170,165, 1, 0, 16,177, 1, 0,148, 20,128, 64,249, +/* 0x0030 */ 228, 3, 28,170,165, 1, 0, 16,220, 1, 0,148, 20,128, 64,249, /* 0x0040 */ 28, 0, 64,249,127, 2, 0,145,224, 3, 64,185, 38, 0, 0,148, /* 0x0050 */ 224, 7, 64,249,225, 19, 64,185, 40, 9,128, 82,254, 3, 20,170, /* 0x0060 */ 255,131, 0,145,128, 3, 31,214, 99, 28, 0, 18,127, 72, 1,113, @@ -84,115 +84,126 @@ unsigned char stub_arm64_darwin_macho_fold[2536] = { /* 0x02d0 */ 162,255,255,151,163, 67, 64,185, 97, 6, 64,249, 96, 2, 64,249, /* 0x02e0 */ 33, 0, 3,139, 97, 6, 0,249, 0, 0, 3,203, 96, 2, 0,249, /* 0x02f0 */ 185,255,255, 23,243, 83, 65,169,245, 91, 66,169,253,123,197,168, -/* 0x0300 */ 192, 3, 95,214,253,123,181,169,253, 3, 0,145,234, 47, 7,109, -/* 0x0310 */ 236, 67, 0,253,232, 39, 6,109,204, 0,103,158, 6, 12, 64,185, -/* 0x0320 */ 243, 83, 1,169,247, 99, 3,169,249,107, 4,169,251,115, 5,169, -/* 0x0330 */ 245, 91, 2,169,223, 28, 0,113,249, 3, 0,170,106, 0, 39, 30, -/* 0x0340 */ 247, 3, 2,170, 41, 0, 39, 30,252, 3, 4,170,171, 0,103,158, -/* 0x0350 */ 19,128, 0,145, 7, 16, 64,185, 3, 0,128, 82,192, 0, 0, 84, +/* 0x0300 */ 192, 3, 95,214,253,123,180,169,253, 3, 0,145,234, 47, 7,109, +/* 0x0310 */ 243, 83, 1,169,236, 55, 8,109,205, 0,103,158,232, 39, 6,109, +/* 0x0320 */ 6, 12, 64,185,247, 99, 3,169,251,115, 5,169,245, 91, 2,169, +/* 0x0330 */ 249,107, 4,169,223, 28, 0,113,247, 3, 0,170,107, 0, 39, 30, +/* 0x0340 */ 243, 3, 2,170, 42, 0, 39, 30,252, 3, 4,170,172, 0,103,158, +/* 0x0350 */ 20,128, 0,145, 7, 16, 64,185, 3, 0,128, 82,192, 0, 0, 84, /* 0x0360 */ 0, 24, 64,185, 0, 0, 11, 18, 31, 0, 3,107, 3, 2,128, 82, -/* 0x0370 */ 227, 19,131, 26, 99, 4, 64, 17,224, 3, 19,170, 99, 8, 0, 17, -/* 0x0380 */ 5, 0,128, 82, 1, 0,128,210, 26, 0,128,146,191, 0, 7,107, +/* 0x0370 */ 227, 19,131, 26, 99, 4, 64, 17,224, 3, 20,170, 99, 8, 0, 17, +/* 0x0380 */ 5, 0,128, 82, 1, 0,128,210, 25, 0,128,146,191, 0, 7,107, /* 0x0390 */ 106, 3, 0, 84, 2, 0, 64,185, 95,100, 0,113, 97, 2, 0, 84, /* 0x03a0 */ 4, 16, 64,249, 36, 2, 0,180, 2, 12, 64,249, 66, 0, 0,181, -/* 0x03b0 */ 195, 1, 32, 55, 95, 7, 0,177,161, 0, 0, 84,223, 28, 0,113, -/* 0x03c0 */ 97, 0, 0, 84,162, 0, 0,180, 67, 2,130, 82, 95, 3, 2,235, -/* 0x03d0 */ 90,147,130,154, 2, 0, 0, 20,250, 3, 2,170, 66, 0, 4,139, +/* 0x03b0 */ 195, 1, 32, 55, 63, 7, 0,177,161, 0, 0, 84,223, 28, 0,113, +/* 0x03c0 */ 97, 0, 0, 84,162, 0, 0,180, 67, 2,130, 82, 63, 3, 2,235, +/* 0x03d0 */ 57,147,130,154, 2, 0, 0, 20,249, 3, 2,170, 66, 0, 4,139, /* 0x03e0 */ 63, 0, 2,235, 33, 32,130,154, 2, 4, 64,185,165, 4, 0, 17, -/* 0x03f0 */ 66,116,126,146, 0, 0, 2,139,229,255,255, 23, 90,207,116,146, -/* 0x0400 */ 52,252, 63,145,148, 2, 26,203, 0, 0,128,210,148,206,116,146, -/* 0x0410 */ 227, 0, 32, 54,224, 3, 26,170,225, 3, 20,170,163, 79, 0,249, -/* 0x0420 */ 55,255,255,151,163, 79, 64,249,224, 3, 26,170, 2, 0,128, 82, -/* 0x0430 */ 225, 3, 20,170, 4, 0,128, 18,229, 3, 2, 42, 54,255,255,151, -/* 0x0440 */ 24, 44, 64,242, 96, 0, 0, 84,192, 0,128, 82, 68, 0, 0, 20, -/* 0x0450 */ 26, 0, 26,203,251, 3, 24, 42, 24, 0, 0, 20,128, 3, 64,249, -/* 0x0460 */ 64, 0, 0,181,150, 3, 0,249,215, 9, 0,181,255, 2, 31,235, -/* 0x0470 */ 227, 7,159, 26,159, 2, 31,235,225, 7,159, 26,129, 10, 0, 53, -/* 0x0480 */ 246, 3, 20,203,214, 46, 64,242,161, 12, 0, 84, 97, 13, 0, 53, -/* 0x0490 */ 0, 1,102,158,214, 2, 20,139,213, 2, 21,139,191, 2, 0,235, -/* 0x04a0 */ 98, 15, 0, 84,213, 13, 0,181, 96, 6, 64,185,123, 7, 0, 17, -/* 0x04b0 */ 0,116,126,146,115, 2, 0,139, 32, 19, 64,185,127, 3, 0,107, -/* 0x04c0 */ 130, 16, 0, 84, 96, 2, 64,185, 31,100, 0,113,160, 4, 0, 84, -/* 0x04d0 */ 96, 2, 64,185, 31,100, 0,113,161, 14, 0, 84, 97, 18, 64,249, -/* 0x04e0 */ 65,254,255,180,118, 14, 64,249, 96, 26, 64,249, 86, 3, 22,139, -/* 0x04f0 */ 160, 83, 0,249,212, 46, 64,146,193, 2, 1,139,182, 87, 0,249, -/* 0x0500 */ 214, 2, 20,203,148, 2, 0,171, 40, 0,103,158, 96, 4, 0, 84, -/* 0x0510 */ 247, 3, 0,181, 31, 0, 31,235, 67, 2,130, 82, 65, 2,128, 82, -/* 0x0520 */ 35, 16,131, 26, 31, 0, 31,235, 64, 1, 38, 30, 4, 16,159, 90, -/* 0x0530 */ 38, 1, 38, 30,101, 22, 64,249,224, 3, 22,170,225, 3, 20,170, -/* 0x0540 */ 98, 0,128, 82,197, 0, 5, 11,243,254,255,151, 31, 0, 22,235, -/* 0x0550 */ 245, 3, 0,170, 64,248,255, 84, 0, 1,128, 82,215,254,255,151, -/* 0x0560 */ 96, 18, 64,249, 96,251,255,181,224, 3, 23,170,161,131, 2,145, -/* 0x0570 */ 130, 1,128,210,249,254,255,151,225, 6, 64,249,160,167, 64,185, -/* 0x0580 */ 32, 0, 0,139,224, 6, 0,249,210,255,255, 23, 67, 2,130, 82, -/* 0x0590 */ 4, 0,128, 18,231,255,255, 23,245, 3, 22,170,179,255,255, 23, -/* 0x05a0 */ 96, 26, 64,249, 64,246,255,180, 96, 22, 64,249, 64, 0, 0,181, -/* 0x05b0 */ 149, 3, 0,249, 98, 1,102,158,224, 3, 23,170,131, 1,102,158, -/* 0x05c0 */ 161,131, 2,145,252,254,255,151,169,255,255, 23,163,245,255, 52, -/* 0x05d0 */ 96, 22, 64,249, 96,245,255,181, 96, 66, 64,185, 32,245,255, 52, -/* 0x05e0 */ 96, 2, 25,203, 34, 0,128, 82, 0,244,126,146, 2,128,186,114, -/* 0x05f0 */ 160, 2, 0,139, 0,120, 64,185, 0,124, 2, 83, 0, 8, 0, 81, -/* 0x0600 */ 0,244,126,211,184, 2, 0,139,162,106, 32,184, 0,120,128, 82, -/* 0x0610 */ 224,203,186,114, 0, 7, 0,185,154,255,255, 23,162, 2, 20,139, -/* 0x0620 */ 0, 0,128,210, 31,104, 34, 56, 0, 4, 0,145, 31, 0, 22,235, -/* 0x0630 */ 161,255,255, 84,150,255,255, 23, 98, 62, 64,185,224, 3, 21,170, -/* 0x0640 */ 225, 3, 20,170,163, 79, 0,249,176,254,255,151,163, 79, 64,249, -/* 0x0650 */ 0,242,255, 52, 64, 1,128, 82,193,255,255, 23, 1, 1,102,158, -/* 0x0660 */ 98, 62, 64,185,224, 3, 21,170, 67, 2,130, 82, 4, 0,128, 18, -/* 0x0670 */ 5, 0,128, 82, 33, 0, 21,203,167,254,255,151, 31, 0, 21,235, -/* 0x0680 */ 64,241,255, 84, 32, 1,128, 82,181,255,255, 23,227,240,255, 52, -/* 0x0690 */ 148, 14, 0,145,129, 46, 64,146, 63, 12, 0,241,104,240,255, 84, -/* 0x06a0 */ 224, 3, 21,170,150,254,255,151,128,255,255, 23,247,239,255,181, -/* 0x06b0 */ 0, 16, 0, 81, 31, 4, 0,113,136,239,255, 84, 96,138, 64,249, -/* 0x06c0 */ 120, 66, 0,145, 0, 0, 26,139, 96,138, 0,249,119,255,255, 23, -/* 0x06d0 */ 224, 3, 24,170,232, 39, 70,109,243, 83, 65,169,234, 47, 71,109, -/* 0x06e0 */ 245, 91, 66,169,247, 99, 67,169,249,107, 68,169,251,115, 69,169, -/* 0x06f0 */ 236, 67, 64,253,253,123,203,168,192, 3, 95,214,253,123,182,169, -/* 0x0700 */ 253, 3, 0,145,243, 83, 1,169,244, 3, 4,170,243, 3, 2,170, -/* 0x0710 */ 161, 47, 0,249, 1, 96, 0,145,161, 63, 0,249,161, 47, 64,249, -/* 0x0720 */ 0, 24, 64,185, 33, 96, 0,209,161, 59, 0,249,160, 67, 0,249, -/* 0x0730 */ 160, 7, 71,169,247, 99, 3,169,160, 7, 9,169,162, 71, 0,249, -/* 0x0740 */ 160,195, 1,145,161, 3, 2,145,226, 3, 20,170,247, 3, 3,170, -/* 0x0750 */ 3, 0,128,210,245, 91, 2,169,166, 43, 0,249,245, 3, 5,170, -/* 0x0760 */ 249, 35, 0,249,148,254,255,151,164, 43, 64,249, 1, 0,128, 82, -/* 0x0770 */ 162, 67, 2,145,224, 3, 19,170, 3, 0,128, 18,229, 3, 20,170, -/* 0x0780 */ 230, 3, 21,170,224,254,255,151,248, 3, 0,170, 98, 18, 64,185, -/* 0x0790 */ 97,130, 0,145, 4, 0,128, 82,159, 0, 2,107,224, 8, 0, 84, -/* 0x07a0 */ 32, 0, 64,185, 31, 56, 0,113, 1, 8, 0, 84, 32, 8, 64,185, -/* 0x07b0 */ 22, 0,128, 82,153, 2,128, 82, 32, 0, 0,139, 1, 0,128, 82, -/* 0x07c0 */ 226, 3, 1, 42, 69,254,255,151,244, 3, 0, 42, 20, 3,248, 54, -/* 0x07d0 */ 64, 2,128, 82, 30, 0, 0, 20, 98, 2, 64,185, 65,217,159, 82, -/* 0x07e0 */ 65,215,183,114, 95, 0, 1,107, 65, 3, 0, 84, 97, 30, 64, 57, -/* 0x07f0 */ 224, 3, 19,170,117, 34, 0,145, 33,124, 25, 27, 33, 32, 0, 17, -/* 0x0800 */ 75,254,255,151, 96, 6, 64,185, 1, 0,128, 82, 63, 0, 0,107, -/* 0x0810 */ 0, 3, 0, 84,163, 2, 64,185,226, 0,128, 82, 2, 32,160,114, -/* 0x0820 */ 127, 0, 2,107, 1, 2, 0, 84,182, 10, 64,185,224, 3, 20, 42, -/* 0x0830 */ 225, 3, 19,170,226, 3, 23,170,227, 3, 22, 42, 57,254,255,151, -/* 0x0840 */ 255, 2, 0,235,160,252,255, 84, 96, 2,128, 82, 27,254,255,151, -/* 0x0850 */ 193, 87,151, 82,193, 95,185,114, 95, 0, 1,107,128,252,255, 84, -/* 0x0860 */ 4, 0, 0, 20, 33, 4, 0, 17,181, 82, 0,145,232,255,255, 23, -/* 0x0870 */ 164,131, 2,145, 2, 0,128,210,224, 3, 19,170,225, 3, 22, 42, -/* 0x0880 */ 227, 3, 20, 42,229, 3, 2,170,159,140, 28,248,230, 3, 2,170, -/* 0x0890 */ 157,254,255,151,243, 3, 0,170, 24, 0, 0,249,224, 3, 20, 42, -/* 0x08a0 */ 17,254,255,151, 6, 0, 0, 20, 32, 4, 64,185,132, 4, 0, 17, -/* 0x08b0 */ 33, 0, 0,139,185,255,255, 23, 19, 0,128,210,224, 3, 19,170, -/* 0x08c0 */ 249, 35, 64,249,243, 83, 65,169,245, 91, 66,169,247, 99, 67,169, -/* 0x08d0 */ 253,123,202,168,192, 3, 95,214, 20, 0, 0, 0, 0, 0, 0, 0, -/* 0x08e0 */ 1,122, 82, 0, 4,120, 30, 1, 27, 12, 31, 0, 0, 0, 0, 0, -/* 0x08f0 */ 36, 0, 0, 0, 28, 0, 0, 0, 96,248,255,255, 92, 0, 0, 0, -/* 0x0900 */ 0, 65, 14, 16,157, 2,158, 1, 66, 13, 29, 83,222,221, 12, 31, -/* 0x0910 */ 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 68, 0, 0, 0, -/* 0x0920 */ 148,248,255,255, 80, 1, 0, 0, 0, 65, 14, 80,157, 10,158, 9, -/* 0x0930 */ 65, 13, 29, 66,147, 8,148, 7,149, 6,150, 5, 2, 79,222,221, -/* 0x0940 */ 214,213,212,211, 12, 31, 0, 0, 92, 0, 0, 0,116, 0, 0, 0, -/* 0x0950 */ 180,249,255,255,248, 3, 0, 0, 0, 65, 14,176, 1,157, 22,158, -/* 0x0960 */ 21, 65, 13, 29, 67, 5, 74, 8, 5, 75, 7, 5, 76, 6, 5, 72, -/* 0x0970 */ 10, 5, 73, 9, 71,147, 20,148, 19,151, 16,152, 15,153, 14,154, -/* 0x0980 */ 13,155, 12,156, 11,149, 18,150, 17, 2,241,222,221, 6, 76, 6, -/* 0x0990 */ 75, 6, 74, 6, 73, 6, 72,220,219,218,217,216,215,214,213,212, -/* 0x09a0 */ 211, 12, 31, 0, 0, 0, 0, 0, 60, 0, 0, 0,212, 0, 0, 0, -/* 0x09b0 */ 76,253,255,255,220, 1, 0, 0, 0, 65, 14,160, 1,157, 20,158, -/* 0x09c0 */ 19, 65, 13, 29, 65,147, 18,148, 17, 81,151, 14,152, 13, 68,149, -/* 0x09d0 */ 16,150, 15, 66,153, 12, 2, 92,222,221,217,216,215,214,213,212, -/* 0x09e0 */ 211, 12, 31, 0, 0, 0, 0, 0 +/* 0x03f0 */ 66,116,126,146, 0, 0, 2,139,229,255,255, 23, 57,207,116,146, +/* 0x0400 */ 53,252, 63,145,181, 2, 25,203, 0, 0,128,210,181,206,116,146, +/* 0x0410 */ 227, 0, 32, 54,224, 3, 25,170,225, 3, 21,170,163, 79, 0,249, +/* 0x0420 */ 55,255,255,151,163, 79, 64,249,224, 3, 25,170, 2, 0,128, 82, +/* 0x0430 */ 225, 3, 21,170, 4, 0,128, 18,229, 3, 2, 42, 54,255,255,151, +/* 0x0440 */ 1, 44, 64,146, 97, 0, 0,180,192, 0,128, 82, 67, 0, 0, 20, +/* 0x0450 */ 25, 0, 25,203,211, 0, 0,180, 96, 2, 64,249, 9, 0,103,158, +/* 0x0460 */ 96, 6, 64,249, 8, 0,103,158, 3, 0, 0, 20,104, 2,103,158, +/* 0x0470 */ 105, 2,103,158, 24, 0,128, 82, 27, 0,128,210, 15, 0, 0, 20, +/* 0x0480 */ 83, 1, 0,180, 97, 2, 64,249,160,167, 64,185, 33, 48, 0,209, +/* 0x0490 */ 33, 0, 0,203, 97, 2, 0,249, 97, 6, 64,249, 0, 48, 0,145, +/* 0x04a0 */ 32, 0, 0,139, 96, 6, 0,249,128, 6, 64,185, 24, 7, 0, 17, +/* 0x04b0 */ 0,116,126,146,148, 2, 0,139,224, 18, 64,185, 31, 3, 0,107, +/* 0x04c0 */ 226, 21, 0, 84,128, 2, 64,185, 31,100, 0,113, 97, 20, 0, 84, +/* 0x04d0 */ 115, 4, 0,181,154, 18, 64,249, 90,253,255,180,134, 14, 64,249, +/* 0x04e0 */ 128, 26, 64,249, 38, 3, 6,139,160, 91, 0,249,213, 44, 64,146, +/* 0x04f0 */ 166, 95, 0,249,218, 0, 26,139,198, 0, 21,203,181, 2, 0,171, +/* 0x0500 */ 96, 8, 0, 84,115, 7, 0,181, 97, 1, 38, 30, 31, 0, 31,235, +/* 0x0510 */ 36, 16,159, 90, 31, 0, 31,235, 65, 2,128, 82, 64, 2,130, 82, +/* 0x0520 */ 3, 0,129, 26,224, 3, 6,170,166, 79, 0,249, 70, 1, 38, 30, +/* 0x0530 */ 133, 22, 64,249,225, 3, 21,170, 98, 0,128, 82,197, 0, 5, 11, +/* 0x0540 */ 245,254,255,151,246, 3, 0,170,166, 79, 64,249, 31, 0, 6,235, +/* 0x0550 */ 96, 5, 0, 84, 0, 1,128, 82,216,254,255,151,128, 26, 64,249, +/* 0x0560 */ 160,251,255,180,224, 3, 19,170,161,131, 2,145,130, 1,128,210, +/* 0x0570 */ 250,254,255,151, 96, 2, 64,249, 0, 48, 0,145, 96, 2, 0,249, +/* 0x0580 */ 96, 6, 64,249, 0, 48, 0,209, 96, 6, 0,249,160,175, 66, 57, +/* 0x0590 */ 31, 0, 24,107, 0,250,255, 84, 0, 1,102,158,105, 2, 0,253, +/* 0x05a0 */ 96, 6, 0,249,161,131, 2,145,224, 3, 19,170,130, 1,128,210, +/* 0x05b0 */ 234,254,255,151, 98, 2, 64,249, 64, 48, 0,145, 96, 2, 0,249, +/* 0x05c0 */ 96, 6, 64,249, 1, 48, 0,209,160,175, 66, 57, 97, 6, 0,249, +/* 0x05d0 */ 31, 0, 24,107, 0,248,255, 84,160,167, 64,185, 66, 0, 0,203, +/* 0x05e0 */ 0, 48, 0,145, 98, 2, 0,249, 32, 0, 0,139,237,255,255, 23, +/* 0x05f0 */ 67, 2,130, 82, 4, 0,128, 18,203,255,255, 23,128, 3, 64,249, +/* 0x0600 */ 128, 0, 0,181,134, 3, 0,249, 2, 0, 0, 20,246, 3, 6,170, +/* 0x0610 */ 115, 1, 0,180,128, 26, 64,249, 32, 1, 0,180,128, 22, 64,249, +/* 0x0620 */ 64, 0, 0,181,150, 3, 0,249,130, 1,102,158,224, 3, 19,170, +/* 0x0630 */ 163, 1,102,158,161,195, 2,145,223,254,255,151,127, 2, 31,235, +/* 0x0640 */ 228, 7,159, 26,191, 2, 31,235,225, 7,159, 26,129, 2, 0, 52, +/* 0x0650 */ 100, 2, 0, 52,128, 22, 64,249, 32, 2, 0,181,128, 66, 64,185, +/* 0x0660 */ 224, 1, 0, 52,128, 2, 23,203, 34, 0,128, 82, 0,244,126,146, +/* 0x0670 */ 2,128,186,114,192, 2, 0,139, 0,120, 64,185, 0,124, 2, 83, +/* 0x0680 */ 0, 8, 0, 81, 0,244,126,211,219, 2, 0,139,194,106, 32,184, +/* 0x0690 */ 0,120,128, 82,224,203,186,114, 96, 7, 0,185,227, 3, 21,203, +/* 0x06a0 */ 99, 44, 64,242, 97, 0, 0, 84,129, 2, 0, 52, 8, 0, 0, 20, +/* 0x06b0 */ 194, 2, 21,139, 0, 0,128,210, 31,104, 34, 56, 0, 4, 0,145, +/* 0x06c0 */ 31, 0, 3,235,161,255,255, 84,248,255,255, 23,130, 62, 64,185, +/* 0x06d0 */ 224, 3, 22,170,225, 3, 21,170,163, 75, 0,249,164, 79, 0,249, +/* 0x06e0 */ 138,254,255,151,164, 79, 64,249,163, 75, 64,249, 96, 0, 0, 52, +/* 0x06f0 */ 64, 1,128, 82,153,255,255, 23, 99, 0, 21,139,118, 0, 22,139, +/* 0x0700 */ 223, 2, 26,235,162, 1, 0, 84, 22,237,255,180,130, 62, 64,185, +/* 0x0710 */ 224, 3, 22,170, 65, 3, 22,203, 67, 2,130, 82, 4, 0,128, 18, +/* 0x0720 */ 5, 0,128, 82,124,254,255,151, 31, 0, 22,235,224,235,255, 84, +/* 0x0730 */ 32, 1,128, 82,137,255,255, 23,132,235,255, 52,161, 14, 0,145, +/* 0x0740 */ 33, 44, 64,146, 63, 12, 0,241, 8,235,255, 84,224, 3, 22,170, +/* 0x0750 */ 107,254,255,151, 85,255,255, 23,147,234,255,181, 0, 16, 0, 81, +/* 0x0760 */ 31, 4, 0,113, 40,234,255, 84,128,138, 64,249,155, 66, 0,145, +/* 0x0770 */ 0, 0, 25,139,128,138, 0,249, 76,255,255, 23,224, 3, 27,170, +/* 0x0780 */ 232, 39, 70,109,243, 83, 65,169,234, 47, 71,109,245, 91, 66,169, +/* 0x0790 */ 236, 55, 72,109,247, 99, 67,169,249,107, 68,169,251,115, 69,169, +/* 0x07a0 */ 253,123,204,168,192, 3, 95,214,253,123,182,169,253, 3, 0,145, +/* 0x07b0 */ 243, 83, 1,169,244, 3, 4,170,243, 3, 2,170,161, 47, 0,249, +/* 0x07c0 */ 1, 96, 0,145,161, 63, 0,249,161, 47, 64,249, 0, 24, 64,185, +/* 0x07d0 */ 33, 96, 0,209,161, 59, 0,249,160, 67, 0,249,160, 7, 71,169, +/* 0x07e0 */ 247, 99, 3,169,160, 7, 9,169,162, 71, 0,249,160,195, 1,145, +/* 0x07f0 */ 161, 3, 2,145,226, 3, 20,170,247, 3, 3,170, 3, 0,128,210, +/* 0x0800 */ 245, 91, 2,169,166, 43, 0,249,245, 3, 5,170,249, 35, 0,249, +/* 0x0810 */ 105,254,255,151,164, 43, 64,249, 1, 0,128, 82,162, 67, 2,145, +/* 0x0820 */ 224, 3, 19,170, 3, 0,128, 18,229, 3, 20,170,230, 3, 21,170, +/* 0x0830 */ 181,254,255,151,248, 3, 0,170, 98, 18, 64,185, 97,130, 0,145, +/* 0x0840 */ 4, 0,128, 82,159, 0, 2,107,224, 8, 0, 84, 32, 0, 64,185, +/* 0x0850 */ 31, 56, 0,113, 1, 8, 0, 84, 32, 8, 64,185, 22, 0,128, 82, +/* 0x0860 */ 153, 2,128, 82, 32, 0, 0,139, 1, 0,128, 82,226, 3, 1, 42, +/* 0x0870 */ 26,254,255,151,244, 3, 0, 42, 20, 3,248, 54, 64, 2,128, 82, +/* 0x0880 */ 30, 0, 0, 20, 98, 2, 64,185, 65,217,159, 82, 65,215,183,114, +/* 0x0890 */ 95, 0, 1,107, 65, 3, 0, 84, 97, 30, 64, 57,224, 3, 19,170, +/* 0x08a0 */ 117, 34, 0,145, 33,124, 25, 27, 33, 32, 0, 17, 32,254,255,151, +/* 0x08b0 */ 96, 6, 64,185, 1, 0,128, 82, 63, 0, 0,107, 0, 3, 0, 84, +/* 0x08c0 */ 163, 2, 64,185,226, 0,128, 82, 2, 32,160,114,127, 0, 2,107, +/* 0x08d0 */ 1, 2, 0, 84,182, 10, 64,185,224, 3, 20, 42,225, 3, 19,170, +/* 0x08e0 */ 226, 3, 23,170,227, 3, 22, 42, 14,254,255,151,255, 2, 0,235, +/* 0x08f0 */ 160,252,255, 84, 96, 2,128, 82,240,253,255,151,193, 87,151, 82, +/* 0x0900 */ 193, 95,185,114, 95, 0, 1,107,128,252,255, 84, 4, 0, 0, 20, +/* 0x0910 */ 33, 4, 0, 17,181, 82, 0,145,232,255,255, 23,164,131, 2,145, +/* 0x0920 */ 2, 0,128,210,224, 3, 19,170,225, 3, 22, 42,227, 3, 20, 42, +/* 0x0930 */ 229, 3, 2,170,159,140, 28,248,230, 3, 2,170,114,254,255,151, +/* 0x0940 */ 243, 3, 0,170, 24, 0, 0,249,224, 3, 20, 42,230,253,255,151, +/* 0x0950 */ 6, 0, 0, 20, 32, 4, 64,185,132, 4, 0, 17, 33, 0, 0,139, +/* 0x0960 */ 185,255,255, 23, 19, 0,128,210,224, 3, 19,170,249, 35, 64,249, +/* 0x0970 */ 243, 83, 65,169,245, 91, 66,169,247, 99, 67,169,253,123,202,168, +/* 0x0980 */ 192, 3, 95,214, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, +/* 0x0990 */ 1,122, 82, 0, 4,120, 30, 1, 27, 12, 31, 0, 0, 0, 0, 0, +/* 0x09a0 */ 36, 0, 0, 0, 28, 0, 0, 0,176,247,255,255, 92, 0, 0, 0, +/* 0x09b0 */ 0, 65, 14, 16,157, 2,158, 1, 66, 13, 29, 83,222,221, 12, 31, +/* 0x09c0 */ 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 68, 0, 0, 0, +/* 0x09d0 */ 228,247,255,255, 80, 1, 0, 0, 0, 65, 14, 80,157, 10,158, 9, +/* 0x09e0 */ 65, 13, 29, 66,147, 8,148, 7,149, 6,150, 5, 2, 79,222,221, +/* 0x09f0 */ 214,213,212,211, 12, 31, 0, 0,100, 0, 0, 0,116, 0, 0, 0, +/* 0x0a00 */ 4,249,255,255,164, 4, 0, 0, 0, 65, 14,192, 1,157, 24,158, +/* 0x0a10 */ 23, 65, 13, 29, 67, 5, 74, 10, 5, 75, 9,147, 22,148, 21, 5, +/* 0x0a20 */ 76, 8, 5, 77, 7, 71, 5, 72, 12, 5, 73, 11,151, 18,152, 17, +/* 0x0a30 */ 155, 14,156, 13,149, 20,150, 19,153, 16,154, 15, 3, 28, 1,222, +/* 0x0a40 */ 221, 6, 77, 6, 76, 6, 75, 6, 74, 6, 73, 6, 72,220,219,218, +/* 0x0a50 */ 217,216,215,214,213,212,211, 12, 31, 0, 0, 0, 0, 0, 0, 0, +/* 0x0a60 */ 60, 0, 0, 0,220, 0, 0, 0, 64,253,255,255,220, 1, 0, 0, +/* 0x0a70 */ 0, 65, 14,160, 1,157, 20,158, 19, 65, 13, 29, 65,147, 18,148, +/* 0x0a80 */ 17, 81,151, 14,152, 13, 68,149, 16,150, 15, 66,153, 12, 2, 92, +/* 0x0a90 */ 222,221,217,216,215,214,213,212,211, 12, 31, 0, 0, 0, 0, 0 }; diff --git a/src/stub/src/amd64-darwin.macho-main.c b/src/stub/src/amd64-darwin.macho-main.c index 8399db8b..c6abc66a 100644 --- a/src/stub/src/amd64-darwin.macho-main.c +++ b/src/stub/src/amd64-darwin.macho-main.c @@ -133,6 +133,13 @@ xread(Extent *x, void *buf, size_t count) x->size -= count; } +static void +xpeek(Extent *x, void *buf, size_t count) +{ + xread(x, buf, count); + x->size += count; + x->buf -= count; +} /************************************************************************* // util @@ -177,7 +184,7 @@ struct b_info { // 12-byte header before each compressed block unsigned char b_method; // compression algorithm unsigned char b_ftid; // filter id unsigned char b_cto8; // filter parameter - unsigned char b_unused; + unsigned char b_extra; }; typedef void f_unfilter( @@ -539,120 +546,142 @@ do_xmap( fdi, mhdr, (mhdrpp ? *mhdrpp : 0), xi, (xi? xi->size: 0), (xi? xi->buf: 0), f_unf); unsigned *rv = 0; + Extent xi_orig = {0, 0}; Mach_segment_command *sc = (Mach_segment_command *)(1+ mhdr); Addr const reloc = xfind_pages(mhdr, sc, mhdr->ncmds, 0); DPRINTF("do_xmap reloc=%%p\\n", reloc); unsigned j; + if (xi) { // remember "Beginning of tape" + xi_orig = *xi; + } for ( j=0; j < mhdr->ncmds; ++j, (sc = (Mach_segment_command *)((sc->cmdsize>>2) + (unsigned *)sc)) ) { DPRINTF(" #%%d cmd=%%x cmdsize=%%x vmsize=%%x\\n", j, sc->cmd, sc->cmdsize, sc->vmsize); - if (LC_SEGMENT==sc->cmd && !sc->vmsize) { - // Typical __DWARF info segment for 'rust' + if (LC_SEGMENT==sc->cmd) { struct b_info h; - xread(xi, (unsigned char *)&h, sizeof(h)); - DPRINTF(" 0==.vmsize; skipping %%x\\n", h.sz_cpr); - xi->buf += h.sz_cpr; - } - if (LC_SEGMENT==sc->cmd && sc->vmsize) { - Extent xo; - size_t mlen = xo.size = sc->filesize; - xo.buf = (void *)(reloc + sc->vmaddr); - Addr addr = (Addr)xo.buf; - Addr haddr = sc->vmsize + addr; - size_t frag = addr &~ PAGE_MASK; - addr -= frag; - mlen += frag; - - DPRINTF(" mlen=%%p frag=%%p addr=%%p\\n", mlen, frag, addr); - if (0!=mlen) { - size_t const mlen3 = mlen - #if defined(__x86_64__) //{ - // Decompressor can overrun the destination by 3 bytes. [x86 only] - + (xi ? 3 : 0) - #endif //} - ; - unsigned const prot = VM_PROT_READ | VM_PROT_WRITE; - // MAP_FIXED: xfind_pages() reserved them, so use them! - unsigned const flags = MAP_FIXED | MAP_PRIVATE | - ((xi || 0==sc->filesize) ? MAP_ANON : 0); - int const fdm = ((xi || 0==sc->filesize) ? MAP_ANON_FD : fdi); - off_t_upx_stub const offset = sc->fileoff + fat_offset; - - DPRINTF("mmap addr=%%p len=%%p prot=%%x flags=%%x fd=%%d off=%%p reloc=%%p\\n", - addr, mlen3, prot, flags, fdm, offset, reloc); - { - Addr maddr = (Addr)mmap((void *)addr, mlen3, prot, flags, fdm, offset); - DPRINTF("maddr=%%p\\n", maddr); - if (maddr != addr) { - err_exit(8); + if (xi && sc->filesize) { // Find the correct compressed block. + xpeek(xi, (unsigned char *)&h, sizeof(h)); + if (h.b_extra != j) { // not the next one + *xi = xi_orig; // rewind + for (;;) { + xpeek(xi, (unsigned char *)&h, sizeof(h)); + if (h.b_extra == j) { + break; + } + xi->size -= sizeof(h) + h.sz_cpr; + xi->buf += sizeof(h) + h.sz_cpr; } - addr = maddr; - } - if (!*mhdrpp) { // MH_DYLINKER - *mhdrpp = (Mach_header*)addr; } } - if (xi && 0!=sc->filesize) { - if (0==sc->fileoff /*&& 0!=mhdrpp*/) { - *mhdrpp = (Mach_header *)(void *)addr; + if (!sc->vmsize) { // not mapped, such as __DWARF info for 'rust' + if (xi) { + DPRINTF(" 0==.vmsize; skipping %%x\\n", h.sz_cpr); + xi->size -= sizeof(h) + h.sz_cpr; + xi->buf += sizeof(h) + h.sz_cpr; } - unpackExtent(xi, &xo, f_exp, f_unf); + continue; // redundant for clarity } - DPRINTF("xi=%%p mlen=%%p fileoff=%%p nsects=%%d\\n", - xi, mlen, sc->fileoff, sc->nsects); - if (xi && mlen && !sc->fileoff && sc->nsects) { - // main target __TEXT segment at beginning of file with sections (__text) - // Use upto 2 words of header padding for the escape hatch. - // fold.S could do this easier, except PROT_WRITE is missing then. - union { - unsigned char *p0; - unsigned short *p1; - unsigned int *p2; - unsigned long *p3; - } u; - u.p0 = (unsigned char *)addr; - Mach_segment_command *segp = (Mach_segment_command *)((((char *)sc - (char *)mhdr)>>2) + u.p2); - Mach_section_command *const secp = (Mach_section_command *)(1+ segp); - #if defined(__aarch64__) //{ - unsigned *hatch= -2+ (secp->offset>>2) + u.p2; - hatch[0] = 0xd4000001; // svc #0 // syscall - hatch[1] = 0xd65f03c0; // ret - #elif defined(__arm__) //}{ - unsigned *hatch= -2+ (secp->offset>>2) + u.p2; - hatch[0] = 0xef000000; // svc 0x0 // syscall - hatch[1] = 0xe12fff1e; // bx lr - #elif defined(__x86_64__) //}{ - unsigned *hatch= -1+ (secp->offset>>2) + u.p2; - hatch[0] = 0xc3050f90; // nop; syscall; ret - #endif //} - DPRINTF("hatch=%%p secp=%%p segp=%%p mhdr=%%p\\n", hatch, secp, segp, addr); - rv = hatch; - } - /*bzero(addr, frag);*/ // fragment at lo end - frag = (-mlen) &~ PAGE_MASK; // distance to next page boundary - bzero((void *)(mlen+addr), frag); // fragment at hi end - if (0!=mlen && 0!=mprotect((void *)addr, mlen, sc->initprot)) { - err_exit(10); - ERR_LAB - } - addr += mlen + frag; /* page boundary on hi end */ - if ( - #if SIMULATE_ON_LINUX_EABI4 /*{*/ - 0!=addr && - #endif /*}*/ - addr < haddr) { // need pages for .bss - if (0!=addr && addr != (Addr)mmap((void *)addr, haddr - addr, sc->initprot, - MAP_FIXED | MAP_PRIVATE | MAP_ANON, MAP_ANON_FD, 0 ) ) { - err_exit(9); + else { // finally, some meat! + Extent xo; + size_t mlen = xo.size = sc->filesize; + xo.buf = (void *)(reloc + sc->vmaddr); + Addr addr = (Addr)xo.buf; + Addr haddr = sc->vmsize + addr; + size_t frag = addr &~ PAGE_MASK; + addr -= frag; + mlen += frag; + + DPRINTF(" mlen=%%p frag=%%p addr=%%p\\n", mlen, frag, addr); + if (0!=mlen) { + size_t const mlen3 = mlen + #if defined(__x86_64__) //{ + // Decompressor can overrun the destination by 3 bytes. [x86 only] + + (xi ? 3 : 0) + #endif //} + ; + unsigned const prot = VM_PROT_READ | VM_PROT_WRITE; + // MAP_FIXED: xfind_pages() reserved them, so use them! + unsigned const flags = MAP_FIXED | MAP_PRIVATE | + ((xi || 0==sc->filesize) ? MAP_ANON : 0); + int const fdm = ((xi || 0==sc->filesize) ? MAP_ANON_FD : fdi); + off_t_upx_stub const offset = sc->fileoff + fat_offset; + + DPRINTF("mmap addr=%%p len=%%p prot=%%x flags=%%x fd=%%d off=%%p reloc=%%p\\n", + addr, mlen3, prot, flags, fdm, offset, reloc); + { + Addr maddr = (Addr)mmap((void *)addr, mlen3, prot, flags, fdm, offset); + DPRINTF("maddr=%%p\\n", maddr); + if (maddr != addr) { + err_exit(8); + } + addr = maddr; + } + if (!*mhdrpp) { // MH_DYLINKER + *mhdrpp = (Mach_header*)addr; + } } - } - else if (xi) { // cleanup if decompressor overrun crosses page boundary - mlen = ~PAGE_MASK & (3+ mlen); - if (mlen<=3) { // page fragment was overrun buffer only - DPRINTF("munmap %%x %%x\\n", addr, mlen); - munmap((char *)addr, mlen); + if (xi && 0!=sc->filesize) { + if (0==sc->fileoff /*&& 0!=mhdrpp*/) { + *mhdrpp = (Mach_header *)(void *)addr; + } + unpackExtent(xi, &xo, f_exp, f_unf); + } + DPRINTF("xi=%%p mlen=%%p fileoff=%%p nsects=%%d\\n", + xi, mlen, sc->fileoff, sc->nsects); + if (xi && mlen && !sc->fileoff && sc->nsects) { + // main target __TEXT segment at beginning of file with sections (__text) + // Use upto 2 words of header padding for the escape hatch. + // fold.S could do this easier, except PROT_WRITE is missing then. + union { + unsigned char *p0; + unsigned short *p1; + unsigned int *p2; + unsigned long *p3; + } u; + u.p0 = (unsigned char *)addr; + Mach_segment_command *segp = (Mach_segment_command *)((((char *)sc - (char *)mhdr)>>2) + u.p2); + Mach_section_command *const secp = (Mach_section_command *)(1+ segp); + #if defined(__aarch64__) //{ + unsigned *hatch= -2+ (secp->offset>>2) + u.p2; + hatch[0] = 0xd4000001; // svc #0 // syscall + hatch[1] = 0xd65f03c0; // ret + #elif defined(__arm__) //}{ + unsigned *hatch= -2+ (secp->offset>>2) + u.p2; + hatch[0] = 0xef000000; // svc 0x0 // syscall + hatch[1] = 0xe12fff1e; // bx lr + #elif defined(__x86_64__) //}{ + unsigned *hatch= -1+ (secp->offset>>2) + u.p2; + hatch[0] = 0xc3050f90; // nop; syscall; ret + #endif //} + DPRINTF("hatch=%%p secp=%%p segp=%%p mhdr=%%p\\n", hatch, secp, segp, addr); + rv = hatch; + } + /*bzero(addr, frag);*/ // fragment at lo end + frag = (-mlen) &~ PAGE_MASK; // distance to next page boundary + bzero((void *)(mlen+addr), frag); // fragment at hi end + if (0!=mlen && 0!=mprotect((void *)addr, mlen, sc->initprot)) { + err_exit(10); + ERR_LAB + } + addr += mlen + frag; /* page boundary on hi end */ + if ( + #if SIMULATE_ON_LINUX_EABI4 /*{*/ + 0!=addr && + #endif /*}*/ + addr < haddr) { // need pages for .bss + if (0!=addr && addr != (Addr)mmap((void *)addr, haddr - addr, sc->initprot, + MAP_FIXED | MAP_PRIVATE | MAP_ANON, MAP_ANON_FD, 0 ) ) { + err_exit(9); + } + } + else if (xi) { // cleanup if decompressor overrun crosses page boundary + mlen = ~PAGE_MASK & (3+ mlen); + if (mlen<=3) { // page fragment was overrun buffer only + DPRINTF("munmap %%x %%x\\n", addr, mlen); + munmap((char *)addr, mlen); + } } } } diff --git a/src/stub/tmp/amd64-darwin.macho-fold.map b/src/stub/tmp/amd64-darwin.macho-fold.map index b6e327b1..b4b970f9 100644 --- a/src/stub/tmp/amd64-darwin.macho-fold.map +++ b/src/stub/tmp/amd64-darwin.macho-fold.map @@ -72,7 +72,7 @@ LOAD tmp/amd64-darwin.macho-main.o .plt *(.plt) -.text 0x0000000008048000 0x88b +.text 0x0000000008048000 0x938 *(.text .stub .text.* .gnu.linkonce.t.*) .text 0x0000000008048000 0x1d0 tmp/amd64-darwin.macho-fold.o 0x00000000080480b8 munmap @@ -86,17 +86,17 @@ LOAD tmp/amd64-darwin.macho-main.o 0x00000000080480c4 open 0x00000000080480b4 mprotect 0x00000000080480c0 close - .text 0x00000000080481d0 0x6bb tmp/amd64-darwin.macho-main.o - 0x000000000804834c do_xmap - 0x00000000080486f6 upx_main + .text 0x00000000080481d0 0x768 tmp/amd64-darwin.macho-main.o + 0x0000000008048369 do_xmap + 0x00000000080487a4 upx_main *(.text.*personality*) *(.gnu.warning) .fini *(.fini) - 0x000000000804888b PROVIDE (__etext, .) - 0x000000000804888b PROVIDE (_etext, .) - 0x000000000804888b PROVIDE (etext, .) + 0x0000000008048938 PROVIDE (__etext, .) + 0x0000000008048938 PROVIDE (_etext, .) + 0x0000000008048938 PROVIDE (etext, .) .rodata *(.rodata .rodata.* .gnu.linkonce.r.*) @@ -112,8 +112,8 @@ LOAD tmp/amd64-darwin.macho-main.o .gcc_except_table *(.gcc_except_table .gcc_except_table.*) - 0x000000000804888b . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff)) - 0x000000000804988b . = (0x1000 DATA_SEGMENT_ALIGN 0x1000) + 0x0000000008048938 . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff)) + 0x0000000008049938 . = (0x1000 DATA_SEGMENT_ALIGN 0x1000) .eh_frame *(.eh_frame) @@ -128,22 +128,22 @@ LOAD tmp/amd64-darwin.macho-main.o *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) -.preinit_array 0x000000000804988b 0x0 - 0x000000000804988b PROVIDE (__preinit_array_start, .) +.preinit_array 0x0000000008049938 0x0 + 0x0000000008049938 PROVIDE (__preinit_array_start, .) *(.preinit_array) - 0x000000000804988b PROVIDE (__preinit_array_end, .) + 0x0000000008049938 PROVIDE (__preinit_array_end, .) -.init_array 0x000000000804988b 0x0 - 0x000000000804988b PROVIDE (__init_array_start, .) +.init_array 0x0000000008049938 0x0 + 0x0000000008049938 PROVIDE (__init_array_start, .) *(SORT(.init_array.*)) *(.init_array) - 0x000000000804988b PROVIDE (__init_array_end, .) + 0x0000000008049938 PROVIDE (__init_array_end, .) -.fini_array 0x000000000804988b 0x0 - 0x000000000804988b PROVIDE (__fini_array_start, .) +.fini_array 0x0000000008049938 0x0 + 0x0000000008049938 PROVIDE (__fini_array_start, .) *(.fini_array) *(SORT(.fini_array.*)) - 0x000000000804988b PROVIDE (__fini_array_end, .) + 0x0000000008049938 PROVIDE (__fini_array_end, .) .ctors *crtbegin*.o(.ctors) @@ -169,35 +169,35 @@ LOAD tmp/amd64-darwin.macho-main.o .got *(.got) - 0x000000000804988b . = (. DATA_SEGMENT_RELRO_END 0xc) + 0x0000000008049938 . = (. DATA_SEGMENT_RELRO_END 0xc) .got.plt *(.got.plt) -.data 0x000000000804988c 0x0 +.data 0x0000000008049938 0x0 *(.data .data.* .gnu.linkonce.d.*) - .data 0x000000000804988c 0x0 tmp/amd64-darwin.macho-fold.o - .data 0x000000000804988c 0x0 tmp/amd64-darwin.macho-main.o + .data 0x0000000008049938 0x0 tmp/amd64-darwin.macho-fold.o + .data 0x0000000008049938 0x0 tmp/amd64-darwin.macho-main.o *(.gnu.linkonce.d.*personality*) .data1 *(.data1) - 0x000000000804988c _edata = . - 0x000000000804988c PROVIDE (edata, .) - 0x000000000804988c __bss_start = . + 0x0000000008049938 _edata = . + 0x0000000008049938 PROVIDE (edata, .) + 0x0000000008049938 __bss_start = . -.bss 0x000000000804988c 0x0 +.bss 0x0000000008049938 0x0 *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) - .bss 0x000000000804988c 0x0 tmp/amd64-darwin.macho-fold.o - .bss 0x000000000804988c 0x0 tmp/amd64-darwin.macho-main.o + .bss 0x0000000008049938 0x0 tmp/amd64-darwin.macho-fold.o + .bss 0x0000000008049938 0x0 tmp/amd64-darwin.macho-main.o *(COMMON) - 0x000000000804988c . = ALIGN ((. != 0x0)?0x4:0x1) - 0x000000000804988c . = ALIGN (0x4) - 0x000000000804988c . = ALIGN (0x4) - 0x000000000804988c _end = . - 0x000000000804988c PROVIDE (end, .) - 0x000000000804988c . = DATA_SEGMENT_END (.) + 0x0000000008049938 . = ALIGN ((. != 0x0)?0x4:0x1) + 0x0000000008049938 . = ALIGN (0x4) + 0x0000000008049938 . = ALIGN (0x4) + 0x0000000008049938 _end = . + 0x0000000008049938 PROVIDE (end, .) + 0x0000000008049938 . = DATA_SEGMENT_END (.) .stab *(.stab) diff --git a/src/stub/tmp/arm.v5a-darwin.macho-fold.map b/src/stub/tmp/arm.v5a-darwin.macho-fold.map index 9436d249..55108168 100644 --- a/src/stub/tmp/arm.v5a-darwin.macho-fold.map +++ b/src/stub/tmp/arm.v5a-darwin.macho-fold.map @@ -72,7 +72,7 @@ LOAD tmp/arm.v5a-darwin.macho-main.o .plt *(.plt) -.text 0x0000000008048000 0x9b8 +.text 0x0000000008048000 0xa6c *(.text .stub .text.* .gnu.linkonce.t.*) .text 0x0000000008048000 0x22c tmp/arm.v5a-darwin.macho-fold.o 0x0000000008048128 munmap @@ -90,17 +90,17 @@ LOAD tmp/arm.v5a-darwin.macho-main.o 0x00000000080481d0 div10 0x000000000804813c mprotect 0x0000000008048100 close - .text 0x000000000804822c 0x78c tmp/arm.v5a-darwin.macho-main.o - 0x00000000080483e4 do_xmap - 0x0000000008048800 upx_main + .text 0x000000000804822c 0x840 tmp/arm.v5a-darwin.macho-main.o + 0x0000000008048408 do_xmap + 0x00000000080488b4 upx_main *(.text.*personality*) *(.gnu.warning) .fini *(.fini) - 0x00000000080489b8 PROVIDE (__etext, .) - 0x00000000080489b8 PROVIDE (_etext, .) - 0x00000000080489b8 PROVIDE (etext, .) + 0x0000000008048a6c PROVIDE (__etext, .) + 0x0000000008048a6c PROVIDE (_etext, .) + 0x0000000008048a6c PROVIDE (etext, .) .rodata *(.rodata .rodata.* .gnu.linkonce.r.*) @@ -116,8 +116,8 @@ LOAD tmp/arm.v5a-darwin.macho-main.o .gcc_except_table *(.gcc_except_table .gcc_except_table.*) - 0x00000000080489b8 . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff)) - 0x00000000080499b8 . = (0x1000 DATA_SEGMENT_ALIGN 0x1000) + 0x0000000008048a6c . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff)) + 0x0000000008049a6c . = (0x1000 DATA_SEGMENT_ALIGN 0x1000) .eh_frame *(.eh_frame) @@ -132,22 +132,22 @@ LOAD tmp/arm.v5a-darwin.macho-main.o *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) -.preinit_array 0x00000000080499b8 0x0 - 0x00000000080499b8 PROVIDE (__preinit_array_start, .) +.preinit_array 0x0000000008049a6c 0x0 + 0x0000000008049a6c PROVIDE (__preinit_array_start, .) *(.preinit_array) - 0x00000000080499b8 PROVIDE (__preinit_array_end, .) + 0x0000000008049a6c PROVIDE (__preinit_array_end, .) -.init_array 0x00000000080499b8 0x0 - 0x00000000080499b8 PROVIDE (__init_array_start, .) +.init_array 0x0000000008049a6c 0x0 + 0x0000000008049a6c PROVIDE (__init_array_start, .) *(SORT(.init_array.*)) *(.init_array) - 0x00000000080499b8 PROVIDE (__init_array_end, .) + 0x0000000008049a6c PROVIDE (__init_array_end, .) -.fini_array 0x00000000080499b8 0x0 - 0x00000000080499b8 PROVIDE (__fini_array_start, .) +.fini_array 0x0000000008049a6c 0x0 + 0x0000000008049a6c PROVIDE (__fini_array_start, .) *(.fini_array) *(SORT(.fini_array.*)) - 0x00000000080499b8 PROVIDE (__fini_array_end, .) + 0x0000000008049a6c PROVIDE (__fini_array_end, .) .ctors *crtbegin*.o(.ctors) @@ -173,35 +173,35 @@ LOAD tmp/arm.v5a-darwin.macho-main.o .got *(.got) - 0x00000000080499b8 . = (. DATA_SEGMENT_RELRO_END 0xc) + 0x0000000008049a6c . = (. DATA_SEGMENT_RELRO_END 0xc) .got.plt *(.got.plt) -.data 0x00000000080499b8 0x0 +.data 0x0000000008049a6c 0x0 *(.data .data.* .gnu.linkonce.d.*) - .data 0x00000000080499b8 0x0 tmp/arm.v5a-darwin.macho-fold.o - .data 0x00000000080499b8 0x0 tmp/arm.v5a-darwin.macho-main.o + .data 0x0000000008049a6c 0x0 tmp/arm.v5a-darwin.macho-fold.o + .data 0x0000000008049a6c 0x0 tmp/arm.v5a-darwin.macho-main.o *(.gnu.linkonce.d.*personality*) .data1 *(.data1) - 0x00000000080499b8 _edata = . - 0x00000000080499b8 PROVIDE (edata, .) - 0x00000000080499b8 __bss_start = . + 0x0000000008049a6c _edata = . + 0x0000000008049a6c PROVIDE (edata, .) + 0x0000000008049a6c __bss_start = . -.bss 0x00000000080499b8 0x0 +.bss 0x0000000008049a6c 0x0 *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) - .bss 0x00000000080499b8 0x0 tmp/arm.v5a-darwin.macho-fold.o - .bss 0x00000000080499b8 0x0 tmp/arm.v5a-darwin.macho-main.o + .bss 0x0000000008049a6c 0x0 tmp/arm.v5a-darwin.macho-fold.o + .bss 0x0000000008049a6c 0x0 tmp/arm.v5a-darwin.macho-main.o *(COMMON) - 0x00000000080499b8 . = ALIGN ((. != 0x0)?0x4:0x1) - 0x00000000080499b8 . = ALIGN (0x4) - 0x00000000080499b8 . = ALIGN (0x4) - 0x00000000080499b8 _end = . - 0x00000000080499b8 PROVIDE (end, .) - 0x00000000080499b8 . = DATA_SEGMENT_END (.) + 0x0000000008049a6c . = ALIGN ((. != 0x0)?0x4:0x1) + 0x0000000008049a6c . = ALIGN (0x4) + 0x0000000008049a6c . = ALIGN (0x4) + 0x0000000008049a6c _end = . + 0x0000000008049a6c PROVIDE (end, .) + 0x0000000008049a6c . = DATA_SEGMENT_END (.) .stab *(.stab) diff --git a/src/stub/tmp/arm64-darwin.macho-fold.map b/src/stub/tmp/arm64-darwin.macho-fold.map index 4ab19b6e..d38e89a0 100644 --- a/src/stub/tmp/arm64-darwin.macho-fold.map +++ b/src/stub/tmp/arm64-darwin.macho-fold.map @@ -67,7 +67,7 @@ LOAD tmp/arm64-darwin.macho-main.o *(.iplt) .iplt 0x0000000000400080 0x0 tmp/arm64-darwin.macho-fold.o -.text 0x0000000000400078 0x8d8 +.text 0x0000000000400078 0x984 *(.text.unlikely .text.*_unlikely .text.unlikely.*) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) @@ -87,16 +87,16 @@ LOAD tmp/arm64-darwin.macho-main.o 0x000000000040018c mmap 0x0000000000400198 pread 0x00000000004001a4 bswap - .text 0x00000000004001d0 0x780 tmp/arm64-darwin.macho-main.o + .text 0x00000000004001d0 0x82c tmp/arm64-darwin.macho-main.o 0x000000000040037c do_xmap - 0x0000000000400774 upx_main + 0x0000000000400820 upx_main *(.gnu.warning) .fini *(SORT(.fini)) - 0x0000000000400950 PROVIDE (__etext, .) - 0x0000000000400950 PROVIDE (_etext, .) - 0x0000000000400950 PROVIDE (etext, .) + 0x00000000004009fc PROVIDE (__etext, .) + 0x00000000004009fc PROVIDE (_etext, .) + 0x00000000004009fc PROVIDE (etext, .) .rodata *(.rodata .rodata.* .gnu.linkonce.r.*) @@ -107,18 +107,18 @@ LOAD tmp/arm64-darwin.macho-main.o .eh_frame_hdr *(.eh_frame_hdr) -.eh_frame 0x0000000000400950 0x110 +.eh_frame 0x0000000000400a00 0x118 *(.eh_frame) - .eh_frame 0x0000000000400950 0x110 tmp/arm64-darwin.macho-main.o - 0x100 (size before relaxing) + .eh_frame 0x0000000000400a00 0x118 tmp/arm64-darwin.macho-main.o + 0x108 (size before relaxing) .gcc_except_table *(.gcc_except_table .gcc_except_table.*) .exception_ranges *(.exception_ranges .exception_ranges*) - 0x0000000000400a60 . = (ALIGN (0x10000) - ((0x10000 - .) & 0xffff)) - 0x0000000000410a60 . = DATA_SEGMENT_ALIGN (0x10000, 0x1000) + 0x0000000000400b18 . = (ALIGN (0x10000) - ((0x10000 - .) & 0xffff)) + 0x0000000000410b18 . = DATA_SEGMENT_ALIGN (0x10000, 0x1000) .eh_frame *(.eh_frame) @@ -136,22 +136,22 @@ LOAD tmp/arm64-darwin.macho-main.o *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) -.preinit_array 0x0000000000410a60 0x0 - 0x0000000000410a60 PROVIDE (__preinit_array_start, .) +.preinit_array 0x0000000000410b18 0x0 + 0x0000000000410b18 PROVIDE (__preinit_array_start, .) *(.preinit_array) - 0x0000000000410a60 PROVIDE (__preinit_array_end, .) + 0x0000000000410b18 PROVIDE (__preinit_array_end, .) -.init_array 0x0000000000410a60 0x0 - 0x0000000000410a60 PROVIDE (__init_array_start, .) +.init_array 0x0000000000410b18 0x0 + 0x0000000000410b18 PROVIDE (__init_array_start, .) *(SORT(.init_array.*)) *(.init_array) - 0x0000000000410a60 PROVIDE (__init_array_end, .) + 0x0000000000410b18 PROVIDE (__init_array_end, .) -.fini_array 0x0000000000410a60 0x0 - 0x0000000000410a60 PROVIDE (__fini_array_start, .) +.fini_array 0x0000000000410b18 0x0 + 0x0000000000410b18 PROVIDE (__fini_array_start, .) *(SORT(.fini_array.*)) *(.fini_array) - 0x0000000000410a60 PROVIDE (__fini_array_end, .) + 0x0000000000410b18 PROVIDE (__fini_array_end, .) .ctors *crtbegin.o(.ctors) @@ -180,43 +180,43 @@ LOAD tmp/arm64-darwin.macho-main.o .got *(.got) *(.igot) - 0x0000000000410a60 . = DATA_SEGMENT_RELRO_END (., 0x18) + 0x0000000000410b18 . = DATA_SEGMENT_RELRO_END (., 0x18) -.got.plt 0x0000000000410a60 0x0 +.got.plt 0x0000000000410b18 0x0 *(.got.plt) *(.igot.plt) - .igot.plt 0x0000000000410a60 0x0 tmp/arm64-darwin.macho-fold.o + .igot.plt 0x0000000000410b18 0x0 tmp/arm64-darwin.macho-fold.o -.data 0x0000000000410a60 0x0 - 0x0000000000410a60 PROVIDE (__data_start, .) +.data 0x0000000000410b18 0x0 + 0x0000000000410b18 PROVIDE (__data_start, .) *(.data .data.* .gnu.linkonce.d.*) - .data 0x0000000000410a60 0x0 tmp/arm64-darwin.macho-fold.o - .data 0x0000000000410a60 0x0 tmp/arm64-darwin.macho-main.o + .data 0x0000000000410b18 0x0 tmp/arm64-darwin.macho-fold.o + .data 0x0000000000410b18 0x0 tmp/arm64-darwin.macho-main.o .data1 *(.data1) - 0x0000000000410a60 _edata = . - 0x0000000000410a60 PROVIDE (edata, .) - 0x0000000000410a60 . = . - 0x0000000000410a60 __bss_start = . - 0x0000000000410a60 __bss_start__ = . + 0x0000000000410b18 _edata = . + 0x0000000000410b18 PROVIDE (edata, .) + 0x0000000000410b18 . = . + 0x0000000000410b18 __bss_start = . + 0x0000000000410b18 __bss_start__ = . -.bss 0x0000000000410a60 0x0 +.bss 0x0000000000410b18 0x0 *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) - .bss 0x0000000000410a60 0x0 tmp/arm64-darwin.macho-fold.o - .bss 0x0000000000410a60 0x0 tmp/arm64-darwin.macho-main.o + .bss 0x0000000000410b18 0x0 tmp/arm64-darwin.macho-fold.o + .bss 0x0000000000410b18 0x0 tmp/arm64-darwin.macho-main.o *(COMMON) - 0x0000000000410a60 . = ALIGN ((. != 0x0)?0x8:0x1) - 0x0000000000410a60 _bss_end__ = . - 0x0000000000410a60 __bss_end__ = . - 0x0000000000410a60 . = ALIGN (0x8) - 0x0000000000410a60 . = SEGMENT_START ("ldata-segment", .) - 0x0000000000410a60 . = ALIGN (0x8) - 0x0000000000410a60 __end__ = . - 0x0000000000410a60 _end = . - 0x0000000000410a60 PROVIDE (end, .) - 0x0000000000410a60 . = DATA_SEGMENT_END (.) + 0x0000000000410b18 . = ALIGN ((. != 0x0)?0x8:0x1) + 0x0000000000410b18 _bss_end__ = . + 0x0000000000410b18 __bss_end__ = . + 0x0000000000410b18 . = ALIGN (0x8) + 0x0000000000410b18 . = SEGMENT_START ("ldata-segment", .) + 0x0000000000410b18 . = ALIGN (0x8) + 0x0000000000410b18 __end__ = . + 0x0000000000410b18 _end = . + 0x0000000000410b18 PROVIDE (end, .) + 0x0000000000410b18 . = DATA_SEGMENT_END (.) .stab *(.stab)