amd64-linux: DF_1_PIE marks a main program; stub juggles AT_PHDR for same

https://github.com/upx/upx/issues/105
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
	modified:   stub/src/amd64-linux.elf-main.c

	modified:   ../.github/travis_testsuite_1.sh
	modified:   stub/amd64-linux.elf-fold.h
	modified:   stub/tmp/amd64-linux.elf-fold.map
This commit is contained in:
John Reiser
2017-05-27 19:54:12 -07:00
parent d8f47e248a
commit 6e541a432f
6 changed files with 61 additions and 45 deletions
+31 -29
View File
@@ -1,5 +1,5 @@
/* amd64-linux.elf-fold.h
created from amd64-linux.elf-fold.bin, 1872 (0x750) bytes
created from amd64-linux.elf-fold.bin, 1901 (0x76d) bytes
This file is part of the UPX executable compressor.
@@ -31,20 +31,20 @@
*/
#define STUB_AMD64_LINUX_ELF_FOLD_SIZE 1872
#define STUB_AMD64_LINUX_ELF_FOLD_ADLER32 0x40f8c9fd
#define STUB_AMD64_LINUX_ELF_FOLD_CRC32 0xa53313c8
#define STUB_AMD64_LINUX_ELF_FOLD_SIZE 1901
#define STUB_AMD64_LINUX_ELF_FOLD_ADLER32 0x9209d80d
#define STUB_AMD64_LINUX_ELF_FOLD_CRC32 0x11d99f52
unsigned char stub_amd64_linux_elf_fold[1872] = {
unsigned char stub_amd64_linux_elf_fold[1901] = {
/* 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 */ 80, 7, 0, 0, 0, 0, 0, 0, 80, 7, 0, 0, 0, 0, 0, 0,
/* 0x0060 */ 109, 7, 0, 0, 0, 0, 0, 0,112, 7, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 0, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
/* 0x0080 */ 80, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0080 */ 109, 7, 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,
@@ -131,26 +131,28 @@ unsigned char stub_amd64_linux_elf_fold[1872] = {
/* 0x05c0 */ 0, 0, 0,116, 16, 72,139, 68, 36, 24, 72,139,148, 36,160, 0,
/* 0x05d0 */ 0, 0, 72,137, 2, 73,139, 87, 24, 72, 1, 84, 36, 24, 72,139,
/* 0x05e0 */ 68, 36, 24, 72,131,196,104, 91, 93, 65, 92, 65, 93, 65, 94, 65,
/* 0x05f0 */ 95,195, 65, 87, 69, 49,255, 65, 86, 73,137,206, 49,201, 65, 85,
/* 0x0600 */ 76,141,106, 64, 65, 84, 77,137,204, 85, 72,137,213, 83, 76,137,
/* 0x0610 */ 195, 72,131,236, 56,139, 7, 72,137, 52, 36, 72,137,116, 36, 16,
/* 0x0620 */ 72,141,116, 36, 32, 72,137, 84, 36, 40, 72,137,124, 36, 8, 76,
/* 0x0630 */ 137,194, 72,137,124, 36, 24, 72,137,231, 72,137, 68, 36, 32,232,
/* 0x0640 */ 212,251,255,255, 73,139, 85, 16,190, 3, 0, 0, 0, 76,137,247,
/* 0x0650 */ 72,131,194, 64,232,204,252,255,255, 72, 15,183, 85, 56,190, 5,
/* 0x0660 */ 0, 0, 0, 76,137,247,232,186,252,255,255, 65, 83, 77,137,225,
/* 0x0670 */ 49,210, 73,137,216, 76,137,241, 72,137,239, 72,141, 68, 36,120,
/* 0x0680 */ 72,141,116, 36, 24, 80,232,204,252,255,255,190, 9, 0, 0, 0,
/* 0x0690 */ 72,137,194, 76,137,247, 73,137,196,232,135,252,255,255,102,131,
/* 0x06a0 */ 125, 56, 0, 65, 89, 65, 90, 15,132,145, 0, 0, 0, 65,131,125,
/* 0x06b0 */ 0, 3,117,118, 72,139,124, 36,112, 73, 3,125, 16, 49,210, 49,
/* 0x06c0 */ 246,232, 11,251,255,255,133,192,137,195,120, 23,186, 0, 4, 0,
/* 0x06d0 */ 0, 72,137,238,137,199,232,242,250,255,255, 72, 61, 0, 4, 0,
/* 0x06e0 */ 0,116, 10,191,127, 0, 0, 0,232,236,250,255,255, 65, 80, 69,
/* 0x06f0 */ 49,201, 69, 49,192, 49,201,137,218, 72,141, 68, 36,120, 49,246,
/* 0x0700 */ 72,137,239, 80,232, 78,252,255,255, 72,139,148, 36,128, 0, 0,
/* 0x0710 */ 0,190, 7, 0, 0, 0, 76,137,247, 73,137,196,232, 4,252,255,
/* 0x0720 */ 255,137,223,232,173,250,255,255, 94, 95, 15,183, 69, 56, 65,255,
/* 0x0730 */ 199, 73,131,197, 56, 65, 57,199, 15,140,111,255,255,255, 72,131,
/* 0x0740 */ 196, 56, 76,137,224, 91, 93, 65, 92, 65, 93, 65, 94, 65, 95,195
/* 0x05f0 */ 95,195, 65, 87, 65, 86, 73,137,206, 49,201, 65, 85, 76,141,106,
/* 0x0600 */ 64, 65, 84, 77,137,204, 85, 72,137,213, 83, 76,137,195, 72,131,
/* 0x0610 */ 236, 56,139, 7, 72,137, 52, 36, 72,137,116, 36, 16, 72,141,116,
/* 0x0620 */ 36, 32, 72,137, 84, 36, 40, 72,137,124, 36, 8, 76,137,194, 72,
/* 0x0630 */ 137,124, 36, 24, 72,137,231, 72,137, 68, 36, 32,232,215,251,255,
/* 0x0640 */ 255, 73,139, 85, 16,190, 3, 0, 0, 0, 76,137,247, 72,131,194,
/* 0x0650 */ 64,232,207,252,255,255, 72, 15,183, 85, 56,190, 5, 0, 0, 0,
/* 0x0660 */ 76,137,247,232,189,252,255,255, 65, 83, 77,137,225, 49,210, 73,
/* 0x0670 */ 137,216, 76,137,241, 72,137,239, 72,141, 68, 36,120, 72,141,116,
/* 0x0680 */ 36, 24, 80,232,207,252,255,255, 73,131,125, 16, 0, 73,137,196,
/* 0x0690 */ 65, 89, 65, 90,117, 22, 72,139, 84, 36,112,190, 3, 0, 0, 0,
/* 0x06a0 */ 76,137,247, 72,131,194, 64,232,121,252,255,255, 76,137,226,190,
/* 0x06b0 */ 9, 0, 0, 0, 76,137,247,232,105,252,255,255, 69, 49,255,102,
/* 0x06c0 */ 131,125, 56, 0, 15,132,145, 0, 0, 0, 65,131,125, 0, 3,117,
/* 0x06d0 */ 118, 72,139,124, 36,112, 73, 3,125, 16, 49,210, 49,246,232,238,
/* 0x06e0 */ 250,255,255,133,192,137,195,120, 23,186, 0, 4, 0, 0, 72,137,
/* 0x06f0 */ 238,137,199,232,213,250,255,255, 72, 61, 0, 4, 0, 0,116, 10,
/* 0x0700 */ 191,127, 0, 0, 0,232,207,250,255,255, 65, 80, 69, 49,201, 69,
/* 0x0710 */ 49,192, 49,201,137,218, 72,141, 68, 36,120, 49,246, 72,137,239,
/* 0x0720 */ 80,232, 49,252,255,255, 72,139,148, 36,128, 0, 0, 0,190, 7,
/* 0x0730 */ 0, 0, 0, 76,137,247, 73,137,196,232,231,251,255,255,137,223,
/* 0x0740 */ 232,144,250,255,255, 94, 95, 15,183, 69, 56, 65,255,199, 73,131,
/* 0x0750 */ 197, 56, 65, 57,199, 15,140,111,255,255,255, 72,131,196, 56, 76,
/* 0x0760 */ 137,224, 91, 93, 65, 92, 65, 93, 65, 94, 65, 95,195
};