/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_MIPS_R3000_LINUX_ELF_FOLD_SIZE 2888
#define STUB_MIPS_R3000_LINUX_ELF_FOLD_ADLER32 0xadec7a75
#define STUB_MIPS_R3000_LINUX_ELF_FOLD_CRC32 0x95761178
#define STUB_MIPS_R3000_LINUX_ELF_FOLD_ADLER32 0xc8837a85
#define STUB_MIPS_R3000_LINUX_ELF_FOLD_CRC32 0xfcd07cc3
unsigned char stub_mips_r3000_linux_elf_fold[2888] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -63,16 +63,16 @@ unsigned char stub_mips_r3000_linux_elf_fold[2888] = {
/* 0x0170 */ 36, 2, 1,116, 3,226, 16, 35, 36, 66, 9,176, 0, 64,248, 9,
/* 0x0180 */ 2, 0, 32, 33, 39,189, 2, 0, 0, 64,240, 33,142,165, 0,104,
/* 0x0190 */ 2,160, 32, 33, 36, 2, 15,205, 0, 0, 0, 12, 36, 2, 15,251,
/* 0x01a0 */ 0, 0, 0, 12,143,168, 0, 20, 0, 0, 72, 33,175,168, 0, 16,
/* 0x01b0 */ 175,169, 0, 20, 36, 7, 0, 2, 36, 6, 0, 1, 0, 28, 40, 34,
/* 0x01c0 */ 0, 0, 32, 33, 36, 2, 15,250, 0, 0, 0, 12,143,164, 0, 16,
/* 0x01d0 */ 36, 2, 15,166, 0, 0, 0, 12,143,165, 0, 28,143,164, 0, 24,
/* 0x01e0 */ 39,189, 0, 32, 3,160, 8, 33, 39,189,252,128, 39,189, 0, 4,
/* 0x01f0 */ 23,161,255,254,175,160,255,252,142,129,255,252, 0, 0, 0, 0,
/* 0x0200 */ 16, 32, 0, 3, 0, 0, 0, 0, 0, 32, 0, 8, 36, 2, 15,251,
/* 0x0210 */ 3,192, 0, 8, 0, 0, 0, 0, 52, 1,255,255, 0, 36, 8, 36,
/* 0x0220 */ 0,129, 32, 34, 0,161, 40, 32, 36, 2, 16, 29, 0, 0, 0, 12,
/* 0x0230 */ 3,224, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x01a0 */ 0, 0, 0, 12,143,168, 0, 20, 0, 0, 72, 33, 5, 0, 0, 11,
/* 0x01b0 */ 175,168, 0, 16,175,169, 0, 20, 36, 7, 0, 2, 36, 6, 0, 1,
/* 0x01c0 */ 0, 28, 40, 34, 0, 0, 32, 33, 36, 2, 15,250, 0, 0, 0, 12,
/* 0x01d0 */ 143,164, 0, 16, 36, 2, 15,166, 0, 0, 0, 12,143,165, 0, 28,
/* 0x01e0 */ 143,164, 0, 24, 39,189, 0, 32, 3,160, 8, 33, 39,189,252,128,
/* 0x01f0 */ 39,189, 0, 4, 23,161,255,254,175,160,255,252,142,129,255,252,
/* 0x0200 */ 0, 0, 0, 0, 16, 32, 0, 3, 0, 0, 0, 0, 0, 32, 0, 8,
/* 0x0210 */ 36, 2, 15,251, 3,192, 0, 8, 0, 0, 0, 0, 52, 1,255,255,
/* 0x0220 */ 0, 36, 8, 36, 0,129, 32, 34, 0,161, 40, 32, 36, 2, 16, 29,
/* 0x0230 */ 0, 0, 0, 12, 3,224, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0240 */ 36, 2, 15,250, 39,189,255,224,175,168, 0, 16,175,169, 0, 20,
/* 0x0250 */ 0, 0, 0, 12, 16, 0, 0, 2, 39,189, 0, 32, 0, 0, 0, 12,
/* 0x0260 */ 44,225, 0, 1, 36, 33,255,255, 3,224, 0, 8, 0, 65, 16, 37,