/proc/self/exe now is optional

... for the benefit of 'unshare', 'chroot', etc.
If not present, then upx run-time stub unmaps all pages of original main program.
https://github.com/upx/upx/issues/721

	modified:   stub/src/amd64-linux.elf-entry.S
	modified:   stub/src/amd64-linux.elf-fold.S
	modified:   stub/src/arm.v4a-linux.elf-entry.S
	modified:   stub/src/arm.v4a-linux.elf-fold.S
	modified:   stub/src/arm64-linux.elf-entry.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:   ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh

           ... plus all associaed *.h, *.map, *.dump in stub/
This commit is contained in:
John Reiser
2023-10-30 08:23:52 -07:00
parent f62576a2be
commit 52400e2561
43 changed files with 4302 additions and 4340 deletions
+12 -12
View File
@@ -33,8 +33,8 @@
/* clang-format off */
#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_SIZE 2888
#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_ADLER32 0x0c507a74
#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_CRC32 0xb1206160
#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_ADLER32 0x26f97a84
#define STUB_MIPSEL_R3000_LINUX_ELF_FOLD_CRC32 0x4fb9fe36
unsigned char stub_mipsel_r3000_linux_elf_fold[2888] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -63,16 +63,16 @@ unsigned char stub_mipsel_r3000_linux_elf_fold[2888] = {
/* 0x0170 */ 116, 1, 2, 36, 35, 16,226, 3,176, 9, 66, 36, 9,248, 64, 0,
/* 0x0180 */ 33, 32, 0, 2, 0, 2,189, 39, 33,240, 64, 0,104, 0,165,142,
/* 0x0190 */ 33, 32,160, 2,205, 15, 2, 36, 12, 0, 0, 0,251, 15, 2, 36,
/* 0x01a0 */ 12, 0, 0, 0, 20, 0,168,143, 33, 72, 0, 0, 16, 0,168,175,
/* 0x01b0 */ 20, 0,169,175, 2, 0, 7, 36, 1, 0, 6, 36, 34, 40, 28, 0,
/* 0x01c0 */ 33, 32, 0, 0,250, 15, 2, 36, 12, 0, 0, 0, 16, 0,164,143,
/* 0x01d0 */ 166, 15, 2, 36, 12, 0, 0, 0, 28, 0,165,143, 24, 0,164,143,
/* 0x01e0 */ 32, 0,189, 39, 33, 8,160, 3,128,252,189, 39, 4, 0,189, 39,
/* 0x01f0 */ 254,255,161, 23,252,255,160,175,252,255,129,142, 0, 0, 0, 0,
/* 0x0200 */ 3, 0, 32, 16, 0, 0, 0, 0, 8, 0, 32, 0,251, 15, 2, 36,
/* 0x0210 */ 8, 0,192, 3, 0, 0, 0, 0,255,255, 1, 52, 36, 8, 36, 0,
/* 0x0220 */ 34, 32,129, 0, 32, 40,161, 0, 29, 16, 2, 36, 12, 0, 0, 0,
/* 0x0230 */ 8, 0,224, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x01a0 */ 12, 0, 0, 0, 20, 0,168,143, 33, 72, 0, 0, 11, 0, 0, 5,
/* 0x01b0 */ 16, 0,168,175, 20, 0,169,175, 2, 0, 7, 36, 1, 0, 6, 36,
/* 0x01c0 */ 34, 40, 28, 0, 33, 32, 0, 0,250, 15, 2, 36, 12, 0, 0, 0,
/* 0x01d0 */ 16, 0,164,143,166, 15, 2, 36, 12, 0, 0, 0, 28, 0,165,143,
/* 0x01e0 */ 24, 0,164,143, 32, 0,189, 39, 33, 8,160, 3,128,252,189, 39,
/* 0x01f0 */ 4, 0,189, 39,254,255,161, 23,252,255,160,175,252,255,129,142,
/* 0x0200 */ 0, 0, 0, 0, 3, 0, 32, 16, 0, 0, 0, 0, 8, 0, 32, 0,
/* 0x0210 */ 251, 15, 2, 36, 8, 0,192, 3, 0, 0, 0, 0,255,255, 1, 52,
/* 0x0220 */ 36, 8, 36, 0, 34, 32,129, 0, 32, 40,161, 0, 29, 16, 2, 36,
/* 0x0230 */ 12, 0, 0, 0, 8, 0,224, 3, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0240 */ 250, 15, 2, 36,224,255,189, 39, 16, 0,168,175, 20, 0,169,175,
/* 0x0250 */ 12, 0, 0, 0, 2, 0, 0, 16, 32, 0,189, 39, 12, 0, 0, 0,
/* 0x0260 */ 1, 0,225, 44,255,255, 33, 36, 8, 0,224, 3, 37, 16, 65, 0,