x86_64 stub also needs make_hatch()
https://github.com/upx/upx/issues/133 modified: stub/src/amd64-linux.elf-main.c modified: ../.github/travis_testsuite_1.sh also .h and .map
This commit is contained in:
parent
7bace76176
commit
1f929d47d0
14
.github/travis_testsuite_1.sh
vendored
14
.github/travis_testsuite_1.sh
vendored
@ -149,7 +149,7 @@ c3f44b4d00a87384c03a6f9e7aec809c1addfe3e271244d38a474f296603088c *mipsel-linux.e
|
||||
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
|
||||
"
|
||||
expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\
|
||||
4c50abad95a6f659bf82ff1b80046ec85ecbe089eb3faa7bc3745ba8b502a04d *amd64-linux.elf/upx-3.91
|
||||
fd8b72e7adf24e46235f445769a881d1cbb8e883a8ddf9a4663bb6b10a23440a *amd64-linux.elf/upx-3.91
|
||||
c1a6ef9d0b8a26f1d6e3307af6f119bc95411a54421c7da3bd6ade9c4eead187 *arm-wince.pe/upx-3.91.exe
|
||||
f8e9a7201a3016b4bbd97c0e468fc69affccc18fc5a71ba70c0aa1d2212f3027 *armeb-linux.elf/upx-3.91
|
||||
7d5f0fd6f18e4cd16655ef58805f228bcaddd5b035ce998faed446e290aea3d9 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||
@ -160,7 +160,7 @@ c4c8b912a48bcaaef72fd94cd0c307659a03be2ec359bf01a42a2a39307dd964 *m68k-atari.tos
|
||||
16b0d079f5d005222f346466e8c567219dfe4feb71a0662342d04168c07c3f8b *powerpc-linux.elf/upx-3.91
|
||||
"
|
||||
expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\
|
||||
40d50a15a0d46963407035b95a63d369041f6dfd874a977efac1a808c37c8d57 *amd64-linux.elf/upx-3.91
|
||||
906c1ba3e6165d828e56c4fec918c9dd81ac742ded137cc42636dcd68ee31040 *amd64-linux.elf/upx-3.91
|
||||
2bb2477bdf4643954b4bb707b1017459238b03f66883303cd20e9e8740764dd7 *arm-wince.pe/upx-3.91.exe
|
||||
4dfd0f09628bd76fd1d49a4de1c77e1d17227ca6659a009e987c8d85e93ebe4e *armeb-linux.elf/upx-3.91
|
||||
c52473f5dbdac560c05d5d173e5342b5e696e604517359baef581672eb25a9e6 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||
@ -171,7 +171,7 @@ ef94d8b0e02a650c302bec9f2d50462f2accc2fbb8003cc4977bc550d2e5b9f2 *m68k-atari.tos
|
||||
81ee676127a44a63945a3b2d6e7272623df0620c6bef935252b43970c977f562 *powerpc-linux.elf/upx-3.91
|
||||
"
|
||||
expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\
|
||||
9a69b0e1984fa8b7f77cb54e2ce07189b23a8840a2e2f8908ed0bcf7d51f32cf *amd64-linux.elf/upx-3.91
|
||||
bb8ca19268e5b1d5f1f8c1c46ec8a7ead470f1883f0b0c0166148eedb54560d0 *amd64-linux.elf/upx-3.91
|
||||
0915344e0ee8e7c006e6cce71c024f518e097a88820c7ab3ca183ab1c614ce82 *arm-wince.pe/upx-3.91.exe
|
||||
ea3103c3df4f09ab6f9a720be8c52ce8d3f8540b0ddc33abfbaa3273fcb5bd87 *armeb-linux.elf/upx-3.91
|
||||
5c5ff78652e76834f3f9ab110c42e3a34ef54c748bce212b0e942049f43f5d4d *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||
@ -182,7 +182,7 @@ dfc6abff2d3417b9708b1232d5791a9232c6623dcedb9dcb59428b67bbf864e9 *m68k-atari.tos
|
||||
f5d1badd9bdeb0e5c9ad6bacec7c24963bd37fa8e7a36a2db8b3d8f957f16ae6 *powerpc-linux.elf/upx-3.91
|
||||
"
|
||||
expected_sha256sums__t140_compress_lzma_2_no_filter="\
|
||||
f75a024db06d60dd70ab321196847af955c4e812f55439a584ff960bd336ec10 *amd64-linux.elf/upx-3.91
|
||||
7e890b2f684329dc036f913536dc61472721d73825a75892952cd363dc1ab7a4 *amd64-linux.elf/upx-3.91
|
||||
3af2a2346a252dfacefb6209725907b2947dc1ccf5e99af139608354f852507c *arm-wince.pe/upx-3.91.exe
|
||||
2fcace545a64bc19e82a18ff16d8b5b106b4f6b3a8e4a318dec00c6a5308ec61 *armeb-linux.elf/upx-3.91
|
||||
964fb400b0b4a2b1926ce7076610db8c3a8e41807fe030209af1615d43b6a020 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||
@ -193,7 +193,7 @@ f75a024db06d60dd70ab321196847af955c4e812f55439a584ff960bd336ec10 *amd64-linux.el
|
||||
b79c08d2ba96a669b207f8b09a9603df17fdda316f49159d2d30857d18c7ab85 *powerpc-linux.elf/upx-3.91
|
||||
"
|
||||
expected_sha256sums__t150_compress_ucl_2_all_filters="\
|
||||
00c002d151486fa4201a8ed85f05e2ea9f7aa13e36253ff7d5ce5b3db5b5438a *amd64-linux.elf/upx-3.91
|
||||
2e8cb4e0af4c9620d7ad6de6df535f6be388a2275c5a5c70d6c074e8e15c3dea *amd64-linux.elf/upx-3.91
|
||||
dc7323e753ce62e6a1c22112f139953dbaa1e5268530479f8ad48e0c54062295 *arm-wince.pe/upx-3.91.exe
|
||||
28bdf621be8b1e6d5c6df647232417d6b3eb3103f94fe5ed1cecb449099f170b *armeb-linux.elf/upx-3.91
|
||||
8614d93ba30def6866b3be92ae5bdd5f294266e0fc4a26c078682917f127656d *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||
@ -204,7 +204,7 @@ dc7323e753ce62e6a1c22112f139953dbaa1e5268530479f8ad48e0c54062295 *arm-wince.pe/u
|
||||
7323c6f928549a61f1ff705af523ce4b8b420d114f4abd1fa91dab33b0938329 *powerpc-linux.elf/upx-3.91
|
||||
"
|
||||
expected_sha256sums__t160_compress_all_methods_1_no_filter="\
|
||||
496d15162a22f677a1e4105925f1334981807c5bf1ae43e7e00e0373f89cd8fe *amd64-linux.elf/upx-3.91
|
||||
011ff89c098768e23b1bfbce85161d187c78eca6c1a6165bc22d26c0e6b111b4 *amd64-linux.elf/upx-3.91
|
||||
1c9c618741739404f40d198d2fc77010539589379bf260502af9f10f1ec0d05b *arm-wince.pe/upx-3.91.exe
|
||||
9650cd1ca32414fc25a85999dde2e927239f2158a9d49e9e99ab88ed1ecd2cef *armeb-linux.elf/upx-3.91
|
||||
863bbf7f3cf41296987b085a4db8acba372e3d65d8d9c656f9a7276f2e7aa4d3 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||
@ -215,7 +215,7 @@ dfe91501e4cb0b9e4686ffa9aa1e0e9bf1ea8b4c363fbc2cd35713d11267bcc5 *mipsel-linux.e
|
||||
a25a6932e539861cd28eaa0b7b9192c5f4de826d4552d9ef0206565adedc2da5 *powerpc-linux.elf/upx-3.91
|
||||
"
|
||||
expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\
|
||||
ffcdbd72b65c94924e51248fc68c2d787798633846af9324719e6f67140e92b1 *amd64-linux.elf/upx-3.91
|
||||
1ffc826e136538484c697b784bd692f9da101e4f7e76de111390fce5bab76b2b *amd64-linux.elf/upx-3.91
|
||||
66653a91c355a1ad1ab7b07c6c20b2d2899d0f42078683d0f4d540df476b1afb *arm-wince.pe/upx-3.91.exe
|
||||
6cbf1744a7bbc16fbf15c197d9d6aaa3599ce3f033bda143e51812ecfa0d0906 *armeb-linux.elf/upx-3.91
|
||||
490a196fbba4a8f21bfb9ac2a3b92a6dc7e287f255a3ab987f7d29d5a75d8db4 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* amd64-linux.elf-fold.h
|
||||
created from amd64-linux.elf-fold.bin, 2050 (0x802) bytes
|
||||
created from amd64-linux.elf-fold.bin, 2125 (0x84d) bytes
|
||||
|
||||
This file is part of the UPX executable compressor.
|
||||
|
||||
@ -31,20 +31,20 @@
|
||||
*/
|
||||
|
||||
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_SIZE 2050
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_ADLER32 0xb09b0569
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_CRC32 0x523d8b2c
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_SIZE 2125
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_ADLER32 0x12f6192b
|
||||
#define STUB_AMD64_LINUX_ELF_FOLD_CRC32 0x1734f17b
|
||||
|
||||
unsigned char stub_amd64_linux_elf_fold[2050] = {
|
||||
unsigned char stub_amd64_linux_elf_fold[2125] = {
|
||||
/* 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 */ 2, 8, 0, 0, 0, 0, 0, 0, 4, 8, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0060 */ 77, 8, 0, 0, 0, 0, 0, 0, 80, 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 */ 2, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
/* 0x0080 */ 77, 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,
|
||||
@ -65,7 +65,7 @@ unsigned char stub_amd64_linux_elf_fold[2050] = {
|
||||
/* 0x01a0 */ 224, 8, 72, 41,199, 73,137,254, 72,131,239, 8, 73,141,119,248,
|
||||
/* 0x01b0 */ 72,193,233, 3,243, 72,165, 72,141,103, 8,252, 75,141, 12, 38,
|
||||
/* 0x01c0 */ 65, 89, 94, 95, 72,139, 68, 36, 16, 72,129,236, 0, 8, 0, 0,
|
||||
/* 0x01d0 */ 72,137,226, 73,137,232, 80,232,227, 4, 0, 0, 80, 93, 90, 72,
|
||||
/* 0x01d0 */ 72,137,226, 73,137,232, 80,232, 46, 5, 0, 0, 80, 93, 90, 72,
|
||||
/* 0x01e0 */ 129,196, 0, 8, 0, 0,106, 2, 41,246, 83, 95, 88, 15, 5,147,
|
||||
/* 0x01f0 */ 106, 9, 69, 41,201, 65,137,216,106, 2, 65, 90,106, 1, 90,190,
|
||||
/* 0x0200 */ 0, 16, 0, 0,106, 0, 95, 88, 15, 5,106, 3,137,223, 88, 15,
|
||||
@ -97,72 +97,76 @@ unsigned char stub_amd64_linux_elf_fold[2050] = {
|
||||
/* 0x03a0 */ 73,137,208,116, 41, 72,139, 7,137,241, 72, 57,200,116, 17, 72,
|
||||
/* 0x03b0 */ 255,200, 15,148,194, 49,192,133,246, 15,149,192,133,194,116, 8,
|
||||
/* 0x03c0 */ 72,137, 15, 76,137, 71, 8,195, 72,131,199, 16,235,215,195, 65,
|
||||
/* 0x03d0 */ 87,184, 0, 0, 0, 0, 73,137,255, 65, 86, 65, 85, 65, 84, 73,
|
||||
/* 0x03e0 */ 137,252, 85, 83, 72,131,236,104, 76, 3,103, 32,102,131,127, 16,
|
||||
/* 0x03f0 */ 3,137, 84, 36, 60, 15,183, 87, 56, 72,137, 76, 36, 48,185, 16,
|
||||
/* 0x0400 */ 0, 0, 0, 72,137,116, 36, 64, 76,137, 68, 36, 40, 76,137, 76,
|
||||
/* 0x0410 */ 36, 32, 15, 68,200, 76,137,230, 72,131,205,255, 49,219,131,193,
|
||||
/* 0x03d0 */ 87,184, 0, 0, 0, 0, 65, 86, 73,137,254, 65, 85, 65, 84, 73,
|
||||
/* 0x03e0 */ 137,252, 85, 83, 72,131,236, 88, 76, 3,103, 32,102,131,127, 16,
|
||||
/* 0x03f0 */ 3,137, 84, 36, 44, 15,183, 87, 56, 72,137, 76, 36, 32,185, 16,
|
||||
/* 0x0400 */ 0, 0, 0, 72,137,116, 36, 48, 76,137, 68, 36, 24, 76,137, 76,
|
||||
/* 0x0410 */ 36, 16, 15, 68,200, 76,137,230, 72,131,205,255, 49,219,131,193,
|
||||
/* 0x0420 */ 34,255,202,120, 33,131, 62, 1,117, 22, 72,139, 70, 16, 72, 57,
|
||||
/* 0x0430 */ 232, 72, 15, 66,232, 72, 3, 70, 40, 72, 57,195, 72, 15, 66,216,
|
||||
/* 0x0440 */ 72,131,198, 56,235,219, 72,129,229, 0,240,255,255, 49,210, 69,
|
||||
/* 0x0450 */ 49,201, 72, 41,235, 65,131,200,255, 72,137,239, 72,129,195,255,
|
||||
/* 0x0460 */ 15, 0, 0, 72,129,227, 0,240,255,255, 72,137,222,232,170,253,
|
||||
/* 0x0470 */ 255,255, 72,141, 20, 24, 72, 41,232,102, 65,131,127, 56, 0, 72,
|
||||
/* 0x0480 */ 137, 68, 36, 24,199, 68, 36, 20, 0, 0, 0, 0, 72,137, 84, 36,
|
||||
/* 0x0490 */ 72, 15,132,240, 1, 0, 0, 72,131,124, 36, 64, 0,116, 37, 65,
|
||||
/* 0x04a0 */ 131, 60, 36, 6,117, 30, 72,139, 84, 36, 24, 73, 3, 84, 36, 16,
|
||||
/* 0x04b0 */ 190, 3, 0, 0, 0, 72,139,124, 36, 48,232,222,254,255,255,233,
|
||||
/* 0x04c0 */ 172, 1, 0, 0, 65,131, 60, 36, 1, 15,133,161, 1, 0, 0, 72,
|
||||
/* 0x04d0 */ 131,124, 36, 64, 0,116, 77, 73,131,124, 36, 8, 0,117, 69, 72,
|
||||
/* 0x04e0 */ 139, 84, 36, 24, 73, 3, 84, 36, 16,190, 3, 0, 0, 0, 73, 3,
|
||||
/* 0x04f0 */ 87, 32, 72,139,124, 36, 48,232,161,254,255,255, 73, 15,183, 87,
|
||||
/* 0x0500 */ 56, 72,139,124, 36, 48,190, 5, 0, 0, 0,232,141,254,255,255,
|
||||
/* 0x0510 */ 73, 15,183, 87, 54, 72,139,124, 36, 48,190, 4, 0, 0, 0,232,
|
||||
/* 0x0520 */ 121,254,255,255, 72,139, 68, 36, 24, 73, 3, 68, 36, 16, 65,190,
|
||||
/* 0x0530 */ 64, 98, 81,115, 65,139, 76, 36, 4, 65,131,200,255, 73,139, 84,
|
||||
/* 0x0540 */ 36, 32, 72,137,197, 72,137, 68, 36, 88, 73,139, 68, 36, 40,131,
|
||||
/* 0x0550 */ 225, 7, 72,137,235, 72,137, 84, 36, 80,193,225, 2,129,227,255,
|
||||
/* 0x0560 */ 15, 0, 0, 72, 1,232, 65,211,238, 72, 41,221, 72,137, 68, 36,
|
||||
/* 0x0570 */ 8, 73,139, 68, 36, 8, 65,131,230, 7, 76,141, 44, 26,185, 50,
|
||||
/* 0x0580 */ 0, 0, 0, 72, 41,216, 72,131,124, 36, 64, 0,117, 7, 68,139,
|
||||
/* 0x0590 */ 68, 36, 60,177, 18, 68,137,242, 73,137,193, 76,137,238,131,202,
|
||||
/* 0x05a0 */ 2, 72,131,124, 36, 64, 0, 72,137,239, 65, 15, 68,214,232,105,
|
||||
/* 0x05b0 */ 252,255,255, 72, 57,197,117,121, 72,131,124, 36, 64, 0,116, 25,
|
||||
/* 0x05c0 */ 72,139, 76, 36, 32, 72,139, 84, 36, 40, 72,141,116, 36, 80, 72,
|
||||
/* 0x05d0 */ 139,124, 36, 64,232,179,252,255,255, 76,137,235, 72,247,219,129,
|
||||
/* 0x05e0 */ 227,255, 15, 0, 0, 65,246,198, 2,116, 13, 74,141,124, 45, 0,
|
||||
/* 0x05f0 */ 49,192, 72,137,217,252,243,170, 72,131,124, 36, 64, 0,116, 59,
|
||||
/* 0x0600 */ 73,131,124, 36, 8, 0,117, 23, 72,139,124, 36, 48, 72,141, 85,
|
||||
/* 0x0610 */ 12,199, 69, 12, 15, 5,195,144, 49,246,232,126,253,255,255, 68,
|
||||
/* 0x0620 */ 137,242, 76,137,238, 72,137,239,232, 26,252,255,255,133,192,116,
|
||||
/* 0x0630 */ 10,191,127, 0, 0, 0,232,248,251,255,255, 73,141, 68, 29, 0,
|
||||
/* 0x0640 */ 72, 1,197, 72, 59,108, 36, 8,115, 38, 72, 41,108, 36, 8, 69,
|
||||
/* 0x0650 */ 49,201, 65,131,200,255, 72,139,116, 36, 8,185, 50, 0, 0, 0,
|
||||
/* 0x0660 */ 68,137,242, 72,137,239,232,177,251,255,255, 72, 57,197,117,193,
|
||||
/* 0x0670 */ 255, 68, 36, 20, 65, 15,183, 71, 56, 73,131,196, 56, 57, 68, 36,
|
||||
/* 0x0680 */ 20, 15,140, 16,254,255,255, 72,131,188, 36,160, 0, 0, 0, 0,
|
||||
/* 0x0690 */ 116, 16, 72,139, 68, 36, 24, 72,139,148, 36,160, 0, 0, 0, 72,
|
||||
/* 0x06a0 */ 137, 2, 73,139, 87, 24, 72, 1, 84, 36, 24, 72,139, 68, 36, 24,
|
||||
/* 0x06b0 */ 72,131,196,104, 91, 93, 65, 92, 65, 93, 65, 94, 65, 95,195, 65,
|
||||
/* 0x06c0 */ 87, 65, 86, 73,137,206, 49,201, 65, 85, 65, 84, 77,137,204, 85,
|
||||
/* 0x06d0 */ 72,137,213, 76,141,109, 64, 83, 76,137,195, 72,131,236, 72,139,
|
||||
/* 0x06e0 */ 7, 72,137,124, 36, 24, 72,137,116, 36, 16, 72,137,124, 36, 40,
|
||||
/* 0x06f0 */ 72,137,116, 36, 32, 72,141,124, 36, 16, 72,141,116, 36, 48, 72,
|
||||
/* 0x0700 */ 137, 84, 36, 56, 76,137,194, 72,137, 68, 36, 48,232,123,251,255,
|
||||
/* 0x0710 */ 255, 72,141,132, 36,128, 0, 0, 0, 72,137, 68, 36, 8, 65, 83,
|
||||
/* 0x0720 */ 77,137,225, 49,210, 73,137,216, 72,141,116, 36, 40, 80, 76,137,
|
||||
/* 0x0730 */ 241, 72,137,239, 69, 49,255,232,147,252,255,255,190, 9, 0, 0,
|
||||
/* 0x0740 */ 0, 72,137,194, 76,137,247, 73,137,196,232, 78,252,255,255,102,
|
||||
/* 0x0750 */ 131,125, 56, 0, 65, 89, 65, 90, 15,132,146, 0, 0, 0, 65,131,
|
||||
/* 0x0760 */ 125, 0, 3,117,119, 72,139, 68, 36, 8, 49,210, 49,246, 72,139,
|
||||
/* 0x0770 */ 56, 73, 3,125, 16,232,197,250,255,255,133,192,137,195,120, 23,
|
||||
/* 0x0780 */ 186, 0, 4, 0, 0, 72,137,238,137,199,232,192,250,255,255, 72,
|
||||
/* 0x0790 */ 61, 0, 4, 0, 0,116, 10,191,127, 0, 0, 0,232,146,250,255,
|
||||
/* 0x07a0 */ 255, 65, 80,255,116, 36, 16, 69, 49,201, 69, 49,192, 49,201,137,
|
||||
/* 0x07b0 */ 218, 49,246, 72,137,239,232, 20,252,255,255, 73,137,196, 72,139,
|
||||
/* 0x07c0 */ 68, 36, 24,190, 7, 0, 0, 0, 76,137,247, 72,139, 16,232,202,
|
||||
/* 0x07d0 */ 251,255,255,137,223,232, 97,250,255,255, 94, 95, 15,183, 69, 56,
|
||||
/* 0x07e0 */ 65,255,199, 73,131,197, 56, 65, 57,199, 15,130,110,255,255,255,
|
||||
/* 0x07f0 */ 72,131,196, 72, 76,137,224, 91, 93, 65, 92, 65, 93, 65, 94, 65,
|
||||
/* 0x0800 */ 95,195
|
||||
/* 0x0470 */ 255,255, 73,137,197, 72,141, 20, 24,199, 68, 36, 12, 0, 0, 0,
|
||||
/* 0x0480 */ 0, 73, 41,237,102, 65,131,126, 56, 0, 72,137, 84, 36, 56, 15,
|
||||
/* 0x0490 */ 132, 73, 2, 0, 0, 72,131,124, 36, 48, 0,116, 35, 65,131, 60,
|
||||
/* 0x04a0 */ 36, 6,117, 28, 73,139, 84, 36, 16, 72,139,124, 36, 32,190, 3,
|
||||
/* 0x04b0 */ 0, 0, 0, 76, 1,234,232,226,254,255,255,233, 7, 2, 0, 0,
|
||||
/* 0x04c0 */ 65,131, 60, 36, 1, 15,133,252, 1, 0, 0, 72,131,124, 36, 48,
|
||||
/* 0x04d0 */ 0,116, 75, 73,131,124, 36, 8, 0,117, 67, 73,139, 84, 36, 16,
|
||||
/* 0x04e0 */ 72,139,124, 36, 32,190, 3, 0, 0, 0, 76, 1,234, 73, 3, 86,
|
||||
/* 0x04f0 */ 32,232,167,254,255,255, 73, 15,183, 86, 56, 72,139,124, 36, 32,
|
||||
/* 0x0500 */ 190, 5, 0, 0, 0,232,147,254,255,255, 73, 15,183, 86, 54, 72,
|
||||
/* 0x0510 */ 139,124, 36, 32,190, 4, 0, 0, 0,232,127,254,255,255, 73,139,
|
||||
/* 0x0520 */ 68, 36, 16, 65,139, 76, 36, 4, 65,131,200,255,199, 68, 36, 8,
|
||||
/* 0x0530 */ 64, 98, 81,115, 73,139, 84, 36, 32, 76, 1,232,131,225, 7, 72,
|
||||
/* 0x0540 */ 137,197, 72,137, 68, 36, 72, 73,139, 68, 36, 40, 72,137,235,193,
|
||||
/* 0x0550 */ 225, 2,211,108, 36, 8,129,227,255, 15, 0, 0,131,100, 36, 8,
|
||||
/* 0x0560 */ 7, 72,137, 84, 36, 64, 72, 1,232, 72, 41,221, 76,141, 60, 26,
|
||||
/* 0x0570 */ 72,137, 4, 36,185, 50, 0, 0, 0, 73,139, 68, 36, 8, 72, 41,
|
||||
/* 0x0580 */ 216, 72,131,124, 36, 48, 0,117, 7, 68,139, 68, 36, 44,177, 18,
|
||||
/* 0x0590 */ 139, 84, 36, 8, 73,137,193, 76,137,254, 72,137,239,131,202, 2,
|
||||
/* 0x05a0 */ 72,131,124, 36, 48, 0, 15, 68, 84, 36, 8,232,108,252,255,255,
|
||||
/* 0x05b0 */ 72, 57,197, 15,133,210, 0, 0, 0, 72,131,124, 36, 48, 0,116,
|
||||
/* 0x05c0 */ 25, 72,139, 76, 36, 16, 72,139, 84, 36, 24, 72,141,116, 36, 64,
|
||||
/* 0x05d0 */ 72,139,124, 36, 48,232,178,252,255,255, 76,137,251, 72,247,219,
|
||||
/* 0x05e0 */ 129,227,255, 15, 0, 0,246, 68, 36, 8, 2,116, 13, 74,141,124,
|
||||
/* 0x05f0 */ 61, 0, 49,192, 72,137,217,252,243,170, 72,131,124, 36, 48, 0,
|
||||
/* 0x0600 */ 15,132,143, 0, 0, 0, 72,184,255,255,255,255, 1, 0, 0, 0,
|
||||
/* 0x0610 */ 73, 35, 4, 36, 72,186, 1, 0, 0, 0, 1, 0, 0, 0, 72, 57,
|
||||
/* 0x0620 */ 208,117, 85, 73,139, 84, 36, 40, 73,139,116, 36, 16, 73, 59, 84,
|
||||
/* 0x0630 */ 36, 32, 72,141, 4, 50, 74,141, 12, 40,117, 14,137,200,247,216,
|
||||
/* 0x0640 */ 37,255, 15, 0, 0,131,248, 3,119, 20, 76,137,232, 72,193,224,
|
||||
/* 0x0650 */ 6, 73,131,124, 36, 8, 0, 72,141, 76, 6, 12,117, 26, 72,133,
|
||||
/* 0x0660 */ 201,199, 1, 15, 5,195,144,116, 15, 72,139,124, 36, 32, 72,137,
|
||||
/* 0x0670 */ 202, 49,246,232, 37,253,255,255,139, 84, 36, 8, 76,137,254, 72,
|
||||
/* 0x0680 */ 137,239,232,192,251,255,255,133,192,116, 10,191,127, 0, 0, 0,
|
||||
/* 0x0690 */ 232,158,251,255,255, 73,141, 4, 31, 72, 1,197, 72, 59, 44, 36,
|
||||
/* 0x06a0 */ 115, 37, 72, 41, 44, 36,139, 84, 36, 8, 69, 49,201, 72,139, 52,
|
||||
/* 0x06b0 */ 36, 65,131,200,255,185, 50, 0, 0, 0, 72,137,239,232, 90,251,
|
||||
/* 0x06c0 */ 255,255, 72, 57,197,117,196,255, 68, 36, 12, 65, 15,183, 70, 56,
|
||||
/* 0x06d0 */ 73,131,196, 56, 57, 68, 36, 12, 15,140,183,253,255,255, 72,131,
|
||||
/* 0x06e0 */ 188, 36,144, 0, 0, 0, 0,116, 11, 72,139,132, 36,144, 0, 0,
|
||||
/* 0x06f0 */ 0, 76,137, 40, 77, 3,110, 24, 72,131,196, 88, 91, 93, 65, 92,
|
||||
/* 0x0700 */ 76,137,232, 65, 93, 65, 94, 65, 95,195, 65, 87, 65, 86, 73,137,
|
||||
/* 0x0710 */ 206, 49,201, 65, 85, 65, 84, 77,137,204, 85, 72,137,213, 76,141,
|
||||
/* 0x0720 */ 109, 64, 83, 76,137,195, 72,131,236, 72,139, 7, 72,137,124, 36,
|
||||
/* 0x0730 */ 24, 72,137,116, 36, 16, 72,137,124, 36, 40, 72,137,116, 36, 32,
|
||||
/* 0x0740 */ 72,141,124, 36, 16, 72,141,116, 36, 48, 72,137, 84, 36, 56, 76,
|
||||
/* 0x0750 */ 137,194, 72,137, 68, 36, 48,232, 48,251,255,255, 72,141,132, 36,
|
||||
/* 0x0760 */ 128, 0, 0, 0, 72,137, 68, 36, 8, 65, 83, 77,137,225, 49,210,
|
||||
/* 0x0770 */ 73,137,216, 72,141,116, 36, 40, 80, 76,137,241, 72,137,239, 69,
|
||||
/* 0x0780 */ 49,255,232, 72,252,255,255,190, 9, 0, 0, 0, 72,137,194, 76,
|
||||
/* 0x0790 */ 137,247, 73,137,196,232, 3,252,255,255,102,131,125, 56, 0, 65,
|
||||
/* 0x07a0 */ 89, 65, 90, 15,132,146, 0, 0, 0, 65,131,125, 0, 3,117,119,
|
||||
/* 0x07b0 */ 72,139, 68, 36, 8, 49,210, 49,246, 72,139, 56, 73, 3,125, 16,
|
||||
/* 0x07c0 */ 232,122,250,255,255,133,192,137,195,120, 23,186, 0, 4, 0, 0,
|
||||
/* 0x07d0 */ 72,137,238,137,199,232,117,250,255,255, 72, 61, 0, 4, 0, 0,
|
||||
/* 0x07e0 */ 116, 10,191,127, 0, 0, 0,232, 71,250,255,255, 65, 80,255,116,
|
||||
/* 0x07f0 */ 36, 16, 69, 49,201, 69, 49,192, 49,201,137,218, 49,246, 72,137,
|
||||
/* 0x0800 */ 239,232,201,251,255,255, 73,137,196, 72,139, 68, 36, 24,190, 7,
|
||||
/* 0x0810 */ 0, 0, 0, 76,137,247, 72,139, 16,232,127,251,255,255,137,223,
|
||||
/* 0x0820 */ 232, 22,250,255,255, 94, 95, 15,183, 69, 56, 65,255,199, 73,131,
|
||||
/* 0x0830 */ 197, 56, 65, 57,199, 15,130,110,255,255,255, 72,131,196, 72, 76,
|
||||
/* 0x0840 */ 137,224, 91, 93, 65, 92, 65, 93, 65, 94, 65, 95,195
|
||||
};
|
||||
|
||||
@ -203,7 +203,35 @@ ERR_LAB
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__powerpc64__) //{
|
||||
#if defined(__x86_64__) //{
|
||||
static void *
|
||||
make_hatch_x86_64(
|
||||
Elf64_Phdr const *const phdr,
|
||||
Elf64_Addr reloc,
|
||||
unsigned const frag_mask
|
||||
)
|
||||
{
|
||||
unsigned *hatch = 0;
|
||||
DPRINTF("make_hatch %%p %%x %%x\\n",phdr,reloc,frag_mask);
|
||||
if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) {
|
||||
// Try page fragmentation just beyond .text .
|
||||
if ( ( (hatch = (void *)(phdr->p_memsz + phdr->p_vaddr + reloc)),
|
||||
( phdr->p_memsz==phdr->p_filesz // don't pollute potential .bss
|
||||
&& (1*4)<=(frag_mask & -(int)(size_t)hatch) ) ) // space left on page
|
||||
// Try Elf64_Ehdr.e_ident[12..15] . warning: 'const' cast away
|
||||
|| ( (hatch = (void *)(&((Elf64_Ehdr *)phdr->p_vaddr + reloc)->e_ident[12])),
|
||||
(phdr->p_offset==0) )
|
||||
)
|
||||
{
|
||||
hatch[0] = 0x90c3050f; // syscall; ret; nop
|
||||
}
|
||||
else {
|
||||
hatch = 0;
|
||||
}
|
||||
}
|
||||
return hatch;
|
||||
}
|
||||
#elif defined(__powerpc64__) //}{
|
||||
static void *
|
||||
make_hatch_ppc64(
|
||||
Elf64_Phdr const *const phdr,
|
||||
@ -373,17 +401,13 @@ do_xmap(
|
||||
}
|
||||
if (xi) {
|
||||
#if defined(__x86_64) //{
|
||||
if (0==phdr->p_offset) {
|
||||
Elf64_Ehdr *const ehdr = (Elf64_Ehdr *)addr;
|
||||
*(int *)&ehdr->e_ident[12] = 0x90c3050f; // syscall; ret; nop
|
||||
auxv_up(av, AT_NULL, (uint64_t)&ehdr->e_ident[12]);
|
||||
}
|
||||
void *const hatch = make_hatch_x86_64(phdr, reloc, ~PAGE_MASK);
|
||||
#elif defined(__powerpc64__) //}{
|
||||
void *const hatch = make_hatch_ppc64(phdr, reloc, ~PAGE_MASK);
|
||||
#endif //}
|
||||
if (0!=hatch) {
|
||||
auxv_up(av, AT_NULL, (size_t)hatch);
|
||||
}
|
||||
#endif //}
|
||||
if (0!=mprotect(addr, mlen, prot)) {
|
||||
err_exit(10);
|
||||
ERR_LAB
|
||||
|
||||
@ -8,7 +8,7 @@ Linker script and memory map
|
||||
|
||||
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
|
||||
|
||||
.text 0x00000000001000bc 0x748
|
||||
.text 0x00000000001000bc 0x794
|
||||
*(.text)
|
||||
.text 0x00000000001000bc 0x197 tmp/amd64-linux.elf-fold.o
|
||||
0x0000000000100243 munmap
|
||||
@ -21,20 +21,20 @@ Linker script and memory map
|
||||
0x0000000000100247 mprotect
|
||||
0x000000000010023b close
|
||||
*fill* 0x0000000000100253 0x1 00
|
||||
.text 0x0000000000100254 0x5ae tmp/amd64-linux.elf-main.o
|
||||
0x00000000001006bf upx_main
|
||||
.text 0x0000000000100254 0x5f9 tmp/amd64-linux.elf-main.o
|
||||
0x000000000010070a upx_main
|
||||
*(.data)
|
||||
*fill* 0x0000000000100802 0x2 00
|
||||
.data 0x0000000000100804 0x0 tmp/amd64-linux.elf-fold.o
|
||||
.data 0x0000000000100804 0x0 tmp/amd64-linux.elf-main.o
|
||||
*fill* 0x000000000010084d 0x3 00
|
||||
.data 0x0000000000100850 0x0 tmp/amd64-linux.elf-fold.o
|
||||
.data 0x0000000000100850 0x0 tmp/amd64-linux.elf-main.o
|
||||
|
||||
.data
|
||||
|
||||
.bss 0x0000000000100804 0x0
|
||||
.bss 0x0000000000100804 0x0 tmp/amd64-linux.elf-fold.o
|
||||
.bss 0x0000000000100804 0x0 tmp/amd64-linux.elf-main.o
|
||||
.bss 0x0000000000100850 0x0
|
||||
.bss 0x0000000000100850 0x0 tmp/amd64-linux.elf-fold.o
|
||||
.bss 0x0000000000100850 0x0 tmp/amd64-linux.elf-main.o
|
||||
|
||||
.rela.dyn 0x0000000000100808 0x0
|
||||
.rela.dyn 0x0000000000100850 0x0
|
||||
.rela.text 0x0000000000000000 0x0 tmp/amd64-linux.elf-fold.o
|
||||
LOAD tmp/amd64-linux.elf-fold.o
|
||||
LOAD tmp/amd64-linux.elf-main.o
|
||||
|
||||
Loading…
Reference in New Issue
Block a user