Revamp --android-shlib

Android "Oreo" wants to deal with ElfXX_Shdr[].  So splice 4KiB into PT_LOAD[0]
with an "extra" copy of them.  This requires careful relocation processing.
It also costs a page at run time, and an average of a page in the file
(depending on fragmentation at the boundary between r-x and rw- .)

https://github.com/upx/upx/issues/124
https://github.com/upx/upx/issues/139
https://github.com/upx/upx/issues/142

	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
	modified:   stub/src/arm.v4a-linux.shlib-init.S
	modified:   stub/src/arm.v4t-linux.shlib-init.S
	modified:   stub/src/arm64-linux.shlib-init.S

	modified:   stub/arm.v5a-linux.shlib-init.h
	modified:   stub/arm.v5t-linux.shlib-init.h
	modified:   stub/arm64-linux.shlib-init.h

	modified:   ../.github/travis_testsuite_1.sh
This commit is contained in:
John Reiser
2018-01-15 16:08:34 -08:00
parent f3a7620ae8
commit c34fe09a79
12 changed files with 1497 additions and 1283 deletions
+4 -4
View File
@@ -32,15 +32,15 @@
#define STUB_ARM_V5T_LINUX_SHLIB_INIT_SIZE 15566
#define STUB_ARM_V5T_LINUX_SHLIB_INIT_ADLER32 0x4b0e1f0a
#define STUB_ARM_V5T_LINUX_SHLIB_INIT_CRC32 0x0f45a16c
#define STUB_ARM_V5T_LINUX_SHLIB_INIT_ADLER32 0x0d0d1f66
#define STUB_ARM_V5T_LINUX_SHLIB_INIT_CRC32 0x43a6af0c
unsigned char stub_arm_v5t_linux_shlib_init[15566] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 1, 0, 40, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 236, 20, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 40, 0,
/* 0x0030 */ 0, 0, 0, 0,192, 70,255,181, 0,161, 24, 57, 13, 28, 12,104,
/* 0x0040 */ 45, 27, 75,104, 91, 25, 8,147,200,104, 64, 25, 24, 33, 9, 24,
/* 0x0030 */ 0, 0, 0, 0,192, 70,255,181, 0,161, 28, 57, 11,104, 13, 29,
/* 0x0040 */ 76,104, 45, 27,140,104,100, 25, 8,148, 8,105, 64, 25, 89, 25,
/* 0x0050 */ 131,176, 0,181, 76,104, 12, 49, 9, 25, 0,240,166,248, 3, 5,
/* 0x0060 */ 27, 13,228, 24, 16,180,192, 26, 1,180,228, 26,192, 24,155, 8,
/* 0x0070 */ 8,180, 0, 0, 0,240, 57,248, 27, 6,137, 8, 27, 14,137, 0,