The stub for amd64 gets to upx_main()
modified: stub/src/amd64-darwin.macho-entry.S
modified: stub/src/amd64-darwin.macho-fold.S
plus .h .bin.dump .map
The stub for amd64 gets into the de-compressed folded code.
modified: p_mach.cpp
modified: stub/amd64-darwin.macho-entry.h
modified: stub/src/amd64-darwin.macho-entry.S
modified: stub/src/amd64-darwin.macho-upxmain.c
modified: stub/tmp/amd64-darwin.macho-entry.bin.dump
On amd64, otool and lldb accept the results.
The entry point points to the unfilter and uncompress routines.
Somehow _start has been lost.
modified: p_mach.cpp
modified: p_mach.h
modified: p_mach_enum.h
modified: stub/amd64-darwin.macho-entry.h
modified: stub/src/amd64-darwin.macho-entry.S
modified: stub/src/amd64-darwin.macho-upxmain.c
modified: stub/src/i386-darwin.macho-upxmain.c
modified: stub/src/powerpc-darwin.macho-upxmain.c
modified: stub/tmp/amd64-darwin.macho-entry.bin.dump
Android build environment post-processing is adding a PT_NOTE
("Android", 21, "r16-beta1") at the high end of PT_LOAD[0],
above the stub; the runtime linker looks there before de-compression.
https://github.com/upx/upx/issues/124
modified: p_lx_elf.cpp
(except r1, r2, and input args!) So, r12 .e_entry for musl
must copy from a saved register. [qemu-ppc64 doesn't trash registers!]
modified: ../.github/travis_testsuite_1.sh
modified: p_lx_elf.cpp
modified: stub/src/amd64-linux.elf-main.c
modified: stub/src/powerpc64le-linux.elf-fold.S
also .h .fold.map
modified: p_lx_elf.cpp
modified: stub/Makefile
new file: stub/mips.r3000-linux.shlib-init.h
new file: stub/mipsel.r3000-linux.shlib-init.h
new file: stub/src/mips.r3000-linux.shlib-init.S
new file: stub/src/mipsel.r3000-linux.shlib-init.S
new file: stub/tmp/mips.r3000-linux.shlib-init.bin.dump
new file: stub/tmp/mipsel.r3000-linux.shlib-init.bin.dump
New stub strategy on Linux: Linux adds too many other segments
to the address space: [vdso], [sigpage], ...; and qemu might
arrange them differently. Thus the only reliable mappings
are the PT_LOAD of the compressed file itself; all other
address space is unknown! First, the compressed file uses
.bss to occupy all unused pages up to the original brk(0).
Then at run time, the stub gets another mapping of /proc/self/exe,
and uncompresses the user program on top of the original pages.
[*BSD unchanged for now?]
modified: stub/src/powerpc64le-linux.elf-fold.S
modified: stub/src/powerpc64le-linux.elf-entry.S
modified: stub/src/powerpc64le-darwin.macho-entry.S
modified: stub/src/powerpc64le-darwin.dylib-entry.S
modified: stub/src/powerpc-linux.elf-fold.S
modified: stub/src/powerpc-linux.elf-entry.S
modified: stub/src/mipsel.r3000-linux.elf-fold.S
modified: stub/src/mipsel.r3000-linux.elf-entry.S
modified: stub/src/i386-linux.elf-main.c
modified: stub/src/i386-linux.elf-fold.S
modified: stub/src/i386-linux.elf-entry.S
modified: stub/src/arm64-linux.elf-main.c
modified: stub/src/arm64-linux.elf-fold.S
modified: stub/src/arm64-linux.elf-entry.S
modified: stub/src/arm.v4a-linux.elf-fold.S
modified: stub/src/arm.v4a-linux.elf-entry.S
modified: stub/src/amd64-linux.elf-main.c
modified: stub/src/amd64-linux.elf-fold.S
modified: stub/src/amd64-linux.elf-entry.S
modified: p_unix.cpp
modified: p_mach.cpp
modified: p_lx_sh.cpp
modified: p_lx_interp.cpp
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_lx_interp.h
modified: p_lx_sh.h
modified: p_mach.h
modified: p_unix.h
modified: stub/src/arch/mips/r3000/macros.ash
modified: stub/src/arch/powerpc/32/ppc_regs.h
modified: stub/src/arch/powerpc/64le/ppc_regs.h
modified: stub/src/include/linux.h
modified: stub/Makefile
modified: ../.github/travis_testsuite_1.sh
also .h .map .bin.dump