Decompression escape hatch for ELF can require a new page.

If not enough room on last page of .text, and ElfXX_Ehdr not PF_X,
then the escape hatch must use a new page.
https://github.com/upx/upx/issues/308
	modified:   ../.github/travis_testsuite_1-expected_sha256sums.sh
	modified:   stub/src/amd64-linux.elf-main.c
	modified:   stub/src/i386-linux.elf-main.c
    Plus stub/*-linux.elf-fold.h and stub/tmp/*-linux.elf-fold.map
This commit is contained in:
John Reiser
2020-01-19 13:25:55 -08:00
parent fdf2eddc73
commit 936013f60c
25 changed files with 1494 additions and 1366 deletions
+14 -14
View File
@@ -8,7 +8,7 @@ Linker script and memory map
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
.text 0x00000000001000bc 0x928
.text 0x00000000001000bc 0x974
*(.text)
.text 0x00000000001000bc 0x238 tmp/arm64-linux.elf-fold.o
0x0000000000100228 my_bkpt
@@ -26,26 +26,26 @@ Linker script and memory map
0x00000000001002bc readlink
0x00000000001002c4 open
0x00000000001002e0 __clear_cache
.text 0x00000000001002f4 0x6f0 tmp/arm64-linux.elf-main.o
0x000000000010087c upx_main
.text 0x00000000001002f4 0x73c tmp/arm64-linux.elf-main.o
0x00000000001008c8 upx_main
*(.data)
.data 0x00000000001009e4 0x0 tmp/arm64-linux.elf-fold.o
.data 0x00000000001009e4 0x0 tmp/arm64-linux.elf-main.o
.data 0x0000000000100a30 0x0 tmp/arm64-linux.elf-fold.o
.data 0x0000000000100a30 0x0 tmp/arm64-linux.elf-main.o
.iplt 0x00000000001009e4 0x0
.iplt 0x00000000001009e4 0x0 tmp/arm64-linux.elf-fold.o
.iplt 0x0000000000100a30 0x0
.iplt 0x0000000000100a30 0x0 tmp/arm64-linux.elf-fold.o
.rela.dyn 0x00000000001009e8 0x0
.rela.iplt 0x00000000001009e8 0x0 tmp/arm64-linux.elf-fold.o
.rela.dyn 0x0000000000100a30 0x0
.rela.iplt 0x0000000000100a30 0x0 tmp/arm64-linux.elf-fold.o
.data
LOAD tmp/arm64-linux.elf-fold.o
LOAD tmp/arm64-linux.elf-main.o
OUTPUT(tmp/arm64-linux.elf-fold.bin elf64-littleaarch64)
.igot.plt 0x00000000001009e8 0x0
.igot.plt 0x00000000001009e8 0x0 tmp/arm64-linux.elf-fold.o
.igot.plt 0x0000000000100a30 0x0
.igot.plt 0x0000000000100a30 0x0 tmp/arm64-linux.elf-fold.o
.bss 0x00000000001009e4 0x0
.bss 0x00000000001009e4 0x0 tmp/arm64-linux.elf-fold.o
.bss 0x00000000001009e4 0x0 tmp/arm64-linux.elf-main.o
.bss 0x0000000000100a30 0x0
.bss 0x0000000000100a30 0x0 tmp/arm64-linux.elf-fold.o
.bss 0x0000000000100a30 0x0 tmp/arm64-linux.elf-main.o