Files
upx/src/stub/i386-linux.elf-fold.h
T
John Reiser 067895fa5f Fix brk+munmap in folded stubs for main programs
qemu emulating a compressed ET_EXEC revealed an access to ElfXX_Phdr
on the discarded side of brk() during cleanup. qemu was more aggressive
than the Linux kernel implementation of brk().
        https://github.com/upx/upx/issues/683

	modified:   stub/src/i386-linux.elf-main.c
	modified:   stub/src/include/linux.h

	modified:   ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh

	modified:   stub/src/amd64-linux.elf-fold.S
	modified:   stub/src/arm.v4a-linux.elf-fold.S
	modified:   stub/src/arm64-linux.elf-fold.S
	modified:   stub/src/i386-linux.elf-fold.S
	modified:   stub/src/mipsel.r3000-linux.elf-fold.S
	modified:   stub/src/powerpc-linux.elf-fold.S
	modified:   stub/src/powerpc64le-linux.elf-fold.S

	modified:   stub/amd64-linux.elf-fold.h
	modified:   stub/arm.v4a-linux.elf-fold.h
	modified:   stub/arm.v5a-linux.elf-fold.h
	modified:   stub/arm64-linux.elf-fold.h
	modified:   stub/armeb.v4a-linux.elf-fold.h
	modified:   stub/i386-linux.elf-fold.h
	modified:   stub/mips.r3000-linux.elf-fold.h
	modified:   stub/mipsel.r3000-linux.elf-fold.h
	modified:   stub/powerpc-linux.elf-fold.h
	modified:   stub/powerpc64-linux.elf-fold.h
	modified:   stub/powerpc64le-linux.elf-fold.h

	modified:   stub/tmp/amd64-linux.elf-fold.map
	modified:   stub/tmp/arm.v4a-linux.elf-fold.map
	modified:   stub/tmp/arm.v5a-linux.elf-fold.map
	modified:   stub/tmp/arm64-linux.elf-fold.map
	modified:   stub/tmp/armeb.v4a-linux.elf-fold.map
	modified:   stub/tmp/i386-linux.elf-fold.map
	modified:   stub/tmp/mips.r3000-linux.elf-fold.map
	modified:   stub/tmp/mipsel.r3000-linux.elf-fold.map
	modified:   stub/tmp/powerpc-linux.elf-fold.map
	modified:   stub/tmp/powerpc64-linux.elf-fold.map
	modified:   stub/tmp/powerpc64le-linux.elf-fold.map
2023-07-17 07:21:56 +02:00

167 lines
11 KiB
C++
Generated

