ELF2 main programs pass src/testsuite and upx-testsuite-v2

Decompressing lzma required many adjustments.
Backwards compatibility probably is broken for
    stub/amd64-win64.pe.h
    stub/arm64-win64.pe.h
Also: shared libraries need memfd_create.
	modified:   ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
	modified:   p_lx_elf.cpp
	modified:   stub/Makefile
	modified:   stub/scripts/xstrip.py
	modified:   stub/src/amd64-expand.S
	modified:   stub/src/arch/amd64/lzma_d.S
	modified:   stub/src/arch/arm/v4a/lzma_d.S
	modified:   stub/src/arch/arm/v4t/macros.S
	modified:   stub/src/arch/arm64/v8/lzma_d.S
	modified:   stub/src/arch/powerpc/32/lzma_d.S
	modified:   stub/src/arch/powerpc/64le/lzma_d-common.S
	modified:   stub/src/arm.v4a-expand.S
	modified:   stub/src/arm.v4t-linux.shlib-init.S
	modified:   stub/src/arm64-expand.S
	modified:   stub/src/i386-expand.S
	modified:   stub/src/mips.r3000-expand.S
	modified:   stub/src/powerpc-expand.S
	modified:   stub/src/powerpc-linux.elf-entry.S
	modified:   stub/src/powerpc-linux.elf-fold.S
	modified:   stub/src/powerpc64-expand.S
	modified:   stub/src/powerpc64-linux.elf-entry.S
	modified:   stub/src/powerpc64-linux.elf-fold.S
           plus generated *.h *.map *.dump
