Many changes for ELF shared libraries on Linux and Android

Handling more than 2 PT_LOAD (and thus more than 1 executable PT_LOAD)
required extensive changes.  But the bonus is the infrastructure
to support a different (de-)compression algorithm for each PT_LOAD.

https://github.com/upx/upx/issues/341   i386 .so decompression
https://github.com/upx/upx/issues/609   armv7 .so on Android
https://github.com/upx/upx/issues/625   amd64 .so execution
https://github.com/upx/upx/issues/654   armv7 .exe
Not yet: .so on MIPS, PowerPC, PowerPC64
This commit is contained in:
John Reiser
2023-03-04 17:37:25 -08:00
committed by Markus F.X.J. Oberhumer
parent fa56a1d9cd
commit adb0ca8250
121 changed files with 15796 additions and 6036 deletions
+4 -4
View File
@@ -32,8 +32,8 @@
#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_SIZE 2668
#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_ADLER32 0x7cca544e
#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_CRC32 0x1387c871
#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_ADLER32 0x023453aa
#define STUB_ARM_V5A_DARWIN_MACHO_FOLD_CRC32 0x580629b6
unsigned char stub_arm_v5a_darwin_macho_fold[2668] = {
/* 0x0000 */ 24, 48,154,229, 2,202,160,227, 12, 0, 83,225, 12, 48,160, 49,
@@ -88,11 +88,11 @@ unsigned char stub_arm_v5a_darwin_macho_fold[2668] = {
/* 0x0310 */ 3, 0, 82,225, 1, 0, 0,154, 5, 0,160,227,194,255,255,235,
/* 0x0320 */ 8, 16,157,229, 4,224,157,229, 14, 0, 81,225, 29, 0, 0, 42,
/* 0x0330 */ 12,192,221,229, 4, 0,149,229, 4, 32,148,229, 16, 48,141,226,
/* 0x0340 */ 16,224,141,229, 0,192,141,229, 15,224,160,225, 7,240,160,225,
/* 0x0340 */ 16,224,141,229, 0,192,141,229, 15,224,160,225, 23,255, 47,225,
/* 0x0350 */ 0, 0, 80,227, 3, 0, 0, 26, 16, 32,157,229, 4, 48,157,229,
/* 0x0360 */ 3, 0, 82,225, 1, 0, 0, 10, 7, 0,160,227,174,255,255,235,
/* 0x0370 */ 13, 48,221,229, 0, 0, 83,227, 0, 0, 86, 19, 4, 0,148, 21,
/* 0x0380 */ 16, 16,157, 21, 14, 32,221, 21, 15,224,160, 17, 6,240,160, 17,
/* 0x0380 */ 16, 16,157, 21, 14, 32,221, 21, 15,224,160, 17, 22,255, 47, 17,
/* 0x0390 */ 8, 48,157,229, 6, 0,149,232, 3, 32,130,224, 1, 16, 99,224,
/* 0x03a0 */ 6, 0,133,232, 3, 0, 0,234, 1, 32,160,225, 5, 0,160,225,
/* 0x03b0 */ 4, 16,148,229,158,255,255,235, 4, 48,157,229, 6, 0,148,232,