/* i386-linux.elf-fold.h
created from i386-linux.elf-fold.bin, 2017 (0x7e1) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 2000-2023 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<markus@oberhumer.com> <ezerotven+github@gmail.com>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
#define STUB_I386_LINUX_ELF_FOLD_SIZE 2017
#define STUB_I386_LINUX_ELF_FOLD_ADLER32 0x9a0f67ff
#define STUB_I386_LINUX_ELF_FOLD_CRC32 0x1eb7dd56
unsigned char stub_i386_linux_elf_fold[2017] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0,
/* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0,
/* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0,
/* 0x0040 */ 0, 16,192, 0,225, 7, 0, 0,228, 7, 0, 0, 5, 0, 0, 0,
/* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0,225, 7, 0, 0, 0, 0, 0, 0,
/* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0080 */ 87, 81, 80,137,230,129,236, 0, 16, 0, 0,137,231,106, 8, 89,
/* 0x0090 */ 243,165, 85,137,229,173,133,192,171,117,250, 87,171,173,133,192,
/* 0x00a0 */ 171,117,250, 87,173,133,192,171,165,117,249, 64,131,239, 8,185,
/* 0x00b0 */ 10, 0, 0, 0,243,171, 72,171,171, 41,125,248, 87, 86,232, 15,
/* 0x00c0 */ 0, 0, 0, 47,112,114,111, 99, 47,115,101,108,102, 47,101,120,
/* 0x00d0 */ 101, 0, 91,186,215, 15, 0, 0,137,249,106, 85, 88,205,128,133,
/* 0x00e0 */ 192,121, 7,137,217,184, 14, 0, 0, 0,141,116, 1,255,145,253,
/* 0x00f0 */ 95, 79,176, 0,170,243,164,184, 32, 32, 32, 61,131,239, 3,137,
/* 0x0100 */ 7,139, 69,252,137, 56,131,231,252, 94,137,241, 41,225,137,200,
/* 0x0110 */ 49,248,131,224, 4, 41,199, 90, 1,250,175,173,193,233, 2, 73,
/* 0x0120 */ 243,165,252,141, 79, 4, 49,192, 41,225,137,231,193,233, 2,243,
/* 0x0130 */ 171,137,252,137,215, 88, 93, 88, 94, 89,129,236, 0, 10, 0, 0,
/* 0x0140 */ 137,226, 81,139, 24,139, 72, 4,131,193, 12, 96, 71,232,133, 5,
/* 0x0150 */ 0, 0, 79,137,198,139,108, 36, 32,139, 77,104,137,235,102,131,
/* 0x0160 */ 125, 16, 2,117, 5,106, 45, 88,205,128,106, 91, 88,205,128,137,
/* 0x0170 */ 250,137,231,185,137, 2, 0, 0, 49,192,243,171,137,252, 88, 89,
/* 0x0180 */ 95, 91, 86, 81, 80, 82, 87, 41,237,106, 2, 94,106, 1, 90,185,
/* 0x0190 */ 0, 16, 0, 0, 41,219,104,192, 0, 0, 0, 88,205,128, 91,106,
/* 0x01a0 */ 6, 88,205,128, 95, 41,192, 60,175,175,117,252, 91, 89, 80, 80,
/* 0x01b0 */ 80, 80, 80, 80, 80, 80,176, 91,255, 39,135, 92, 36, 4,137,217,
/* 0x01c0 */ 129,227, 0,240,255,255, 41,217, 3, 76, 36, 8,139, 84, 36, 12,
/* 0x01d0 */ 106,125, 88,205,128, 61, 0,240,255,255,118, 1,244,139, 92, 36,
/* 0x01e0 */ 4,195, 85, 83, 86, 87,139, 92, 36, 20,139, 76, 36, 24,139, 84,
/* 0x01f0 */ 36, 28,139,116, 36, 32,139,124, 36, 36,139,108, 36, 40,193,237,
/* 0x0200 */ 12,104,192, 0, 0, 0, 88,205,128, 95, 94, 91, 93,195, 0, 0,
/* 0x0210 */ 87, 86,137,206, 83,137,195, 57, 8,139,120, 4,115, 10,106,127,
/* 0x0220 */ 91,106, 1, 88,205,128,235,254,133,201,116, 8,138, 7, 71,136,
/* 0x0230 */ 2, 66,226,248, 1,115, 4, 41, 51, 91, 94, 95,195, 85,137,229,
/* 0x0240 */ 87, 86,137,198, 83,137,211,131,236, 24,139, 69, 8,139,125, 12,
/* 0x0250 */ 137, 69,220,131, 58, 0, 15,132,185, 0, 0, 0,141, 85,228,185,
/* 0x0260 */ 12, 0, 0, 0,137,240,232,165,255,255,255,139, 69,228,139, 77,
/* 0x0270 */ 232,133,192,117, 19,129,249, 85, 80, 88, 33,117, 15,131, 62, 0,
/* 0x0280 */ 15,132,143, 0, 0, 0,235, 4,133,201,117, 10,106,127, 91,106,
/* 0x0290 */ 1, 88,205,128,235,254, 57,193,119,242, 59, 3,119,238, 57,193,
/* 0x02a0 */ 115, 86,137, 69,224,141, 69,224,255,117,236, 80,255,115, 4, 81,
/* 0x02b0 */ 255,118, 4,255, 85,220,131,196, 20,133,192,117,207,139, 85,224,
/* 0x02c0 */ 59, 85,228,117,199,138, 69,237,132,192,116, 34,133,255,116, 30,
/* 0x02d0 */ 129,250, 0, 2, 0, 0,119, 4, 57, 19,117, 18, 15,182,192, 80,
/* 0x02e0 */ 15,182, 69,238, 80, 82,255,115, 4,255,215,131,196, 16,139, 69,
/* 0x02f0 */ 232, 1, 70, 4, 41, 6,235, 10,139, 83, 4,137,240,232, 14,255,
/* 0x0300 */ 255,255,139, 85,228,139, 3, 1, 83, 4, 41,208,133,192,137, 3,
/* 0x0310 */ 233, 65,255,255,255,141,101,244, 91, 94, 95,201,195,133,192,116,
/* 0x0320 */ 13,168, 1,117, 9, 57, 16,116, 7,131,192, 8,235,247, 49,192,
/* 0x0330 */ 133,192,116, 3,137, 72, 4,195,184, 0,240,255,255,195, 85,137,
/* 0x0340 */ 229, 87, 86, 83,131,236, 76,137, 69,228,137, 85,224,139, 69, 8,
/* 0x0350 */ 139, 85, 12,139, 77, 16,137, 69,220,139,117, 20,137, 85,216,137,
/* 0x0360 */ 77,212,137,117,208,232,206,255,255,255,139, 85,224,137,198,247,
/* 0x0370 */ 208, 3, 82, 28,137, 69,204,131,125,220, 0,137, 85,200,116, 51,
/* 0x0380 */ 139, 77,212,139, 1,102,131,120, 16, 2,141, 80, 52,117, 12,139,
/* 0x0390 */ 90, 8,199, 69,196, 0, 0, 0, 0,235, 8,137,195, 43, 90, 40,
/* 0x03a0 */ 137, 93,196,139, 74, 20,141, 4, 25,137, 69,240,106, 91, 88,205,
/* 0x03b0 */ 128,235,127,139, 69,224,139, 85,224,102,131,120, 16, 3, 15,183,
/* 0x03c0 */ 82, 44,139, 93,200, 15,149,192, 15,182,248,137, 85,192,232,101,
/* 0x03d0 */ 255,255,255,139, 77,192,193,231, 4,137,240, 49,246, 73,199, 69,
/* 0x03e0 */ 188,255,255,255,255,120, 33,139, 77,192,131, 59, 1,117, 20,139,
/* 0x03f0 */ 83, 8, 59, 85,188,115, 3,137, 85,188, 3, 83, 20, 57,214,115,
/* 0x0400 */ 2,137,214,131,195, 32,226,226,139, 93,188,106, 0,106,255,131,
/* 0x0410 */ 207, 34, 33,195, 87, 41,222,106, 0, 41,198, 78, 33,198, 86, 83,
/* 0x0420 */ 232,189,253,255,255,131,196, 24, 1,198, 41,216,137,117,240,137,
/* 0x0430 */ 69,196,139,117,224,199, 69,184, 0, 0, 0, 0,102,131,126, 44,
/* 0x0440 */ 0, 15,132,110, 2, 0, 0,131,125,220, 0,116, 32,139, 69,200,
/* 0x0450 */ 131, 56, 6,117, 24,139, 77,196,186, 3, 0, 0, 0, 3, 72, 8,
/* 0x0460 */ 139, 69,216,232,181,254,255,255,233, 49, 2, 0, 0,139, 85,200,
/* 0x0470 */ 131, 58, 1, 15,133, 37, 2, 0, 0,131,122, 20, 0, 15,132, 27,
/* 0x0480 */ 2, 0, 0,131,125,220, 0,116, 65,131,122, 4, 0,117, 59,139,
/* 0x0490 */ 117,224,139, 77,196, 3, 74, 8,186, 3, 0, 0, 0, 3, 78, 28,
/* 0x04a0 */ 139, 69,216,232,117,254,255,255, 15,183, 78, 44,139, 69,216,186,
/* 0x04b0 */ 5, 0, 0, 0,232,100,254,255,255, 15,183, 78, 42,139, 69,216,
/* 0x04c0 */ 186, 4, 0, 0, 0,232, 83,254,255,255,139, 69,200,187, 64, 98,
/* 0x04d0 */ 81,115,139, 72, 24,131,225, 7,193,225, 2,211,235,139, 77,200,
/* 0x04e0 */ 137,218,131,226, 7,139,113, 20,137, 85,180,139, 80, 16,139, 69,
/* 0x04f0 */ 196, 3, 65, 8,137, 85,232,139, 77,204, 1,198, 33,193,137,117,
/* 0x0500 */ 176,137,198, 41,206,131,125,220, 0,137, 69,236,141, 60, 10,116,
/* 0x0510 */ 58,106, 0,106,255,106, 50,141, 71, 3,106, 3, 80, 86,232,191,
/* 0x0520 */ 252,255,255,131,196, 24, 57,198, 15,133, 36, 1, 0, 0,128,227,
/* 0x0530 */ 4,139, 69,208,117, 2, 49,192, 80,139, 69,220,255,117,228,141,
/* 0x0540 */ 85,232,232,246,252,255,255, 88, 90,235, 35,139, 85,200,139, 66,
/* 0x0550 */ 4, 41,200, 80,255,117,228,106, 18,255,117,180, 87, 86,232,127,
/* 0x0560 */ 252,255,255,131,196, 24, 57,198, 15,133,228, 0, 0, 0,137,249,
/* 0x0570 */ 139, 69,204,247,217, 33,193,246, 69,180, 2,137, 77,168,116, 13,
/* 0x0580 */ 133,201,141, 4, 62,116, 6,198, 0, 0, 64,226,250,131,125,220,
/* 0x0590 */ 0, 15,132,197, 0, 0, 0,139, 85,200,199, 69,172, 0, 0, 0,
/* 0x05a0 */ 0,131, 58, 1, 15,133,151, 0, 0, 0,246, 66, 24, 1, 15,132,
/* 0x05b0 */ 141, 0, 0, 0,137,209,139, 82, 20,137,200,139, 73, 8,141, 28,
/* 0x05c0 */ 10, 3, 93,196, 59, 80, 16,117, 14,137,216,247,216, 37,255, 15,
/* 0x05d0 */ 0, 0,131,248, 3,119, 53,139, 85,200,107, 69,196, 52,131,122,
/* 0x05e0 */ 4, 0,141, 92, 1, 12,116, 36,106, 0,106,255,106, 34,106, 3,
/* 0x05f0 */ 104, 0, 16, 0, 0,106, 0,199, 69,172, 1, 0, 0, 0,232,223,
/* 0x0600 */ 251,255,255,131,196, 24,133,192,137,195,116, 53,139, 3, 61,205,
/* 0x0610 */ 128, 97,195,116, 6,199, 3,205,128, 97,195,131,125,172, 0,116,
/* 0x0620 */ 13,106, 5,106, 4, 83,232,143,251,255,255,131,196, 12,133,219,
/* 0x0630 */ 116, 15,139, 69,216,137,217, 49,210,131,224,254,232,220,252,255,
/* 0x0640 */ 255,255,117,180, 87, 86,232,111,251,255,255,131,196, 12,133,192,
/* 0x0650 */ 116, 10,106,127, 91,106, 1, 88,205,128,235,254,139, 77,168,141,
/* 0x0660 */ 4, 15,141, 28, 6, 59, 93,176,115, 30,106, 0,106,255,106, 50,
/* 0x0670 */ 255,117,180, 41, 93,176,255,117,176, 83,232, 99,251,255,255,131,
/* 0x0680 */ 196, 24, 57,195,116, 24,235,254,131,125,220, 0,116, 16,141, 79,
/* 0x0690 */ 3, 35, 77,204,131,249, 3,119, 5,106, 91, 88,205,128,139,117,
/* 0x06a0 */ 224,255, 69,184, 15,183, 70, 44,131, 69,200, 32, 57, 69,184, 15,
/* 0x06b0 */ 140,146,253,255,255,131,125,212, 0,116, 8,139, 85,196,139, 69,
/* 0x06c0 */ 212,137, 16,139, 77,224,139, 73, 24, 1, 77,196,139, 69,196,141,
/* 0x06d0 */ 101,244, 91, 94, 95,201,195, 85,137,229, 87, 86, 83,131,236, 32,
/* 0x06e0 */ 199, 69,232, 0, 0, 0, 0,139, 69, 8,139,117, 16,137, 69,236,
/* 0x06f0 */ 128, 62,235,117, 6,141, 86, 2,137, 85,232,106, 0,139,125, 28,
/* 0x0700 */ 141, 85, 24,139, 93, 32,141, 69, 32, 86,232, 46,251,255,255,139,
/* 0x0710 */ 69, 12, 41, 93, 36,137,250,141, 93,240,255,117,232,137, 69, 32,
/* 0x0720 */ 139, 69, 40, 83,255,117,236,137, 69,240,141, 69, 32,141, 79, 52,
/* 0x0730 */ 80,137,240,137, 77,228,232, 3,252,255,255,137,193,137, 69,224,
/* 0x0740 */ 139, 69,236,186, 9, 0, 0, 0,232,208,251,255,255,102,139, 79,
/* 0x0750 */ 44,131,196, 24, 49,210,102,133,201,116,123,139, 69,228,131, 56,
/* 0x0760 */ 3,117,103,139, 93,240, 49,201, 3, 88, 8,137,202,106, 5, 88,
/* 0x0770 */ 205,128,133,192,137,198,120, 21,186, 0, 2, 0, 0,137,195,137,
/* 0x0780 */ 249,106, 3, 88,205,128, 61, 0, 2, 0, 0,116, 10,106,127, 91,
/* 0x0790 */ 106, 1, 88,205,128,235,254,141, 69,240,137,250,106, 0,137,243,
/* 0x07a0 */ 80,137,240,255,117,236,106, 0,232,145,251,255,255,139, 77,240,
/* 0x07b0 */ 137, 69,224,139, 69,236,186, 7, 0, 0, 0,232, 93,251,255,255,
/* 0x07c0 */ 131,196, 16,106, 6, 88,205,128,235, 12, 66, 15,183,193,131, 69,
/* 0x07d0 */ 228, 32, 57,194,124,133,139, 69,224,141,101,244, 91, 94, 95,201,
/* 0x07e0 */ 195
};