This commit is contained in:
John Reiser
2024-07-25 13:36:02 -07:00
parent e6f3c1b3da
commit ea2a190bd1
87 changed files with 29531 additions and 30001 deletions
+47 -42
View File
@@ -8,23 +8,24 @@ Linker script and memory map
TARGET(elf32-powerpc)
.text 0x0000000000000000 0x129c
.text 0x0000000000000000 0x12d8
*(.text)
.text 0x0000000000000000 0x258 tmp/powerpc-linux.elf-fold.o
.text 0x0000000000000000 0x294 tmp/powerpc-linux.elf-fold.o
0x0000000000000048 Pmap
0x000000000000000c get_page_mask
0x0000000000000024 Pprotect
0x0000000000000024 mprotect
.text 0x0000000000000258 0xb8 tmp/powerpc-linux.elf-upxfd_android.o
0x0000000000000258 upx_mmap_and_fd
.text 0x0000000000000310 0x0 tmp/powerpc-expand.o
.text 0x0000000000000310 0xf8c tmp/powerpc-linux.elf-main2.o
0x0000000000000808 underlay
0x0000000000001088 upx_main
0x000000000000006c Punmap
.text 0x0000000000000294 0xb8 tmp/powerpc-linux.elf-upxfd_android.o
0x0000000000000294 upx_mmap_and_fd
.text 0x000000000000034c 0x0 tmp/powerpc-expand.o
.text 0x000000000000034c 0xf8c tmp/powerpc-linux.elf-main2.o
0x0000000000000844 underlay
0x00000000000010c4 upx_main
*(.data)
.data 0x000000000000129c 0x0 tmp/powerpc-linux.elf-fold.o
.data 0x000000000000129c 0x0 tmp/powerpc-linux.elf-upxfd_android.o
.data 0x000000000000129c 0x0 tmp/powerpc-expand.o
.data 0x000000000000129c 0x0 tmp/powerpc-linux.elf-main2.o
.data 0x00000000000012d8 0x0 tmp/powerpc-linux.elf-fold.o
.data 0x00000000000012d8 0x0 tmp/powerpc-linux.elf-upxfd_android.o
.data 0x00000000000012d8 0x0 tmp/powerpc-expand.o
.data 0x00000000000012d8 0x0 tmp/powerpc-linux.elf-main2.o
.data
@@ -39,22 +40,23 @@ LOAD tmp/powerpc-expand.o
LOAD tmp/powerpc-linux.elf-main2.o
OUTPUT(tmp/powerpc-linux.elf-fold.bin elf32-powerpc)
SYSCALLS 0x0000000000000000 0xac
SYSCALLS 0x0000000000000000 0xac tmp/powerpc-linux.elf-fold.o
0x000000000000005c munmap
0x0000000000000064 memcpy
0x0000000000000034 readlink
0x000000000000001c ftruncate
0x0000000000000000 mmap
0x000000000000003c write
0x0000000000000014 memfd_create
0x0000000000000044 read
0x0000000000000088 memset
0x00000000000000a4 my_bkpt
0x0000000000000024 exit
0x000000000000002c brk
0x000000000000004c open
0x0000000000000054 close
SYSCALLS 0x0000000000000000 0xb4
SYSCALLS 0x0000000000000000 0xb4 tmp/powerpc-linux.elf-fold.o
0x0000000000000050 munmap
0x000000000000006c memcpy
0x0000000000000010 readlink
0x0000000000000020 ftruncate
0x0000000000000058 mmap
0x0000000000000030 write
0x0000000000000018 memfd_create
0x0000000000000038 read
0x0000000000000090 memset
0x00000000000000ac my_bkpt
0x0000000000000000 exit
0x0000000000000008 brk
0x0000000000000040 open
0x0000000000000048 mprotect
0x0000000000000028 close
.note.GNU-stack
0x0000000000000000 0x0
@@ -65,21 +67,24 @@ EXP_HEAD 0x0000000000000000 0xa8
EXP_HEAD 0x0000000000000000 0xa8 tmp/powerpc-expand.o
0x0000000000000000 f_expand
EXP_TAIL 0x0000000000000000 0x84
EXP_TAIL 0x0000000000000000 0x84 tmp/powerpc-expand.o
0x0000000000000000 eof_nrv
EXP_TAIL 0x0000000000000000 0x8c
EXP_TAIL 0x0000000000000000 0x8c tmp/powerpc-expand.o
0x0000000000000008 eof_nrv
NRV2E 0x0000000000000000 0x14c
NRV2E 0x0000000000000000 0x14c tmp/powerpc-expand.o
NRV2E 0x0000000000000000 0x154
NRV2E 0x0000000000000000 0x154 tmp/powerpc-expand.o
NRV2D 0x0000000000000000 0x130
NRV2D 0x0000000000000000 0x130 tmp/powerpc-expand.o
NRV2D 0x0000000000000000 0x138
NRV2D 0x0000000000000000 0x138 tmp/powerpc-expand.o
NRV2B 0x0000000000000000 0xf4
NRV2B 0x0000000000000000 0xf4 tmp/powerpc-expand.o
NRV2B 0x0000000000000000 0xfc
NRV2B 0x0000000000000000 0xfc tmp/powerpc-expand.o
LZMA_ELF00 0x0000000000000000 0x90
LZMA_ELF00 0x0000000000000000 0x90 tmp/powerpc-expand.o
LZMA_DAISY 0x0000000000000000 0x8
LZMA_DAISY 0x0000000000000000 0x8 tmp/powerpc-expand.o
LZMA_ELF00 0x0000000000000000 0x88
LZMA_ELF00 0x0000000000000000 0x88 tmp/powerpc-expand.o
LZMA_DEC10 0x0000000000000000 0x99c
LZMA_DEC10 0x0000000000000000 0x99c tmp/powerpc-expand.o
@@ -87,5 +92,5 @@ LZMA_DEC10 0x0000000000000000 0x99c
LZMA_DEC20 0x0000000000000000 0x99c
LZMA_DEC20 0x0000000000000000 0x99c tmp/powerpc-expand.o
LZMA_DEC30 0x0000000000000000 0x24
LZMA_DEC30 0x0000000000000000 0x24 tmp/powerpc-expand.o
LZMA_DEC30 0x0000000000000000 0x28
LZMA_DEC30 0x0000000000000000 0x28 tmp/powerpc-expand.o