1
0
mirror of https://github.com/upx/upx synced 2025-10-26 23:36:41 +08:00
Commit Graph

3102 Commits

Author SHA1 Message Date
John Reiser
8a9b46d82f Cleanup minor bug in unpack ET_EXE
modified:   p_lx_elf.cpp
2017-03-31 12:42:14 -07:00
John Reiser
12e5703541 Stronger test and better message for PT_LOAD[0].p_offset != 0
https://github.com/upx/upx/issues/80
	modified:   p_lx_elf.cpp
2017-03-31 12:20:02 -07:00
John Reiser
1b87fc2ee6 DT_INIT restored for -d on --android-shlib
modified:   p_lx_elf.cpp
2017-03-30 15:55:35 -07:00
John Reiser
ebd0c780a1 Unpacking --android-shlib works except for restoring DT_INIT
modified:   p_lx_elf.cpp
2017-03-30 11:05:49 -07:00
John Reiser
bd976cd562 Merge branch 'devel' into jreiser
modified:   packmast.cpp
2017-03-30 10:27:54 -07:00
John Reiser
0e511c3e07 visitAllPackers() lists class names when -D
modified:   packmast.cpp
2017-03-30 10:23:27 -07:00
John Reiser
300d489408 --android-shlib preserves selected Elf32_Shdr
32-bit only for now; also in wrong place for unpacking (-d)
	modified:   main.cpp
	modified:   options.h
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2017-03-29 18:31:39 -07:00
John Reiser
024d081167 Fix unpack of ET_DYN
https://github.com/upx/upx/issues/73

	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2017-03-27 16:49:46 -07:00
John Reiser
348173d3f1 Fix editing glitch
modified:   p_lx_elf.cpp
2017-03-27 16:42:26 -07:00
John Reiser
23e3814f8a Fix unpacking of ET_DYN
modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2017-03-27 16:10:12 -07:00
John Reiser
b818e2c4b8 arm64 (aarch64)
Tested and working: nrv2b and nrv2e for ET_EXE on linux.
NOT TESTED: lzma, ET_DYN on linux; any Mach-O

	modified:   bele.h
	modified:   conf.h
	modified:   filter/ct.h
	modified:   filteri.cpp
	modified:   linker.cpp
	modified:   linker.h
	modified:   miniacc.h
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
	modified:   packmast.cpp
	modified:   stub/Makefile
	modified:   stub/arm64-darwin.macho-entry.h
	modified:   stub/arm64-darwin.macho-fold.h
	new file:   stub/arm64-linux.elf-entry.h
	new file:   stub/arm64-linux.elf-fold.h
	new file:   stub/arm64-linux.shlib-init.h
	new file:   stub/src/arch/arm64/v8/Makefile.extra
	modified:   stub/src/arch/arm64/v8/lzma_d-arm.S
	modified:   stub/src/arch/arm64/v8/lzma_d.S
	modified:   stub/src/arch/arm64/v8/lzma_d_cf.S
	new file:   stub/src/arch/arm64/v8/lzma_d_cs.S
	modified:   stub/src/arch/arm64/v8/macros.S
	renamed:    stub/src/arch/arm64/v8/nrv2b_d8.S -> stub/src/arch/arm64/v8/nrv2b_d32.S
	renamed:    stub/src/arch/arm64/v8/nrv2d_d8.S -> stub/src/arch/arm64/v8/nrv2d_d32.S
	modified:   stub/src/arch/arm64/v8/nrv2e_d32.S
	deleted:    stub/src/arch/arm64/v8/nrv2e_d8.S
	modified:   stub/src/arm64-darwin.macho-entry.S
	modified:   stub/src/arm64-darwin.macho-fold.S
	new file:   stub/src/arm64-linux.elf-entry.S
	new file:   stub/src/arm64-linux.elf-fold.S
	new file:   stub/src/arm64-linux.elf-fold.lds
	new file:   stub/src/arm64-linux.elf-main.c
	new file:   stub/src/arm64-linux.shlib-init.S
	modified:   stub/src/include/linux.h
	modified:   stub/tmp/arm64-darwin.macho-entry.bin.dump
	modified:   stub/tmp/arm64-darwin.macho-fold.map
	new file:   stub/tmp/arm64-linux.elf-entry.bin.dump
	new file:   stub/tmp/arm64-linux.elf-fold.map
	new file:   stub/tmp/arm64-linux.shlib-init.bin.dump
2017-03-26 13:10:26 -07:00
John Reiser
6adb3dc142 BUILD_TYPE_DEBUG ?= 0 2017-03-26 13:03:49 -07:00
John Reiser
0e154cc759 Hint when need DT_INIT for shared library
https://github.com/upx/upx/issues/74
	modified:   p_lx_elf.cpp
2017-03-25 20:22:04 -07:00
John Reiser
9dce8d9bce Separate from amd64/bxx.S
modified:   stub/src/arch/amd64/bxx.S
2017-03-25 20:14:48 -07:00
John Reiser
0aa3b9c487 Revise comment
modified:   stub/src/arch/amd64/bxx.S
2017-03-25 20:10:50 -07:00
John Reiser
dc7ab3ed30 sync git branch
modified:   stub/amd64-win64.pep.h
	modified:   stub/tmp/amd64-win64.pep.bin.dump
2017-03-25 20:08:29 -07:00
John Reiser
254259b354 Fix comment
modified:   stub/src/arch/amd64/bxx.S
2017-03-25 20:05:32 -07:00
John Reiser
9651c70efd Revert powerpc-linux.elf-fold.S
modified:   stub/src/powerpc-linux.elf-fold.S
2017-03-25 17:51:32 -07:00
John Reiser
5840190ed5 Revert xstrip.py
modified:   stub/scripts/xstrip.py
2017-03-25 17:50:06 -07:00
John Reiser
a807b88694 BUILD_TYPE_DEBUG ?= 1
modified:   Makefile
2017-03-25 17:40:24 -07:00
John Reiser
0db82e09e9 Suggest fix for missing DT_INIT in shared library.
modified:   p_lx_elf.cpp
2017-03-25 17:39:47 -07:00
John Reiser
e5865f171a xstrip.py: *.bindump was unused; clear e_shnum, e_shstrndx
Also allow other compilers for powerpc64le and arm64: loosen checking.
	modified:   stub/Makefile
	modified:   stub/scripts/xstrip.py

	modified:   stub/amd64-darwin.dylib-entry.h
	modified:   stub/amd64-darwin.macho-entry.h
	modified:   stub/amd64-linux.elf-entry.h
	modified:   stub/amd64-linux.kernel.vmlinux.h
	modified:   stub/amd64-linux.shlib-init.h
	modified:   stub/amd64-win64.pep.h
	modified:   stub/arm.v4a-linux.elf-entry.h
	modified:   stub/arm.v4a-wince.pe.h
	modified:   stub/arm.v4t-wince.pe.h
	modified:   stub/arm.v5a-darwin.macho-entry.h
	modified:   stub/arm.v5a-linux.elf-entry.h
	modified:   stub/arm.v5a-linux.kernel.vmlinux.h
	modified:   stub/arm.v5a-linux.kernel.vmlinuz.h
	modified:   stub/arm.v5a-linux.shlib-init.h
	modified:   stub/arm.v5t-linux.shlib-init.h
	modified:   stub/arm64-darwin.macho-entry.h
	modified:   stub/armeb.v4a-linux.elf-entry.h
	modified:   stub/armeb.v5a-linux.kernel.vmlinux.h
	modified:   stub/i086-dos16.com.h
	modified:   stub/i086-dos16.exe.h
	modified:   stub/i086-dos16.sys.h
	modified:   stub/i386-bsd.elf-entry.h
	modified:   stub/i386-bsd.elf.execve-entry.h
	modified:   stub/i386-darwin.dylib-entry.h
	modified:   stub/i386-darwin.macho-entry.h
	modified:   stub/i386-dos32.djgpp2.h
	modified:   stub/i386-dos32.tmt.h
	modified:   stub/i386-dos32.watcom.le.h
	modified:   stub/i386-linux.elf-entry.h
	modified:   stub/i386-linux.elf.execve-entry.h
	modified:   stub/i386-linux.elf.interp-entry.h
	modified:   stub/i386-linux.elf.shell-entry.h
	modified:   stub/i386-linux.kernel.vmlinux.h
	modified:   stub/i386-linux.kernel.vmlinuz.h
	modified:   stub/i386-linux.shlib-init.h
	modified:   stub/i386-netbsd.elf-entry.h
	modified:   stub/i386-win32.pe.h
	modified:   stub/m68k-atari.tos.h
	modified:   stub/mips.r3000-linux.elf-entry.h
	modified:   stub/mipsel.r3000-linux.elf-entry.h
	modified:   stub/mipsel.r3000-ps1.h
	modified:   stub/powerpc-darwin.dylib-entry.h
	modified:   stub/powerpc-darwin.macho-entry.h
	modified:   stub/powerpc-linux.elf-entry.h
	modified:   stub/powerpc-linux.kernel.vmlinux.h
	modified:   stub/powerpc64le-darwin.dylib-entry.h
	modified:   stub/powerpc64le-darwin.macho-entry.h
	modified:   stub/powerpc64le-linux.elf-entry.h
	modified:   stub/powerpc64le-linux.kernel.vmlinux.h
2017-03-25 17:09:16 -07:00
John Reiser
166d198dcb Default BUILD_TYPE_DEBUG
modified:   Makefile
2017-03-25 16:54:26 -07:00
John Reiser
17c47053d6 Revert amd64/bxx.S to reduce churn of testsuite
modified:   stub/src/arch/amd64/bxx.S

	modified:   stub/amd64-darwin.dylib-entry.h
	modified:   stub/amd64-darwin.macho-entry.h
	modified:   stub/amd64-darwin.macho-fold.h
	modified:   stub/amd64-linux.elf-fold.h
	modified:   stub/amd64-linux.shlib-init.h
	modified:   stub/amd64-win64.pep.h
2017-03-25 16:34:01 -07:00
John Reiser
b4e18f7521 Remove debugging straggler.
modified:   src/powerpc-linux.elf-fold.S

	modified:   powerpc-linux.elf-fold.h
	modified:   tmp/powerpc-linux.elf-fold.map
2017-03-25 15:48:18 -07:00
John Reiser
543fa3ae79 Revert PackLinuxElf32::unpack() for decompression of armeb-linux.elf/upx-3.91
Conflicting with https://github.com/upx/upx/issues/73
	modified:   p_lx_elf.cpp
2017-03-25 12:52:20 -07:00
John Reiser
f5d65dc0bc arm64 unfilter
modified:   stub/src/arm64-linux.elf-fold.S

	modified:   stub/arm64-linux.elf-fold.h
	modified:   stub/tmp/arm64-linux.elf-fold.map
2017-03-24 13:55:54 -07:00
John Reiser
2f6211a1d9 xstrip.py slight improvement for powerpc64le and arm64
modified:   stub/scripts/xstrip.py
2017-03-24 10:54:56 -07:00
John Reiser
513a57330a xstrip.py: *.bindump was unused; clear e_shnum, e_shstrndx
modified:   stub/scripts/xstrip.py
	modified:   stub/Makefile

	modified:   stub/amd64-darwin.dylib-entry.h
	modified:   stub/amd64-darwin.macho-entry.h
	modified:   stub/amd64-linux.elf-entry.h
	modified:   stub/amd64-linux.kernel.vmlinux.h
	modified:   stub/amd64-linux.shlib-init.h
	modified:   stub/amd64-win64.pep.h
	modified:   stub/arm.v4a-linux.elf-entry.h
	modified:   stub/arm.v4a-wince.pe.h
	modified:   stub/arm.v4t-wince.pe.h
	modified:   stub/arm.v5a-darwin.macho-entry.h
	modified:   stub/arm.v5a-linux.elf-entry.h
	modified:   stub/arm.v5a-linux.kernel.vmlinux.h
	modified:   stub/arm.v5a-linux.kernel.vmlinuz.h
	modified:   stub/arm.v5a-linux.shlib-init.h
	modified:   stub/arm.v5t-linux.shlib-init.h
	modified:   stub/arm64-darwin.macho-entry.h
	modified:   stub/arm64-linux.elf-entry.h
	modified:   stub/arm64-linux.shlib-init.h
	modified:   stub/armeb.v4a-linux.elf-entry.h
	modified:   stub/armeb.v5a-linux.kernel.vmlinux.h
	modified:   stub/i086-dos16.com.h
	modified:   stub/i086-dos16.exe.h
	modified:   stub/i086-dos16.sys.h
	modified:   stub/i386-bsd.elf-entry.h
	modified:   stub/i386-bsd.elf.execve-entry.h
	modified:   stub/i386-darwin.dylib-entry.h
	modified:   stub/i386-darwin.macho-entry.h
	modified:   stub/i386-dos32.djgpp2.h
	modified:   stub/i386-dos32.tmt.h
	modified:   stub/i386-dos32.watcom.le.h
	modified:   stub/i386-linux.elf-entry.h
	modified:   stub/i386-linux.elf.execve-entry.h
	modified:   stub/i386-linux.elf.interp-entry.h
	modified:   stub/i386-linux.elf.shell-entry.h
	modified:   stub/i386-linux.kernel.vmlinux.h
	modified:   stub/i386-linux.kernel.vmlinuz.h
	modified:   stub/i386-linux.shlib-init.h
	modified:   stub/i386-netbsd.elf-entry.h
	modified:   stub/i386-win32.pe.h
	modified:   stub/m68k-atari.tos.h
	modified:   stub/mips.r3000-linux.elf-entry.h
	modified:   stub/mipsel.r3000-linux.elf-entry.h
	modified:   stub/mipsel.r3000-ps1.h
	modified:   stub/powerpc-darwin.dylib-entry.h
	modified:   stub/powerpc-darwin.macho-entry.h
	modified:   stub/powerpc-linux.elf-entry.h
	modified:   stub/powerpc-linux.kernel.vmlinux.h
	modified:   stub/powerpc64le-darwin.dylib-entry.h
	modified:   stub/powerpc64le-darwin.macho-entry.h
	modified:   stub/powerpc64le-linux.elf-entry.h
	modified:   stub/powerpc64le-linux.kernel.vmlinux.h
2017-03-24 09:26:40 -07:00
John Reiser
715ddf0620 arm64 hacking
modified:   stub/src/arch/arm64/v8/macros.S
	new file:   stub/src/arch/arm64/v8/Makefile.extra
	modified:   stub/src/arch/arm64/v8/lzma_d-arm.S
	modified:   stub/src/arch/arm64/v8/lzma_d.S
	modified:   stub/src/arch/arm64/v8/lzma_d_cf.S
	new file:   stub/src/arch/arm64/v8/lzma_d_cs.S
	modified:   stub/src/arm64-darwin.macho-entry.S

	modified:   stub/arm64-darwin.macho-entry.h
	modified:   stub/arm64-linux.elf-entry.h
	modified:   stub/arm64-linux.shlib-init.h
	modified:   stub/tmp/arm64-darwin.macho-entry.bin.dump
	modified:   stub/tmp/arm64-linux.elf-entry.bin.dump
	modified:   stub/tmp/arm64-linux.shlib-init.bin.dump
2017-03-23 20:32:41 -07:00
John Reiser
6bb31e276e Merge branch 'devel' into jreiser 2017-03-23 13:27:09 -07:00
John Reiser
b10f1df49f Merge branch 'devel' of https://github.com/upx/upx into devel 2017-03-23 13:09:59 -07:00
John Reiser
f999519b13 Sync stubs for 32-bit powerpc
modified:   stub/src/arch/powerpc/32/Makefile.extra
	modified:   stub/src/arch/powerpc/32/lzma_d_cf.S
	modified:   stub/src/arch/powerpc/32/lzma_d_cs.S

	modified:   stub/powerpc-darwin.dylib-entry.h
	modified:   stub/powerpc-darwin.macho-entry.h
	modified:   stub/powerpc-linux.elf-entry.h
	modified:   stub/powerpc-linux.kernel.vmlinux.h
2017-03-23 13:08:36 -07:00
Markus F.X.J. Oberhumer
aedbf02830 p_lx_elf.cpp: silence a clang-4.0 compilation warning. 2017-03-23 17:43:23 +01:00
John Reiser
bd5479b250 arm64 omit "dc zva," while valgrind complains
modified:   src/arm64-linux.elf-entry.S
	modified:   src/arm64-linux.elf-fold.S

	modified:   arm64-linux.elf-entry.h
	modified:   arm64-linux.elf-fold.h
	modified:   tmp/arm64-linux.elf-entry.bin.dump
	modified:   tmp/arm64-linux.elf-fold.map
2017-03-23 09:12:35 -07:00
Markus F.X.J. Oberhumer
9d14715652 Update Travis. 2017-03-23 13:00:42 +01:00
Thierry Fauck
72156fcf1b powerpc64le: support for -fpie compiled binaries
Signed-off-by: Thierry Fauck <tfauck@free.fr>

	modified:   powerpc64le-linux.elf-fold.h
	modified:   src/powerpc64le-linux.elf-fold.S
	modified:   src/powerpc64le-linux.elf-main.c
	modified:   tmp/powerpc64le-linux.elf-fold.map
2017-03-23 11:21:50 +01:00
Markus F.X.J. Oberhumer
f9738c5b55 New ACC version. 2017-03-23 01:17:33 +01:00
John Reiser
3b63083619 Cleanup powerpc64 stubs
modified:   stub/src/powerpc64le-darwin.macho-fold.S
	modified:   stub/src/powerpc64le-linux.elf-entry.S

	modified:   stub/powerpc64le-darwin.macho-fold.h
	modified:   stub/powerpc64le-linux.elf-entry.h
	modified:   stub/tmp/powerpc64le-darwin.macho-fold.map
	modified:   stub/tmp/powerpc64le-linux.elf-entry.bin.dump
2017-03-22 16:50:52 -07:00
John Reiser
d5d7d8bc84 arm64 hacking
modified:   stub/src/arm64-linux.elf-fold.S
	modified:   stub/src/arm64-linux.elf-main.c

	modified:   stub/arm64-linux.elf-fold.h
	modified:   stub/tmp/arm64-linux.elf-fold.map
2017-03-22 16:45:09 -07:00
John Reiser
f26118cf5a lzma for powerpc64le: -Os needs _restgpr0_*
modified:   stub/src/arch/powerpc/64le/Makefile.extra
	modified:   stub/src/arch/powerpc/64le/ppc_regs.h
	modified:   stub/src/powerpc64-savegpr0.S

	modified:   stub/powerpc64le-darwin.dylib-entry.h
	modified:   stub/powerpc64le-darwin.macho-entry.h
	modified:   stub/powerpc64le-linux.elf-entry.h
	modified:   stub/powerpc64le-linux.kernel.vmlinux.h
	modified:   stub/src/arch/powerpc/64le/lzma_d_cf.S
	modified:   stub/src/arch/powerpc/64le/lzma_d_cs.S
	modified:   stub/tmp/powerpc64le-darwin.dylib-entry.bin.dump
	modified:   stub/tmp/powerpc64le-darwin.macho-entry.bin.dump
	modified:   stub/tmp/powerpc64le-linux.elf-entry.bin.dump
	modified:   stub/tmp/powerpc64le-linux.kernel.vmlinux.bin.dump
2017-03-22 14:17:40 -07:00
John Reiser
5d6c4b475c preloc
modified:   stub/src/arm64-linux.elf-main.c
2017-03-22 09:03:13 -07:00
John Reiser
2c4ef392f6 arm64-linux hacking; returns from upx_main(), only launch remains!
modified:   stub/src/arch/arm64/v8/lzma_d.S
	modified:   stub/src/arch/arm64/v8/nrv2b_d32.S
	modified:   stub/src/arch/arm64/v8/nrv2d_d32.S
	modified:   stub/src/arch/arm64/v8/nrv2e_d32.S
	modified:   stub/src/arm64-linux.elf-entry.S
	modified:   stub/src/arm64-linux.elf-fold.S
	modified:   stub/src/arm64-linux.elf-main.c

	modified:   stub/arm64-darwin.macho-entry.h
	modified:   stub/arm64-linux.elf-entry.h
	modified:   stub/arm64-linux.elf-fold.h
	modified:   stub/arm64-linux.shlib-init.h
	modified:   stub/tmp/arm64-darwin.macho-entry.bin.dump
	modified:   stub/tmp/arm64-linux.elf-entry.bin.dump
	modified:   stub/tmp/arm64-linux.elf-fold.map
	modified:   stub/tmp/arm64-linux.shlib-init.bin.dump
2017-03-21 21:54:49 -07:00
John Reiser
2a128fe772 Work on arm64 decompression
renamed:    stub/src/arch/arm64/v8/nrv2b_d8.S -> stub/src/arch/arm64/v8/nrv2b_d32.S
	renamed:    stub/src/arch/arm64/v8/nrv2d_d8.S -> stub/src/arch/arm64/v8/nrv2d_d32.S
	modified:   stub/src/arch/arm64/v8/nrv2e_d32.S
	deleted:    stub/src/arch/arm64/v8/nrv2e_d8.S
	modified:   stub/src/arm64-darwin.macho-entry.S
	modified:   stub/src/arm64-linux.elf-entry.S
	modified:   stub/src/arm64-linux.elf-fold.S
	modified:   stub/src/arm64-linux.shlib-init.S

	modified:   stub/arm64-darwin.macho-entry.h
	modified:   stub/arm64-linux.elf-entry.h
	modified:   stub/arm64-linux.elf-fold.h
	modified:   stub/arm64-linux.shlib-init.h
	modified:   stub/tmp/arm64-darwin.macho-entry.bin.dump
	modified:   stub/tmp/arm64-linux.elf-entry.bin.dump
	modified:   stub/tmp/arm64-linux.elf-fold.map
	modified:   stub/tmp/arm64-linux.shlib-init.bin.dump
2017-03-20 21:23:15 -07:00
John Reiser
bb7d3ca3a1 Fix PackLinuxElf32::unpack() for shared library?
modified:   p_lx_elf.cpp
2017-03-20 21:21:46 -07:00
John Reiser
a2bdba7eda arm64 cache flogging at initial move
modified:   stub/arm64-linux.elf-entry.h
	modified:   stub/src/arm64-linux.elf-entry.S
	modified:   stub/tmp/arm64-linux.elf-entry.bin.dump
2017-03-14 21:36:18 -07:00
John Reiser
e8aabc9980 R_AARCH64_CONDBR19
modified:   linker.cpp
2017-03-14 21:35:01 -07:00
John Reiser
9f554a14fd ARM64 hacking
modified:   p_lx_elf.cpp
	modified:   stub/src/arch/arm64/v8/macros.S
	modified:   stub/src/arm64-darwin.macho-fold.S
	modified:   stub/src/arm64-linux.elf-entry.S

	modified:   stub/arm64-darwin.macho-entry.h
	modified:   stub/arm64-darwin.macho-fold.h
	modified:   stub/arm64-linux.elf-entry.h
	modified:   stub/arm64-linux.elf-fold.h
	modified:   stub/tmp/arm64-darwin.macho-fold.map
	modified:   stub/tmp/arm64-linux.elf-entry.bin.dump
	modified:   stub/tmp/arm64-linux.elf-fold.map
2017-03-14 20:08:28 -07:00
John Reiser
68a2b91ccb arm64 filter, relocation, defineSymbols
modified:   Makefile
	modified:   bele.h
	modified:   filter/ct.h
	modified:   filteri.cpp
	modified:   linker.cpp
	modified:   miniacc.h
	modified:   p_lx_elf.cpp
	modified:   stub/arm64-linux.elf-entry.h
	modified:   stub/src/arm64-linux.elf-entry.S
2017-03-05 21:05:13 -08:00
John Reiser
4089cc6e6f arm64-linux compiles
modified:   conf.h
	modified:   linker.cpp
	modified:   linker.h
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
	modified:   packmast.cpp
	modified:   stub/Makefile
	new file:   stub/arm64-linux.shlib-init.h
	new file:   stub/src/arm64-linux.shlib-init.S
	new file:   stub/tmp/arm64-linux.elf-entry.bin.dump
	new file:   stub/tmp/arm64-linux.elf-fold.map
	new file:   stub/tmp/arm64-linux.shlib-init.bin.dump
2017-03-05 18:07:29 -08:00
John Reiser
4e8848eeca Merge branch 'devel' into jreiser
Conflicts:
	src/stub/amd64-win64.pep.h
	src/stub/powerpc-linux.elf-entry.h
	src/stub/powerpc-linux.elf-fold.h
	src/stub/src/amd64-win64.pep.S
	src/stub/src/arch/powerpc/32/ppc_regs.h
	src/stub/src/arch/powerpc/64le/lzma_d.S
	src/stub/src/powerpc-linux.elf-entry.S
	src/stub/src/powerpc64le-darwin.dylib-entry.S
	src/stub/src/powerpc64le-darwin.macho-entry.S
	src/stub/src/powerpc64le-linux.elf-entry.S
	src/stub/src/powerpc64le-linux.kernel.vmlinux.S
	src/stub/tmp/amd64-win64.pep.bin.dump
	src/stub/tmp/powerpc-linux.elf-entry.bin.dump
	src/stub/tmp/powerpc-linux.elf-fold.map

	modified:   ../../.github/travis_testsuite_1.sh
	modified:   ../p_lx_elf.cpp
	modified:   ../p_unix.cpp
	modified:   ../p_unix.h
	modified:   amd64-win64.pep.h
	modified:   arm.v4a-linux.elf-fold.h
	modified:   arm.v5a-linux.elf-fold.h
	modified:   armeb.v4a-linux.elf-fold.h
	modified:   powerpc-darwin.dylib-entry.h
	modified:   powerpc-darwin.macho-entry.h
	copied:     powerpc-darwin.dylib-entry.h -> powerpc-linux.elf-entry.h
	modified:   powerpc-linux.elf-fold.h
	modified:   powerpc-linux.kernel.vmlinux.h
	modified:   powerpc64le-linux.elf-fold.h
	modified:   src/amd64-win64.pep.S
	modified:   src/arch/powerpc/32/bxx.S
	modified:   src/arch/powerpc/32/lzma_d.S
	modified:   src/arch/powerpc/32/nrv2d_d.S
	modified:   src/arch/powerpc/32/nrv2e_d.S
	modified:   src/arch/powerpc/32/ppc_regs.h
	modified:   src/arch/powerpc/64le/bxx.S
	modified:   src/arch/powerpc/64le/lzma_d.S
	modified:   src/arch/powerpc/64le/nrv2b_d.S
	modified:   src/arch/powerpc/64le/nrv2d_d.S
	modified:   src/arch/powerpc/64le/nrv2e_d.S
	modified:   src/arm.v4a-linux.elf-fold.S
	modified:   src/powerpc-darwin.macho-fold.S
	modified:   src/powerpc-linux.elf-entry.S
	modified:   src/powerpc-linux.elf-fold.S
	modified:   src/powerpc64le-darwin.dylib-entry.S
	modified:   src/powerpc64le-darwin.macho-entry.S
	modified:   src/powerpc64le-darwin.macho-fold.S
	modified:   src/powerpc64le-linux.elf-entry.S
	modified:   src/powerpc64le-linux.elf-fold.S
	modified:   src/powerpc64le-linux.kernel.vmlinux.S
	modified:   tmp/amd64-win64.pep.bin.dump
	modified:   tmp/arm.v4a-linux.elf-fold.map
	modified:   tmp/arm.v5a-linux.elf-fold.map
	modified:   tmp/armeb.v4a-linux.elf-fold.map
	modified:   tmp/powerpc-darwin.dylib-entry.bin.dump
	modified:   tmp/powerpc-darwin.macho-entry.bin.dump
	modified:   tmp/powerpc-linux.elf-entry.bin.dump
	modified:   tmp/powerpc-linux.elf-fold.map
	modified:   tmp/powerpc-linux.kernel.vmlinux.bin.dump
2017-03-01 08:14:13 -08:00
John Reiser
8c6133c115 Decompression stubs for arm64-linux (aarch)
modified:   stub/Makefile
	modified:   stub/arm64-darwin.macho-entry.h
	modified:   stub/arm64-darwin.macho-fold.h
	new file:   stub/arm64-linux.elf-entry.h
	new file:   stub/arm64-linux.elf-fold.h
	modified:   stub/scripts/xstrip.py
	modified:   stub/src/arch/arm64/v8/macros.S
	modified:   stub/src/arch/arm64/v8/nrv2b_d8.S
	modified:   stub/src/arch/arm64/v8/nrv2d_d8.S
	modified:   stub/src/arch/arm64/v8/nrv2e_d8.S
	new file:   stub/src/arm64-linux.elf-entry.S
	new file:   stub/src/arm64-linux.elf-fold.S
	new file:   stub/src/arm64-linux.elf-fold.lds
	new file:   stub/src/arm64-linux.elf-main.c
	modified:   stub/src/include/linux.h
2017-03-01 05:47:03 -08:00
John Reiser
483db31acd arm: Preserve 8-byte alignment of stack pointer
https://github.com/upx/upx/issues/60  (partial)
	modified:   stub/src/arm.v4a-linux.elf-fold.S

	modified:   ../.github/travis_testsuite_1.sh
	modified:   stub/arm.v4a-linux.elf-fold.h
	modified:   stub/arm.v5a-linux.elf-fold.h
	modified:   stub/armeb.v4a-linux.elf-fold.h
	modified:   stub/tmp/arm.v4a-linux.elf-fold.map
	modified:   stub/tmp/arm.v5a-linux.elf-fold.map
	modified:   stub/tmp/armeb.v4a-linux.elf-fold.map
2017-02-14 20:36:45 -08:00
John Reiser
35dae3dab7 PowerPC 32-bit lzma stub defends against omitted linkage area.
https://github.com/upx/upx/issues/60
	modified:   stub/src/arch/powerpc/32/lzma_d.S
	modified:   stub/src/powerpc-linux.elf-entry.S
	modified:   stub/src/powerpc-linux.elf-fold.S

	modified:   stub/powerpc-darwin.dylib-entry.h
	modified:   stub/powerpc-darwin.macho-entry.h
 [WTF?]	copied:     stub/powerpc-darwin.dylib-entry.h -> stub/powerpc-linux.elf-entry.h
	modified:   stub/powerpc-linux.elf-fold.h
	modified:   stub/powerpc-linux.kernel.vmlinux.h

	modified:   stub/tmp/powerpc-linux.elf-fold.map
	modified:   stub/tmp/powerpc-darwin.dylib-entry.bin.dump
	modified:   stub/tmp/powerpc-darwin.macho-entry.bin.dump
	modified:   stub/tmp/powerpc-linux.elf-entry.bin.dump
	modified:   stub/tmp/powerpc-linux.kernel.vmlinux.bin.dump

	modified:   ../.github/travis_testsuite_1.sh
2017-02-12 16:23:57 -08:00
John Reiser
8232aedf78 unpackExtent() segregates rewrite() from write()
Fix the reported output file size when un-compressing.
Part of https://github.com/upx/upx/issues/60
	modified:   p_lx_elf.cpp
	modified:   p_unix.cpp
	modified:   p_unix.h
2017-02-11 15:26:27 -08:00
László Molnár
d30a0a2e67 updated filter invocation in win64/pe 2017-02-06 14:31:16 +01:00
John Reiser
d913fe508f Remove debugging jig
modified:   ../.github/travis_testsuite_1.sh
	modified:   stub/powerpc-linux.elf-fold.h
	modified:   stub/src/powerpc-linux.elf-fold.S
	modified:   stub/tmp/powerpc-linux.elf-fold.map
2017-02-05 15:41:52 -08:00
John Reiser
5db7e826d3 Find and use AT_PAGESZ; forward from -entry to -fold.
Cleanup the runtime choice of PAGE_SIZE 4K or 64K
	modified:   stub/powerpc-linux.elf-entry.h
	modified:   stub/powerpc-linux.elf-fold.h
	modified:   stub/src/arch/powerpc/32/ppc_regs.h
	modified:   stub/src/powerpc-linux.elf-entry.S
	modified:   stub/src/powerpc-linux.elf-fold.S
	modified:   stub/tmp/powerpc-linux.elf-entry.bin.dump
	modified:   stub/tmp/powerpc-linux.elf-fold.map
2017-02-05 15:02:31 -08:00
John Reiser
7f3e7da7c7 Stubs LZMA_DEC00 and LZMA_ELF00 fall through; no "+80C" alignment.
https://github.com/upx/upx/issues/60  (partial)
addStubEntrySections() and getDecompressorSections()
	modified:   p_lx_elf.cpp
	modified:   p_mach.cpp
	modified:   packer_c.cpp
2017-02-05 14:52:09 -08:00
John Reiser
93cefde8fc Allow __PAGEZERO.vmsize to be 0x1000 on x86_64, as for "go"-language.
https://github.com/upx/upx/issues/59
	modified:   p_mach.cpp
	modified:   p_mach.h
2017-02-05 14:50:08 -08:00
John Reiser
02e7981e10 Merge and fix conflics
Conflicts:
	src/stub/src/arch/powerpc/64le/lzma_d.S
	src/stub/src/powerpc64le-darwin.dylib-entry.S
	src/stub/src/powerpc64le-darwin.macho-entry.S
	src/stub/src/powerpc64le-linux.elf-entry.S
	src/stub/src/powerpc64le-linux.kernel.vmlinux.S

	modified:   stub/src/arch/powerpc/32/lzma_d.S
2017-02-05 14:41:15 -08:00
John Reiser
0ecec10af0 Sync stubs and testsuite.
modified:   ../.github/travis_testsuite_1.sh
	modified:   stub/powerpc-linux.elf-entry.h
2017-02-05 14:26:18 -08:00
John Reiser
00b8cba987 typos
modified:   stub/src/powerpc-linux.elf-entry.S
2017-02-05 14:18:05 -08:00
John Reiser
8486bff918 PowerPC compare instructions: make cr0 explicit, put width ('w' or 'd') into mnemonic.
Easier to understand, caught a couple bugs in width.
	modified:   stub/powerpc-linux.elf-entry.h
	modified:   stub/powerpc64le-darwin.dylib-entry.h
	modified:   stub/powerpc64le-darwin.macho-entry.h
	modified:   stub/powerpc64le-linux.elf-entry.h
	modified:   stub/powerpc64le-linux.elf-fold.h
	modified:   stub/powerpc64le-linux.kernel.vmlinux.h
	modified:   stub/src/arch/powerpc/32/bxx.S
	modified:   stub/src/arch/powerpc/32/nrv2d_d.S
	modified:   stub/src/arch/powerpc/32/nrv2e_d.S
	modified:   stub/src/arch/powerpc/64le/bxx.S
	modified:   stub/src/arch/powerpc/64le/lzma_d.S
	modified:   stub/src/arch/powerpc/64le/nrv2b_d.S
	modified:   stub/src/arch/powerpc/64le/nrv2d_d.S
	modified:   stub/src/arch/powerpc/64le/nrv2e_d.S
	modified:   stub/src/powerpc-darwin.macho-fold.S
	modified:   stub/src/powerpc-linux.elf-entry.S
	modified:   stub/src/powerpc64le-darwin.dylib-entry.S
	modified:   stub/src/powerpc64le-darwin.macho-entry.S
	modified:   stub/src/powerpc64le-darwin.macho-fold.S
	modified:   stub/src/powerpc64le-linux.elf-entry.S
	modified:   stub/src/powerpc64le-linux.elf-fold.S
	modified:   stub/src/powerpc64le-linux.kernel.vmlinux.S
2017-02-05 14:00:19 -08:00
John Reiser
5305eb5b8a Sync stubs
modified:   stub/amd64-darwin.dylib-entry.h
	modified:   stub/amd64-darwin.macho-entry.h
	modified:   stub/amd64-darwin.macho-fold.h
	modified:   stub/amd64-linux.elf-fold.h
	modified:   stub/amd64-linux.shlib-init.h
	modified:   stub/amd64-win64.pep.h
	modified:   stub/powerpc-linux.elf-entry.h
	modified:   stub/powerpc-linux.elf-fold.h
	modified:   stub/powerpc64le-darwin.dylib-entry.h
	modified:   stub/powerpc64le-darwin.macho-entry.h
	modified:   stub/powerpc64le-linux.elf-entry.h
	modified:   stub/powerpc64le-linux.kernel.vmlinux.h
	modified:   stub/src/arch/powerpc/64le/lzma_d.S
	modified:   stub/src/powerpc64le-darwin.dylib-entry.S
	modified:   stub/src/powerpc64le-darwin.macho-entry.S
	modified:   stub/src/powerpc64le-linux.elf-entry.S
	modified:   stub/src/powerpc64le-linux.kernel.vmlinux.S
	modified:   stub/tmp/amd64-win64.pep.bin.dump
	modified:   stub/tmp/powerpc-linux.elf-entry.bin.dump
	modified:   stub/tmp/powerpc-linux.elf-fold.map
2017-02-05 13:37:01 -08:00
John Reiser
377a3bb7de More register definitions
modified:   stub/src/arch/powerpc/32/ppc_regs.h
2017-02-05 13:32:54 -08:00
John Reiser
5a47e8d2c6 Find and use AT_PAGESZ
modified:   stub/src/powerpc-linux.elf-entry.S
	modified:   stub/src/powerpc-linux.elf-fold.S
2017-02-05 13:31:17 -08:00
John Reiser
71f4cd7c85 Fix register usage conventions for amd64 unfilter
modified:   stub/src/amd64-win64.pep.S
	modified:   stub/src/arch/amd64/bxx.S
2017-02-05 13:29:59 -08:00
John Reiser
f7751684af Stubs LZMA_DEC00 and LZMA_ELF00 fall through; no "+80C" alignment.
addStubEntrySections() and getDecompressorSections()
	modified:   p_lx_elf.cpp
	modified:   p_mach.cpp
	modified:   packer_c.cpp
2017-02-05 13:26:02 -08:00
John Reiser
2cefd34bb7 Allow __PAGEZERO.vmsize to be 0x1000 on x86_64, as for "go"-language.
https://github.com/upx/upx/issues/59
	modified:   p_mach.cpp
	modified:   p_mach.h
2017-02-03 15:12:40 -08:00
Thierry Fauck
eac891dc3a Typo in .bss bzeroing
Rebuild of powerpc64le stubs

Signed-off-by: Thierry Fauck <tfauck@free.fr>

	modified:   stub/powerpc64le-darwin.dylib-entry.h
	modified:   stub/powerpc64le-darwin.macho-entry.h
	modified:   stub/powerpc64le-linux.elf-entry.h
	modified:   stub/powerpc64le-linux.elf-fold.h
	modified:   stub/powerpc64le-linux.kernel.vmlinux.h
	modified:   stub/src/powerpc64le-linux.elf-fold.S
	modified:   stub/src/powerpc64le-linux.elf-main.c
	modified:   stub/tmp/powerpc64le-linux.elf-fold.map
2017-02-03 10:57:05 +01:00
Thierry Fauck
abd3599408 Explicitely specify cmp instructions to be 32 bits or 64bits on powerpc
(Thanks to John Reiser).

Signed-off-by: Thierry Fauck <tfauck@free.fr>

	modified:   src/arch/powerpc/32/bxx.S
	modified:   src/arch/powerpc/32/lzma_d.S
	modified:   src/arch/powerpc/64le/bxx.S
	modified:   src/arch/powerpc/64le/lzma_d.S
	modified:   src/arch/powerpc/64le/nrv2b_d.S
	modified:   src/arch/powerpc/64le/nrv2d_d.S
	modified:   src/arch/powerpc/64le/nrv2e_d.S
	modified:   src/powerpc64le-darwin.dylib-entry.S
	modified:   src/powerpc64le-darwin.macho-entry.S
	modified:   src/powerpc64le-darwin.macho-fold.S
	modified:   src/powerpc64le-linux.elf-entry.S
	modified:   src/powerpc64le-linux.elf-fold.S
	modified:   src/powerpc64le-linux.kernel.vmlinux.S
2017-02-03 10:55:14 +01:00
John Reiser
1bcd259c00 Merge branch 'devel' of https://github.com/upx/upx into devel 2017-02-01 17:17:31 -08:00
Thierry Fauck
c4e835266c Typo in .bss bzeroing
Signed-off-by: Thierry Fauck <tfauck@free.fr>

	modified:   src/stub/powerpc64le-linux.elf-fold.h
	modified:   src/stub/src/powerpc64le-linux.elf-fold.S
	modified:   src/stub/src/powerpc64le-linux.elf-main.c
	modified:   src/stub/tmp/powerpc64le-linux.elf-fold.map
2017-01-30 18:53:34 +01:00
Thierry Fauck
685953f6a5 Explicitely specify cmp instructions to be 32 bits or 64bits on powerpc
Signed-off-by: Thierry Fauck <tfauck@free.fr>

	modified:   stub/src/arch/powerpc/32/bxx.S
	modified:   stub/src/arch/powerpc/64le/bxx.S
	modified:   stub/src/arch/powerpc/64le/lzma_d.S
	modified:   stub/src/arch/powerpc/64le/nrv2b_d.S
	modified:   stub/src/arch/powerpc/64le/nrv2d_d.S
	modified:   stub/src/arch/powerpc/64le/nrv2e_d.S
	modified:   stub/src/powerpc64le-darwin.dylib-entry.S
	modified:   stub/src/powerpc64le-darwin.macho-entry.S
	modified:   stub/src/powerpc64le-darwin.macho-fold.S
	modified:   stub/src/powerpc64le-linux.elf-entry.S
	modified:   stub/src/powerpc64le-linux.elf-fold.S
	modified:   stub/src/powerpc64le-linux.kernel.vmlinux.S
2017-01-30 00:34:45 +01:00
John Reiser
03fffbc724 Re-base to upx-3.93
modified:   src/stub/src/arch/amd64/bxx.S
2017-01-29 06:58:03 -08:00
Markus F.X.J. Oberhumer
e1a8c932ee Cleanup snprintf.cpp. 2017-01-29 14:11:46 +01:00
Markus F.X.J. Oberhumer
1aa2a6b054 Add missing src/stub/tmp/*.map files to repo. 2017-01-29 14:10:12 +01:00
Markus F.X.J. Oberhumer
f69199909f Post-release version bump. 2017-01-29 14:05:00 +01:00
John Reiser
bf3ddeb1eb Rebuild stubs.
modified:   amd64-darwin.dylib-entry.h
	modified:   amd64-darwin.macho-entry.h
	modified:   amd64-darwin.macho-fold.h
	modified:   amd64-linux.elf-fold.h
	modified:   amd64-linux.kernel.vmlinux.h
	modified:   amd64-linux.shlib-init.h
	modified:   amd64-win64.pep.h
	modified:   i386-bsd.elf-entry.h
	modified:   i386-bsd.elf.execve-entry.h
	modified:   i386-darwin.dylib-entry.h
	modified:   i386-darwin.macho-entry.h
	modified:   i386-dos32.djgpp2.h
	modified:   i386-dos32.tmt.h
	modified:   i386-dos32.watcom.le.h
	modified:   i386-linux.elf-entry.h
	modified:   i386-linux.elf.execve-entry.h
	modified:   i386-linux.elf.interp-entry.h
	modified:   i386-linux.kernel.vmlinux.h
	modified:   i386-linux.kernel.vmlinuz.h
	modified:   i386-linux.shlib-init.h
	modified:   i386-netbsd.elf-entry.h
	modified:   i386-win32.pe.h
	modified:   tmp/amd64-darwin.dylib-entry.bin.dump
	modified:   tmp/amd64-darwin.macho-entry.bin.dump
	modified:   tmp/amd64-linux.shlib-init.bin.dump
	modified:   tmp/amd64-win64.pep.bin.dump
2017-01-29 14:01:57 +01:00
John Reiser
fc261ad8cd Smaller by 7 bytes; also slower.
https://github.com/upx/upx/issues/43
	modified:   bxx.S
2017-01-29 14:01:56 +01:00
John Reiser
90fc018295 Avoid sigsegv after "patchelf --set-rpath"
https://github.com/upx/upx/issues/47
Enhancement not yet implemented: non-adjacent ElfXX_Ehdr and ElfXX_Phdr.
	modified:   p_unix.cpp
2017-01-29 14:01:56 +01:00
John Reiser
cdc01d9a69 linux.sh/i386 interpreter.e_machine must be EM_386; else execve()
https://github.com/upx/upx/issues/53
	modified:   stub/i386-linux.elf.shell-fold.h
	modified:   stub/src/i386-linux.elf.shell-fold.S
	modified:   stub/src/i386-linux.elf.shell-main.c
2017-01-29 14:01:56 +01:00
John Reiser
da7e76c07d Document location of checksums for testsuite.
modified:   Makefile
2017-01-29 14:01:56 +01:00
John Reiser
ba9118aa58 Bug in unfilter on x86* when region ends in 32-bit displacement.
https://github.com/upx/upx/issues/43
	modified:   stub/src/arch/amd64/bxx.S
	modified:   stub/src/arch/i386/macros.S
	plus all the stubs that use them
2017-01-29 14:01:56 +01:00
Markus F.X.J. Oberhumer
fdce705e55 Bump release date. 2017-01-29 12:07:00 +01:00
Markus F.X.J. Oberhumer
f502f41359 Update conf.h. 2017-01-28 22:39:42 +01:00
Markus F.X.J. Oberhumer
34c9cfb6b0 Don't use "long". 2017-01-28 22:39:42 +01:00
Markus F.X.J. Oberhumer
6da1790c46 New ACC version. 2017-01-28 22:39:42 +01:00
Markus F.X.J. Oberhumer
c940d2906f Mention win64/pe in help usage text. 2017-01-17 01:56:58 +01:00
Markus F.X.J. Oberhumer
ea7a1ad2c7 Bump version date. 2017-01-15 15:51:33 +01:00
Markus F.X.J. Oberhumer
45ddd6a68d Enable wildcard expansion on newer mingw versions. 2017-01-15 15:47:53 +01:00
Markus F.X.J. Oberhumer
14710dea55 Replace some negative enum constants with "static const unsigned" vars. 2017-01-03 12:57:10 +01:00
Markus F.X.J. Oberhumer
5d3be8da1d Silence a MSVC warning. 2017-01-03 12:37:35 +01:00
Markus F.X.J. Oberhumer
fba51dabd0 Bump UPX_VERSION_DATE. 2017-01-03 12:06:17 +01:00
Markus F.X.J. Oberhumer
c4da5e81fa Welcome 2017. 2017-01-03 12:02:07 +01:00
Markus F.X.J. Oberhumer
bc80d81432 Silence a bogus scan-build warning. 2016-12-30 23:59:31 +01:00
László Molnár
67797efead fixed relocation handling regression in win32/pe (issue #38) 2016-12-30 23:18:32 +01:00
László Molnár
c7cb036536 fixed data corruption in import handling (issue #32,#34) 2016-12-30 21:31:50 +01:00
Markus F.X.J. Oberhumer
0ccbc5f139 Silence some bogus coverity warnings. 2016-12-21 19:03:01 +01:00
Markus F.X.J. Oberhumer
2a6bbcaf8f Fix a p_w64pep.cpp issue detected by coverity. 2016-12-21 19:01:55 +01:00
Markus F.X.J. Oberhumer
d46a8438ba Remove unused option "--script=". 2016-12-19 23:44:10 +01:00
Markus F.X.J. Oberhumer
cc9d19da19 Remove unused PackLinuxI386sep. 2016-12-19 23:29:42 +01:00
Markus F.X.J. Oberhumer
61652a2989 Remove unused PackSolarisSparc. 2016-12-19 23:23:25 +01:00
Markus F.X.J. Oberhumer
edd7503607 Update executable format constants. 2016-12-19 23:18:38 +01:00
Markus F.X.J. Oberhumer
c9d6dab401 Remove unused p_elks.cpp. 2016-12-19 23:14:08 +01:00
Markus F.X.J. Oberhumer
d303038bcb Remove unused p_vxd.h. 2016-12-19 23:12:05 +01:00
Markus F.X.J. Oberhumer
0a0e7c3b7c Remove unused p_w16ne.cpp. 2016-12-19 23:11:00 +01:00
Markus F.X.J. Oberhumer
0b4ac35bc9 Tune some MSVC warnings. 2016-12-19 22:57:43 +01:00
László Molnár
c51864ca39 fixed TLS callback handling for PE64 2016-12-18 23:34:27 +01:00
John Reiser
a1cabd5a68 Avoid warning C4805: '|': unsafe mix of type 'bool' and type 'unsigned int' in operation
modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2016-12-18 11:32:47 -08:00
John Reiser
9c1bc99d7a Avoid warning C4146: unary minus operator applied to unsigned type, result still unsigned
modified:   p_mach.cpp
2016-12-16 10:59:51 -08:00
Markus F.X.J. Oberhumer
c05fedcb76 Update Travis. 2016-12-14 16:27:51 +01:00
Markus F.X.J. Oberhumer
4749e0d71e Post-release version bump. 2016-12-11 17:50:03 +01:00
Markus F.X.J. Oberhumer
1c01b77a71 Bump release date. 2016-12-11 16:12:06 +01:00
Markus F.X.J. Oberhumer
efd5bc24b0 Bump tentative release date. 2016-12-01 00:40:54 +01:00
John Reiser
fc1287659a de-tab (comments, too?)
modified:   stub/src/powerpc-darwin.macho-upxmain.c
2016-11-21 14:02:57 -08:00
John Reiser
322f682d32 re-generate stub
modified:   powerpc-darwin.macho-upxmain.h
2016-11-21 08:26:08 -08:00
John Reiser
0e329336fc Merge branch 'devel' of https://github.com/upx/upx into devel 2016-11-21 08:23:05 -08:00
John Reiser
b33bdabbb6 powerpc Mach-o cleanup
modified:   stub/powerpc-darwin.macho-upxmain.exe
	new file:   stub/src/powerpc-darwin.macho-upxmain.c
2016-11-21 08:22:09 -08:00
Markus F.X.J. Oberhumer
27d30121ab Bump tentative release date. 2016-11-20 15:07:46 +01:00
Markus F.X.J. Oberhumer
345278f309 Re-enable assertion in xstrip.py. 2016-11-20 15:07:46 +01:00
Markus F.X.J. Oberhumer
4953e77161 upx-clang-format -i linker.cpp linker.h 2016-11-20 14:20:36 +01:00
Markus F.X.J. Oberhumer
8d61e037f9 Cleanups. 2016-11-20 14:17:21 +01:00
Markus F.X.J. Oberhumer
33a51e69bf Update submodules. 2016-11-20 13:56:42 +01:00
Markus F.X.J. Oberhumer
8772e52513 Remove old cruft. 2016-11-20 13:51:53 +01:00
John Reiser
9e1631ad4f avoid null section name and zero alignment; enforce record === line
modified:   linker.cpp
	modified:   linker.h
2016-11-19 17:38:23 -08:00
John Reiser
134b829d59 prevent warning C4319: '~': zero extending 'const unsigned int' to 'upx_uint64_t' of greater size
modified:   linker.cpp
	modified:   p_lx_elf.cpp
	modified:   pefile.cpp
2016-11-19 16:46:01 -08:00
John Reiser
3df7d26101 propagate cpusubtype
modified:   p_mach.cpp
	modified:   p_mach.h
2016-11-14 05:06:29 -08:00
John Reiser
cf56086f06 powerpc-darwin.macho-: remove debugging 'trap' :-)
modified:   stub/powerpc-darwin.macho-upxmain.exe
	modified:   stub/powerpc-darwin.macho-upxmain.h
	modified:   stub/src/powerpc-darwin.macho-upxsubr.S
2016-11-12 20:13:12 -08:00
John Reiser
a72aca4379 powerpc (32-bit) works on MacOS using Sierra-compatible strategy.
modified:   p_mach.cpp
	modified:   p_mach.h
	modified:   stub/powerpc-darwin.macho-entry.h
	modified:   stub/powerpc-darwin.macho-upxmain.exe
	modified:   stub/powerpc-darwin.macho-upxmain.h
	modified:   stub/src/powerpc-darwin.macho-entry.S
	modified:   stub/src/powerpc-darwin.macho-upxsubr.S
	modified:   stub/tmp/powerpc-darwin.macho-entry.bin.dump
2016-11-12 19:48:19 -08:00
John Reiser
edb0b7519a Merge branch 'devel' of https://github.com/upx/upx into devel 2016-11-09 06:08:44 -08:00
John Reiser
3f14b9dab7 LC_UNIXTHREAD in ::pass4
modified:   p_mach.cpp
2016-11-08 17:53:02 -08:00
Thierry Fauck
b1c07c22ce powerpc64le -fpic dynamically linked binary support
Update stub for -fpic support
 Handle 64K page in p_lx_elf.cpp

Signed-off-by: Thierry Fauck <tfauck@free.fr>
2016-11-08 18:29:10 +01:00
John Reiser
3b2c411274 Work on 32-bit PowerPC
modified:   p_mach.cpp
	modified:   p_mach.h
2016-11-06 20:39:01 -08:00
John Reiser
e418af1ccd Try to fix 32-bit PowerPC.
modified:   p_mach.cpp
	modified:   p_mach.h
	modified:   stub/Makefile
	new file:   stub/powerpc-darwin.macho-upxmain.exe
	new file:   stub/powerpc-darwin.macho-upxmain.h
	new file:   stub/src/powerpc-darwin.macho-upxsubr.S
2016-11-06 17:59:16 -08:00
John Reiser
7dc004acb3 bug in other-endian ::canPack and ::canUnpack
modified:   p_mach.cpp
2016-11-05 14:02:51 -07:00
John Reiser
2635472896 more unpacking for Mach-o (pre-3.91 ?)
modified:   p_mach.cpp
	modified:   p_mach.h
2016-11-05 13:16:16 -07:00
John Reiser
5c0340f9ae Merge branch 'devel' of https://github.com/upx/upx into devel 2016-10-19 15:20:04 -07:00
John Reiser
c2c970ee33 pacify c++-analyzer
modified:   p_lx_elf.cpp
2016-10-19 15:19:33 -07:00
Markus F.X.J. Oberhumer
1e7950f671 Rebuild src/stubs from current sources. UNTESTED. 2016-10-19 14:59:33 +02:00
Thierry Fauck
8fde05191a powerpc: Omit -Os flag to avoid use of savegrp*
Signed-off-by: Thierry Fauck <tfauck@free.fr>

	modified:   stub/Makefile
2016-10-19 14:41:18 +02:00
John Reiser
44328aee76 fix brk() problem when is_big: stub must munmap all_pages
https://github.com/upx/upx/issues/5
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2016-10-15 14:06:56 -07:00
Markus F.X.J. Oberhumer
f606b5879b Update Travis. 2016-10-11 22:33:45 +02:00
Thierry Fauck
9b86e68268 POWERPC: Allocate 4K / 64K pages depending on processor type.
Powerpc: ppc64le processor - Fix nrv2x-d.S compression routines
xstrip - disallow assert at line 178

Signed-off-by: Thierry Fauck <tfauck@free.fr>

	modified:   powerpc-darwin.dylib-entry.h
	modified:   powerpc-darwin.macho-entry.h
	modified:   powerpc-darwin.macho-fold.h
	modified:   powerpc-linux.elf-entry.h
	modified:   powerpc-linux.elf-fold.h
	modified:   powerpc-linux.kernel.vmlinux.h
	modified:   powerpc64le-darwin.dylib-entry.h
	modified:   powerpc64le-darwin.macho-entry.h
	modified:   powerpc64le-darwin.macho-fold.h
	modified:   powerpc64le-linux.elf-entry.h
	modified:   powerpc64le-linux.elf-fold.h
	modified:   powerpc64le-linux.kernel.vmlinux.h
	modified:   scripts/xstrip.py
	modified:   src/arch/powerpc/64le/nrv2b_d.S
	modified:   src/arch/powerpc/64le/nrv2d_d.S
	modified:   src/arch/powerpc/64le/nrv2e_d.S
	modified:   src/powerpc-linux.elf-entry.S
	modified:   src/powerpc-linux.elf-fold.S
	modified:   src/powerpc-linux.elf-main.c
	modified:   tmp/powerpc-linux.elf-entry.bin.dump
	modified:   tmp/powerpc64le-darwin.dylib-entry.bin.dump
	modified:   tmp/powerpc64le-darwin.macho-entry.bin.dump
	modified:   tmp/powerpc64le-linux.elf-entry.bin.dump
	modified:   tmp/powerpc64le-linux.kernel.vmlinux.bin.dump
2016-10-11 09:52:40 -04:00
John Reiser
d688a05ac7 DT_JMPREL vanished (binutils-2.26.1); check all DT_RELA.
modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2016-10-09 21:50:45 -07:00
John Reiser
9dd0e3ce4f c++-analyzer finds the speck but misses the log.
modified:   p_mach.cpp
2016-10-09 09:34:33 -07:00
John Reiser
ca2293f6d3 c++-analyzer needs improved range tracking.
modified:   p_lx_elf.cpp
2016-10-09 09:33:35 -07:00
Markus F.X.J. Oberhumer
b0207ce524 Some refactoring. NFC. 2016-10-09 13:23:19 +02:00
László Molnár
297d44c614 PE: fixed file data alignment problem 2016-10-09 11:29:29 +02:00
Markus F.X.J. Oberhumer
22178f2224 Minor cleanups. 2016-10-09 03:12:19 +02:00
Markus F.X.J. Oberhumer
4157affbd7 pefile: make kernelDLL() return the same strings as in UPX 3.91. 2016-10-09 02:53:20 +02:00
Markus F.X.J. Oberhumer
4b991203df pefile.cpp: make import sorting independent from qsort() internals. 2016-10-09 00:48:40 +02:00
Markus F.X.J. Oberhumer
38a265741c Ongoing cleanups. 2016-10-08 18:49:14 +02:00
Markus F.X.J. Oberhumer
ed900b0476 More thorough use of O_BINARY. 2016-10-07 15:04:12 +02:00
John Reiser
42206364e5 Reduce Mach-o headers
modified:   p_mach.cpp
2016-10-06 16:06:24 -07:00
John Reiser
82d9bb8f51 Fix namespace typedefs for Mach-o structs [upx_uint32_t ==> Word]
modified:   p_mach.cpp
	modified:   p_mach.h
2016-10-06 14:00:05 -07:00
John Reiser
923a9d3f9b Template PackMackBase<T>::pack3. Use more templates for ::pack4.
modified:   p_mach.cpp
	modified:   p_mach.h
2016-10-06 08:55:09 -07:00
John Reiser
ae7660068b Merge branch 'devel' of https://github.com/upx/upx into devel 2016-10-06 07:49:52 -07:00
John Reiser
f466c1d764 Cosmetic
modified:   p_mach.cpp
2016-10-06 07:49:37 -07:00
Markus F.X.J. Oberhumer
6e76f8ef3a Don't use variable length arrays (VLA). 2016-10-06 13:04:46 +02:00
Markus F.X.J. Oberhumer
b3a8d02caf Cosmetic cleanups. 2016-10-06 12:31:03 +02:00
Markus F.X.J. Oberhumer
022ba32c1a Improve robustness of seek() by adding some sanity checks. 2016-10-06 12:11:32 +02:00
Markus F.X.J. Oberhumer
8f5e89c900 Update testsuite. 2016-10-06 11:19:31 +02:00
Markus F.X.J. Oberhumer
d335d7bafd p_mach.h: fix C++ syntax. 2016-10-06 09:51:58 +02:00
John Reiser
1f51ef7df6 Merge branch 'devel' of https://github.com/upx/upx into devel 2016-10-05 17:16:53 -07:00
Markus F.X.J. Oberhumer
ec082ee023 Cosmetic cleanup. 2016-10-06 00:45:42 +02:00
John Reiser
791fd9199e Preserve alignment in .text
modified:   p_mach.cpp
2016-10-05 12:52:52 -07:00
John Reiser
9e8baf1914 i386 for MacOS 10.12 "Sierra"
modified:   p_mach.cpp
	modified:   stub/i386-darwin.macho-entry.h
	modified:   stub/src/i386-darwin.macho-entry.S
	modified:   stub/tmp/i386-darwin.macho-entry.bin.dump
2016-10-05 11:25:16 -07:00
John Reiser
64b7080532 Merge branch 'devel' of https://github.com/upx/upx into devel 2016-10-04 21:05:44 -07:00
John Reiser
8fd5479f32 Templates for ::pack4; i386 now packs, needs work before running.
modified:   p_mach.cpp
	modified:   p_mach.h
	new file:   stub/i386-darwin.macho-upxmain.exe
	new file:   stub/i386-darwin.macho-upxmain.h
	new file:   stub/src/i386-darwin.macho-upxmain.c
2016-10-04 19:58:04 -07:00
John Reiser
07b41b9bc3 i386-darwin.macho-upxmain.h
modified:   Makefile
2016-10-04 10:48:44 -07:00
John Reiser
8ebadfafe9 Standalone bswap, bzero, syscalls for i386-darwin.macho
new file:   i386-darwin.macho-upxsubr.S
2016-10-04 10:46:59 -07:00
John Reiser
3283896e4b Templatize ::buildLoader
modified:   p_mach.cpp
	modified:   p_mach.h
2016-10-04 08:54:55 -07:00
John Reiser
b444bcf418 On the way to templates and mach-o/i386.
modified:   p_mach.cpp
	modified:   p_mach.h
2016-10-03 22:00:26 -07:00
Markus F.X.J. Oberhumer
13034577fc Fix previous commit. 2016-10-04 00:56:01 +02:00
Markus F.X.J. Oberhumer
9feefc2e7f Makefile: added run-testsuite target. 2016-10-04 00:42:24 +02:00
John Reiser
a5393e985d Merge branch 'devel' of https://github.com/upx/upx into devel 2016-10-03 09:42:48 -07:00
John Reiser
e3fe0dc89b Avoid bug in ld-linux to set brk(0) when .p_align is large.
modified:   p_lx_elf.cpp
2016-10-03 09:41:05 -07:00
Markus F.X.J. Oberhumer
42d49e9d50 Update Makefile and check_whitespace.sh. 2016-10-03 13:13:13 +02:00
Markus F.X.J. Oberhumer
06eb244800 Add check_whitespace_git.sh. Minor cleanups. 2016-10-03 04:47:02 +02:00
John Reiser
870cdfa51f Merge branch 'devel' of https://github.com/upx/upx into devel 2016-10-02 10:47:59 -07:00
John Reiser
93787c74ee Rewrite linfo in output file.
modified:   p_mach.cpp
2016-10-02 10:47:37 -07:00
Markus F.X.J. Oberhumer
945323fe15 Fix a compilation warning. 2016-10-02 15:54:14 +02:00
Markus F.X.J. Oberhumer
5e41e69b27 Remove trailing whitespace from p_mach.cpp. 2016-10-02 15:48:56 +02:00
Markus F.X.J. Oberhumer
9d14185f7d Add check_whitespace.sh and call it from Makefile. Update Travis. 2016-10-02 15:46:57 +02:00
John Reiser
0f74162551 Decompression works after codesign. (Still more is possible.)
modified:   p_mach.cpp
2016-10-01 20:38:25 -07:00
John Reiser
00b1ff1ff6 Apple codesign now works.
modified:   p_mach.cpp
2016-10-01 17:40:32 -07:00
John Reiser
977024ea94 Fix clang scan-build errors.
modified:   p_lx_elf.cpp
2016-10-01 17:38:16 -07:00
Markus F.X.J. Oberhumer
ee093e5232 Minor cleanups. 2016-10-01 19:59:10 +02:00
Markus F.X.J. Oberhumer
e41c475671 Use calloc instead of malloc to pacify valgrind. 2016-09-28 21:30:38 +02:00
Markus F.X.J. Oberhumer
b9b3b67b95 Silence some pedantic compilation warnings about unused results. 2016-09-28 13:50:50 +02:00
Markus F.X.J. Oberhumer
0d57d2cfe3 Remove old cruft. 2016-09-28 13:39:49 +02:00
Markus F.X.J. Oberhumer
32de5d0d7f Fix msvc build. 2016-09-28 13:34:39 +02:00
Markus F.X.J. Oberhumer
51eab2a4b7 Update Makefile configuration variables. 2016-09-28 13:07:39 +02:00
Markus F.X.J. Oberhumer
f7554374ab Update email address. 2016-09-28 12:25:01 +02:00
Markus F.X.J. Oberhumer
b4870f62c9 Add option --prefer-ucl. 2016-09-28 11:57:15 +02:00
Markus F.X.J. Oberhumer
f1d713ebf6 Silence some pedantic warnings. 2016-09-28 11:29:20 +02:00
Markus F.X.J. Oberhumer
a7386238dd Update Travis. 2016-09-27 20:29:04 +02:00
Markus F.X.J. Oberhumer
6b39d122a6 Support MSVC. 2016-09-27 20:23:23 +02:00
Markus F.X.J. Oberhumer
a0582c5380 pefile.cpp: don't use VLA. 2016-09-27 20:19:43 +02:00
Markus F.X.J. Oberhumer
1f37112969 Moving to github. 2016-09-27 08:41:11 +02:00
Markus F.X.J. Oberhumer
361958db76 Check endian in assertPacker(). 2016-09-26 15:38:04 +02:00
Markus F.X.J. Oberhumer
8bc7880b19 Improve gitrev handling. 2016-09-26 15:32:01 +02:00
John Reiser
48e00b371c Move UPX_F_MACH_PPC64LE and friends to 38 et seq, the little-endian side.
modified:   conf.h
2016-09-26 05:53:11 -07:00
Markus F.X.J. Oberhumer
aee52d3880 Improve gitrev handling. 2016-09-26 10:35:29 +02:00
Markus F.X.J. Oberhumer
e6da9e8d1a Small snprintf.cpp update. 2016-09-26 09:12:53 +02:00
Markus F.X.J. Oberhumer
156ca03b67 Silence some pedantic compiler warnings. 2016-09-26 09:12:53 +02:00
Markus F.X.J. Oberhumer
3f4419b177 Update stub/src for recent changes. 2016-09-26 09:12:53 +02:00
Markus F.X.J. Oberhumer
676f860d7d Normalize whitespace. 2016-09-26 09:12:53 +02:00
Markus F.X.J. Oberhumer
5ce93ae0c7 Update submodules. 2016-09-26 09:12:53 +02:00
László Molnár
43231826b9 fixed address sanitizer problem (untested) 2016-09-26 08:56:23 +02:00
Markus F.X.J. Oberhumer
a29064107e Bump version date. 2016-09-25 14:01:40 +02:00
Markus F.X.J. Oberhumer
daafc29d2b Add support for UPX_VERSION_GITREV. Some cleanups. 2016-09-25 09:41:26 +02:00
John Reiser
3c786acf2b Fix bug in Mach-O stub.
modified:   amd64-darwin.macho-upxmain.exe
	modified:   amd64-darwin.macho-upxmain.h
	modified:   src/amd64-darwin.macho-upxmain.c
2016-09-24 19:44:00 -07:00
John Reiser
53c3817d4d Allow longer Mach-O headers.
modified:   amd64-darwin.macho-upxmain.exe
2016-09-24 17:26:00 -07:00
John Reiser
9109254488 Allow longer Mach-O headers.
modified:   src/amd64-darwin.macho-upxmain.c
2016-09-24 17:21:07 -07:00
John Reiser
df19f0d5ec Try harder to decompress Mach-O I386, too.
modified:   p_mach.cpp
	modified:   p_mach.h
2016-09-24 09:15:10 -07:00
John Reiser
093362e479 Merge branch 'devel' of https://github.com/upx/upx into devel 2016-09-24 06:44:19 -07:00
John Reiser
7826a3652b Try harder to decompress Mach-O, because pirates.
modified:   p_mach.cpp
	modified:   p_mach.h
2016-09-24 06:43:16 -07:00
Markus F.X.J. Oberhumer
c27b7e52e1 Small Makefile update. 2016-09-24 13:49:07 +02:00
Markus F.X.J. Oberhumer
6f33929f91 Cleanups. 2016-09-24 12:10:46 +02:00
Markus F.X.J. Oberhumer
3841be7e20 Remove *.bin files. 2016-09-24 11:18:18 +02:00
John Reiser
2c28521283 NetBSDElf32x86 should not impersonate [i386-linux.elf, linux/i386] 2016-09-23 19:31:26 -07:00
László Molnár
1c735cc204 fixed too strict checks in resource handling 2016-09-22 22:17:08 +02:00
Markus F.X.J. Oberhumer
b1a2f8fec0 Update vim modelines. 2016-09-22 18:17:37 +02:00
Markus F.X.J. Oberhumer
83828aa8a3 Update vim modelines. 2016-09-22 17:29:43 +02:00
Markus F.X.J. Oberhumer
4eb81b4d66 Update stub/scripts. 2016-09-22 14:27:57 +02:00
Markus F.X.J. Oberhumer
96d9968db5 Welcome 2016. 2016-09-22 14:07:14 +02:00
Markus F.X.J. Oberhumer
2781e37ec0 Mark version as "BETA". 2016-09-22 14:05:08 +02:00
Markus F.X.J. Oberhumer
6d61e773b5 Bump version year. 2016-09-22 14:02:44 +02:00
Markus F.X.J. Oberhumer
c5171114d1 Clean up stub/Makefile. NFC. 2016-09-22 13:11:14 +02:00
Markus F.X.J. Oberhumer
0ca0a832de stub: arm renaming. 2016-09-22 12:36:00 +02:00
Markus F.X.J. Oberhumer
aef54a4bfd Update source for previous rename. 2016-09-22 12:12:43 +02:00
Markus F.X.J. Oberhumer
4c473acfec stub: arm renaming. 2016-09-22 12:05:53 +02:00
Markus F.X.J. Oberhumer
0de41e97ac Update source for previous rename. 2016-09-22 11:54:44 +02:00
Markus F.X.J. Oberhumer
0e52ab3f90 stub: arm renaming. 2016-09-22 11:52:50 +02:00
Markus F.X.J. Oberhumer
797679b42c stub: arm renaming. 2016-09-22 11:43:23 +02:00
Markus F.X.J. Oberhumer
1bc8b6f46e Update source for previous rename. 2016-09-22 11:29:12 +02:00
Markus F.X.J. Oberhumer
f322b580ff stub: arm renaming. 2016-09-22 11:28:00 +02:00
Markus F.X.J. Oberhumer
2b2f33e3f5 Update source for previous rename. 2016-09-22 11:22:18 +02:00
Markus F.X.J. Oberhumer
ce29cd2fad stub: arm renaming. 2016-09-22 11:20:53 +02:00
Markus F.X.J. Oberhumer
0d5843f44e Update source for previous rename. 2016-09-22 11:17:53 +02:00
Markus F.X.J. Oberhumer
e36e8e3b33 stub: arm renaming. 2016-09-22 11:15:49 +02:00
Markus F.X.J. Oberhumer
e251a1ca19 Update source for previous rename. 2016-09-22 11:11:03 +02:00
Markus F.X.J. Oberhumer
4aedb00e43 stub: arm renaming. 2016-09-22 11:06:53 +02:00
Markus F.X.J. Oberhumer
10a0469221 Update source for previous rename. 2016-09-22 10:56:33 +02:00
Markus F.X.J. Oberhumer
d3419acada stub: start arm renaming. 2016-09-22 10:52:26 +02:00
Markus F.X.J. Oberhumer
65ea4117ca Add some comments to stub/Makefile in prepartion of renames. 2016-09-22 10:44:40 +02:00
Markus F.X.J. Oberhumer
8b0101dcab Update source for previous rename. 2016-09-22 10:25:45 +02:00
Markus F.X.J. Oberhumer
188f67cfca stub: rename ppc64le to powerpc64le. 2016-09-22 10:20:54 +02:00
Markus F.X.J. Oberhumer
053c9dc0e1 stub: arm64: rename some files, remove unused files. 2016-09-22 09:55:13 +02:00
Markus F.X.J. Oberhumer
493d9f1b9d Ongoing cleanups. 2016-09-22 03:23:55 +02:00
Markus F.X.J. Oberhumer
e28793f128 upx-clang-format -i packhead.cpp 2016-09-22 00:59:48 +02:00
Markus F.X.J. Oberhumer
ea2bddf245 Fix one more file_image usage. 2016-09-22 00:58:43 +02:00
Markus F.X.J. Oberhumer
763b3c05af Don't use "long". Cleanups. 2016-09-22 00:47:35 +02:00
Markus F.X.J. Oberhumer
473cfb54be Normalize whitespace. 2016-09-22 00:02:58 +02:00
Markus F.X.J. Oberhumer
a7fd742c17 Canonicalize the names of our executable formats. 2016-09-21 23:58:08 +02:00
Markus F.X.J. Oberhumer
b66ba140cb More cleanups. 2016-09-21 23:18:19 +02:00
Markus F.X.J. Oberhumer
242f606a29 p_lx_elf.h: turn file_image into a MemBuffer. 2016-09-21 22:22:41 +02:00
Markus F.X.J. Oberhumer
60a1214d7e upx-clang-format -i ui.cpp 2016-09-21 21:38:56 +02:00
Markus F.X.J. Oberhumer
189ab8c8e8 upx-clang-format -i ui.h 2016-09-21 21:35:13 +02:00
Markus F.X.J. Oberhumer
3765ca4e92 Cleanups and cruft removal. 2016-09-21 21:33:53 +02:00
Markus F.X.J. Oberhumer
df87d76070 p_mach.cpp: use proper types for variable "zero". 2016-09-21 20:39:00 +02:00
Markus F.X.J. Oberhumer
8fbf0b406b p_vmlinx.cpp: remove unused code fragment. 2016-09-21 17:56:43 +02:00
Markus F.X.J. Oberhumer
633073803f upx-clang-format -i s_djgpp2.cpp s_object.cpp s_vcsa.cpp s_win32.cpp screen.h 2016-09-21 17:46:42 +02:00
Markus F.X.J. Oberhumer
104da198d3 Minor screen cleanup. 2016-09-21 17:43:32 +02:00
Markus F.X.J. Oberhumer
b3121e4534 Use upx_uint16_t instead of unsigned short. 2016-09-21 17:40:11 +02:00
Markus F.X.J. Oberhumer
3bb654cc85 Ongoing cleanups and cruft removal. 2016-09-21 16:42:25 +02:00
John Reiser
d2830db94d Fix memory leak
modified:   p_lx_elf.cpp
2016-09-20 20:43:48 -07:00
John Reiser
ad6914b938 PackMachBase<T>::canUnpack() finds overlay_offset for decompression
modified:   p_mach.cpp
	modified:   p_mach.h
2016-09-20 20:07:42 -07:00
Markus F.X.J. Oberhumer
544ec21fc2 Fix building with clang. 2016-09-21 01:09:07 +02:00
Markus F.X.J. Oberhumer
1bb0fa1809 Fix a few things spotted by the gcc-6 sanitizer. Needs review. 2016-09-21 00:35:51 +02:00
Markus F.X.J. Oberhumer
ffa0efc898 Makefile: add support for USE_SANITIZE. 2016-09-21 00:34:52 +02:00
Markus F.X.J. Oberhumer
af6b4b8c27 Fix previous commit. 2016-09-21 00:34:20 +02:00
Markus F.X.J. Oberhumer
3f7c1f966b Minor cleanups. 2016-09-20 22:14:25 +02:00
Markus F.X.J. Oberhumer
535515f296 Update submodules. 2016-09-20 22:13:07 +02:00
Markus F.X.J. Oberhumer
7af6c4b10e Use new style casts. Cleanups. 2016-09-20 20:59:34 +02:00
Markus F.X.J. Oberhumer
2076bef95b upx-clang-format -i stdcxx.cpp stdcxx.h ; remove old cruft. 2016-09-20 20:40:08 +02:00
John Reiser
48ce1f1814 Merge branch 'master' of https://github.com/upx/upx 2016-09-20 10:56:00 -07:00
John Reiser
5151c8a505 Indentation error detected by g++-6
modified:   p_lx_elf.cpp
2016-09-20 10:55:14 -07:00
Markus F.X.J. Oberhumer
44248f19b5 Introduce mem_size() and New() and start using it. 2016-09-20 15:24:07 +02:00
Markus F.X.J. Oberhumer
8d433f2580 Update submodules. 2016-09-20 15:09:50 +02:00
Markus F.X.J. Oberhumer
272fe5488c Remove Makefile fragment from p_vmlinx.cpp. 2016-09-20 13:06:24 +02:00
Markus F.X.J. Oberhumer
c97765de14 upx-clang-format -i snprintf.cpp 2016-09-20 13:03:48 +02:00
Markus F.X.J. Oberhumer
077bbdfc78 conf.h: check for proper WITH_LZMA. 2016-09-20 12:45:28 +02:00
Markus F.X.J. Oberhumer
2fb38ce13a Update Makefile for upx-lzma-sdk. 2016-09-20 12:37:00 +02:00
Markus F.X.J. Oberhumer
22dc183f25 Add upx-lzma-sdk submodule. 2016-09-20 12:35:15 +02:00
Markus F.X.J. Oberhumer
3c492c3fc7 Update Makefile so that my build scripts work again. 2016-09-20 11:29:28 +02:00
Markus F.X.J. Oberhumer
d71db2978e Remove some old cruft. 2016-09-20 11:24:18 +02:00
Markus F.X.J. Oberhumer
e4723e0bad Avoid some compiler warnings. 2016-09-20 10:54:27 +02:00
Markus F.X.J. Oberhumer
dc56c4e530 bptr.h: size optimizations. 2016-09-20 10:30:09 +02:00
Markus F.X.J. Oberhumer
9579a51a8b pefile.cpp: always use BoundedPtr. 2016-09-20 10:20:42 +02:00
Markus F.X.J. Oberhumer
71f897ebf5 Avoid a -Wsign-compare warning. 2016-09-20 10:08:32 +02:00
Markus F.X.J. Oberhumer
09d9f71ae9 p_mach.h: use proper upx types. 2016-09-20 10:05:08 +02:00
John Reiser
c678ccdfb1 stub/ppc64le-darwin.macho-fold.h is flapping (works one time, not the next.) 2016-09-19 21:25:30 -07:00
John Reiser
bbbebe343b Try to recover powerpc64le. Still not successful [TOC space?]
modified:   Makefile
	new file:   ppc64-savegpr0.S
	modified:   ppc64le-darwin.macho-fold.h
2016-09-19 20:05:52 -07:00
John Reiser
033cb4f0c2 Fix merge
modified:   p_mach.cpp
2016-09-19 18:49:40 -07:00
John Reiser
d750034b79 amd64-darwin.macho-upxmain.exe and .h 2016-09-19 18:32:26 -07:00
Markus F.X.J. Oberhumer
a2063f0628 Normalize whitespace. 2016-09-20 02:06:58 +02:00
Markus F.X.J. Oberhumer
acf2f2ffc4 Merge branch 'sierra' 2016-09-20 01:54:33 +02:00
Markus F.X.J. Oberhumer
d14f484c4b Moving to github. 2016-09-19 22:41:32 +02:00
Markus F.X.J. Oberhumer
695e515a65 stub: update powerpc64le settings. 2016-09-19 22:22:21 +02:00
upstream
61089feee7 New ACC version. 2016-09-19 12:44:29 +00:00
Markus F.X.J. Oberhumer
ddc9b10cd3 Add scripts/upx-clang-format. 2016-09-19 11:04:25 +02:00
Markus F.X.J. Oberhumer
f95c92b431 Create a dummy stub/ppc64le-darwin.macho-fold.h so that upx builds again. 2016-09-19 10:54:23 +02:00
Markus F.X.J. Oberhumer
eba65a94e6 Add missing *.dump files to repo. 2016-09-19 10:44:22 +02:00
John Reiser
c28a0c6bb8 Synchronize stubs
modified:   src/stub/arm64-darwin.macho-entry.h
	modified:   src/stub/arm64-darwin.macho-fold.h
	modified:   src/stub/ppc64le-linux.elf-fold.h
	modified:   src/stub/tmp/arm64-darwin.macho-entry.bin.dump
2016-09-18 12:45:11 -07:00
Markus F.X.J. Oberhumer
d6bacd9b47 Remove src/stub/scripts/UNUSED. 2016-09-18 16:07:47 +02:00
Markus F.X.J. Oberhumer
70b1657323 Update for upx-stubtools v20160918. 2016-09-18 16:00:29 +02:00
John Reiser
45c75d42ad Catch up to upxtools 20160902; add dangling arm/v8a/lzma_d.S 2016-09-17 19:51:32 -07:00
jreiser@BitWagon.com
d4e55af2c2 Propagate LC_VERSION_MIN_MACOSX and LC_SOURCE_VERSION
changed src/p_mach.cpp
2016-09-17 16:40:07 -07:00
jreiser@BitWagon.com
48791a329d overlay_offset for decompress
changed src/p_mach.cpp
2016-09-17 16:16:41 -07:00
jreiser@BitWagon.com
9b26ebed75 LINKEDIT has unfilter and decompressor
changed src/p_mach.cpp
 changed src/stub/amd64-darwin.macho-upxmain.h
 changed src/stub/src/amd64-darwin.macho-upxmain.c
2016-09-17 15:24:23 -07:00
jreiser@BitWagon.com
e2160fb6c9 segLINK.initprot |= VM_PROT_EXECUTE
changed src/p_mach.cpp
2016-09-17 10:41:38 -07:00
jreiser@BitWagon.com
345a1c64f9 Omit Mach_command from stub where allowed.
changed src/p_mach.cpp
2016-09-17 09:36:58 -07:00
jreiser@BitWagon.com
7ad1e7756b Cleanup for checkin
changed src/p_mach.cpp
2016-09-17 06:49:41 -07:00
jreiser@BitWagon.com
90caf19e9e Cleanup amd64-darwin.macho-upxmain.c
changed src/stub/amd64-darwin.macho-upxmain.h
 changed src/stub/src/amd64-darwin.macho-upxmain.c
 changed src/stub/src/amd64-darwin.macho-upxsubr.S
2016-09-16 21:29:37 -07:00
jreiser@BitWagon.com
8d0b3b7d44 Fix segXHDR, but assume no __DATA in stub for now.
changed src/p_mach.cpp
2016-09-15 21:44:17 -07:00
jreiser@BitWagon.com
4c253d68d4 new start address 0xfe000000
changed src/stub/amd64-darwin.macho-upxmain.h
2016-09-15 21:38:39 -07:00
jreiser@BitWagon.com
73d1b331f1 trim Mach_command from stub. [Dirty, needs cleanup!]
changed src/p_mach.cpp
2016-09-13 20:20:41 -07:00
jreiser@BitWagon.com
af2fddfd6d rebuild stub
changed src/stub/amd64-darwin.macho-upxmain.h
2016-09-13 20:18:54 -07:00
jreiser@BitWagon.com
3e065ead65 fix .bss in floating dyld
changed src/stub/src/amd64-darwin.macho-upxmain.c
2016-09-13 20:17:51 -07:00
jreiser@BitWagon.com
3774704326 forgotten file; 3 FIXME !
added src/stub/src/arch/arm/v8a/lzma_d-arm.S
2016-09-13 20:14:44 -07:00
jreiser@BitWagon.com
4a1100b6a4 Unexport all symbols in compressed output.
added src/stub/src/amd64-darwin.macho-upxhide.txt
 changed src/stub/src/amd64-darwin.macho-upxmain.c
2016-09-11 15:28:42 -07:00
jreiser@BitWagon.com
63dec77ed6 Try auto-relocate for /usr/lib/dyld
changed src/stub/amd64-darwin.macho-upxmain.h
 changed src/stub/src/amd64-darwin.macho-upxmain.c
2016-09-11 15:08:56 -07:00
jreiser@BitWagon.com
1d3a66f890 bswap(), bzero(), fat_find(), assembly-language system calls
added src/stub/src/amd64-darwin.macho-upxsubr.S
 changed src/stub/amd64-darwin.macho-upxmain.h
 changed src/stub/src/amd64-darwin.macho-upxmain.c
2016-09-11 14:22:19 -07:00
jreiser@BitWagon.com
c1da92ca22 reduce asm()
changed src/stub/src/amd64-darwin.macho-upxmain.c
2016-09-11 06:03:06 -07:00
jreiser@BitWagon.com
13475002d7 segXHDR reserves address space; actual launch!
changed src/p_mach.cpp
 changed src/stub/amd64-darwin.macho-upxmain.h
 changed src/stub/src/amd64-darwin.macho-upxmain.c
2016-09-10 20:13:44 -07:00
jreiser@BitWagon.com
5bb6f246ed Mach-O dyld: __LINKEDIT must have highest .vmaddr and .fileoff 2016-09-10 15:46:36 -07:00
jreiser@BitWagon.com
89df7451ef Rebuild stubs
changed src/stub/amd64-darwin.macho-entry.h
 changed src/stub/amd64-darwin.macho-upxmain.h
 changed src/stub/tmp/amd64-darwin.macho-entry.bin.dump
2016-09-10 15:03:55 -07:00
jreiser@BitWagon.com
1334d544f7 stubtools 20160902 2016-09-10 15:03:04 -07:00
jreiser@BitWagon.com
3fefaa7362 revamp MH_EXECUTE: try to meet expectations of MacOSX 10.12 Sierra
changed src/p_mach.cpp
 changed src/stub/src/amd64-darwin.macho-upxmain.c
2016-09-10 15:02:13 -07:00
jreiser@BitWagon.com
15d62f7b96 Mach_main_command LC_MAIN 2016-09-10 15:00:28 -07:00
jreiser@BitWagon.com
83e0aaa511 sections AMD64BXX, MACH_UNC for MacOSX 10.12 2016-09-10 14:59:23 -07:00
jreiser@BitWagon.com
ee06ce1148 generic Mach_command 2016-09-10 14:57:27 -07:00
jreiser@BitWagon.com
16d6124bb4 amd64-darwin.macho-upxmain for stub on Mac OS X 10.12 "Sierra" 2016-09-05 20:37:23 -07:00
jreiser@BitWagon.com
1197beaa13 ElfLinker::init() zero length implies 0x4000 blank bytes 2016-09-05 20:36:07 -07:00
jreiser@BitWagon.com
98b428a8be Fix compiler warning 2016-09-05 20:32:52 -07:00
jreiser@BitWagon.com
17f47d3c0a p_mach*: Try for MacOSX 10.12 "Sierra" with UUID, XHDR. 2016-09-04 19:05:31 -07:00
John Reiser
a9cc3b2a89 Use gcc-ppc64-linux-gnu-5.3.1-2.fc22.x86_64
But bin-upx-20130920/multiarch-ld-2.17 gets SIGSEGV for fold.h

  src/stub/Makefile
  src/stub/ppc64le-darwin.dylib-entry.h
  src/stub/ppc64le-darwin.macho-entry.h
  src/stub/ppc64le-linux.elf-entry.h
  src/stub/ppc64le-linux.kernel.vmlinux.h
2016-07-27 08:57:54 -07:00
John Reiser
199102c106 stub/src/arch/arm/v8a/lzma_d_cf.S and follow-ons
src/stub/arm64-darwin.macho-entry.h
  src/stub/src/arch/arm/v8a/lzma_d_cf.S
  src/stub/tmp/arm64-darwin.macho-entry.bin.dump
2016-07-27 08:27:06 -07:00
John Reiser
c7d76fb7ab Change copyright year 2013 ==> 2016 in ppc64le files.
src/stub/ppc64le-darwin.macho-fold.h
  src/stub/src/arch/ppc64le/64/bxx.S
  src/stub/src/arch/ppc64le/64/lzma_d.S
  src/stub/src/arch/ppc64le/64/macros.S
  src/stub/src/arch/ppc64le/64/nrv2b_d.S
  src/stub/src/arch/ppc64le/64/nrv2d_d.S
  src/stub/src/arch/ppc64le/64/nrv2e_d.S
  src/stub/src/ppc64le-darwin.dylib-entry.S
  src/stub/src/ppc64le-darwin.macho-entry.S
  src/stub/src/ppc64le-darwin.macho-fold.S
  src/stub/src/ppc64le-darwin.macho-main.c
  src/stub/src/ppc64le-linux.elf-entry.S
  src/stub/src/ppc64le-linux.elf-fold.S
  src/stub/src/ppc64le-linux.elf-fold.lds
  src/stub/src/ppc64le-linux.elf-main.c
  src/stub/src/ppc64le-linux.kernel.vmlinux-head.S
  src/stub/src/ppc64le-linux.kernel.vmlinux.S
2016-07-26 21:42:07 -07:00
John Reiser
ba9b86c0dc added src/stub/src/arch/arm/v8a/lzma_d_cf.S 2016-07-26 21:32:43 -07:00
John Reiser
5de83a606e Cleanup after Thierry Fauck changes for ppc64le.
We need a "UPX standard" compiler in order to re-compile the stubs for ppc64le;
meanwhile use Thierry's "pre-compiled" stubs.
Revert powerpc stubs to those produced by UPX standard powerpc.405-linux-gcc-3.4.5.
Cleanup the workarounds that Thierry used because he lacked upx-stubtools 20130920.
ARMv8 (64-bit) compiles but is incomplete and does not run yet.

 changed src/Makefile
 changed src/linker.cpp
 changed src/stub/Makefile
 changed src/stub/amd64-linux.elf-entry.h
 changed src/stub/arm64-darwin.macho-entry.h
 changed src/stub/arm64-darwin.macho-fold.h
 changed src/stub/powerpc-darwin.dylib-entry.h
 changed src/stub/powerpc-darwin.macho-entry.h
 changed src/stub/powerpc-darwin.macho-fold.h
 changed src/stub/powerpc-linux.elf-entry.h
 changed src/stub/powerpc-linux.elf-fold.h
 changed src/stub/powerpc-linux.kernel.vmlinux.h
 changed src/stub/scripts/xstrip.py
 changed src/stub/src/arch/arm/v8a/lzma_d.S
 changed src/stub/src/arch/arm/v8a/macros.S
 changed src/stub/src/arm64-darwin.macho-entry.S
 changed src/stub/tmp/arm64-darwin.macho-entry.bin.dump
2016-07-26 21:29:29 -07:00
John Reiser
01a0c8672d changeset: 2451:4e2a6c33d5fb
tag: ppc64le
user: Thierry Fauck <tfauck@free.fr>
date: Wed Jun 22 08:25:13 2016 -0400
summary: Add support for ppc64le statically linked binaries
2016-07-26 17:00:25 -07:00
John Reiser
fa522c0ffc Hacking convert v4a/lzma_d-arm.S from 32-bit to 64-bit 2016-02-14 21:26:37 -08:00
John Reiser
16241d010f PUSH+POP now in macros.S 2016-02-14 21:25:28 -08:00
John Reiser
9cb8fbf178 branch merge
branch 'default'
   changed src/pefile.cpp
   changed src/pefile.h
2016-01-31 20:11:42 -08:00
John Reiser
bd7ef27628 ARM64LE begins implementation
added src/stub/arm64-darwin.macho-entry.h
   added src/stub/arm64-darwin.macho-fold.h
   added src/stub/src/arch/arm/v8a/lzma_d.S
   added src/stub/src/arch/arm/v8a/macros.S
   added src/stub/src/arch/arm/v8a/nrv2b_d8.S
   added src/stub/src/arch/arm/v8a/nrv2d_d8.S
   added src/stub/src/arch/arm/v8a/nrv2e_d32.S
   added src/stub/src/arch/arm/v8a/nrv2e_d8.S
   added src/stub/src/arm64-darwin.macho-entry.S
   added src/stub/src/arm64-darwin.macho-fold.S
   added src/stub/src/arm64-darwin.macho-main.c
   added src/stub/src/arm64-linux.elf-entry.S
   added src/stub/src/arm64-linux.elf-fold.S
   added src/stub/tmp/arm64-darwin.macho-entry.bin.dump
   changed src/p_mach.cpp
   changed src/p_mach.h
   changed src/stub/Makefile
2016-01-31 20:09:38 -08:00
John Reiser
42e520e841 ElfLinkerArm64LE 2016-01-31 19:59:00 -08:00
John Reiser
d8f9cd237f UPX_F_MACH_ARM64EL 2016-01-31 19:58:17 -08:00
László Molnár
33065ecf04 fixed resource bounds checking when compressing; let --force override throwing an exception 2015-08-11 13:05:10 +02:00
John Reiser
718a1da262 Bounds check shstrtab in PackVmlinuxBase<T>::canPack() 2015-08-10 05:45:52 -07:00
John Reiser
b89c3ebb42 LZMA version 15.05 2015-08-03 22:36:16 -07:00
John Reiser
9d7e44feff GNU Make 4.0 does not assign to MAKEFLAGS sequentially 2015-08-03 22:35:00 -07:00
John Reiser
163e1907a4 0==.vmsize in Go-language LC_SEGMENT_64; also g++ 5.1.1 nit 2015-07-25 12:54:25 -07:00
John Reiser
53b45279ad Better diagnosis of Go-language PT_LOAD; https://sourceforge.net/p/upx/bugs/195/ 2015-07-25 07:11:57 -07:00
John Reiser
298ea1f0d3 ::unpack(): another check on b_info; uncompressed ElfXX_Ehdr must match input 2015-05-16 15:23:01 -07:00
John Reiser
1d13d8c4a0 PackMachBase::unpack() process lc_seg in same order as ::pack() 2015-05-16 15:20:03 -07:00
John Reiser
2238c99b61 another check on b_info in ::unpackExtent() 2015-05-16 15:18:28 -07:00
John Reiser
7d4dfbef2b cleanup IPTR_I_D 2015-05-15 20:56:34 -07:00
John Reiser
759827b404 EI_OSABI for EM_ARM is a real mess 2015-05-15 20:47:35 -07:00
John Reiser
fca627d1b0 ::seek() returns resulting off_t; InputFile::seek() restricts to actual _length 2015-05-15 20:44:09 -07:00
John Reiser
404da18aed IPTR_I_D: 'import' buffer is a subset of ibuf 2015-05-15 20:42:18 -07:00
John Reiser
330fca722a too large: blocksize > 1024*1024*1024 [corrupted] 2015-05-15 05:36:21 -07:00
John Reiser
8939cd120b too small: (st.st_size < 512) 2015-05-15 05:32:52 -07:00
László Molnár
63afeb7373 added a check for corrupted packheader 2015-05-14 21:48:16 +02:00
László Molnár
6ba68a6455 PE related fixes for CERT-FI 829767 2015-05-14 21:46:52 +02:00
John Reiser
1579c74302 canPack() requires 0 < nfat 2015-05-10 14:01:48 -07:00
John Reiser
373ca15c71 size < 1024 is too short 2015-05-10 14:01:08 -07:00
John Reiser
a8a3caed1c Check blocksize 2015-05-09 20:29:56 -07:00
John Reiser
cb35ba4543 At ::unpack much of decompressed Mach_header must match outer Mach_header 2015-05-09 20:14:32 -07:00
John Reiser
cdd152d015 Detect (int)blocksize < 0 2015-05-09 20:13:30 -07:00
John Reiser
83ce7dc62f Must not compare orig_file_size with fi->st_size() during ::unpack 2015-05-09 17:47:17 -07:00
John Reiser
b182b50f24 Distinguish corruption of p_info, b_info 2015-05-09 10:13:13 -07:00
John Reiser
71a9941b84 Check getImageSize(). CERT-FI 829767
id:000058,sig:06,src:000001,op:havoc,rep:64
2015-05-09 07:29:26 -07:00
John Reiser
c777da263e Check blocksize. CERT-FI 829767
id:000053,sig:06,src:000000,op:arith8,pos:10440,val:+20
2015-05-09 07:25:25 -07:00
John Reiser
2cb7b56a41 Check ph.c_len; CERT-FI 829767
id:000023,sig:06,src:000000,op:flip2,pos:10440
2015-05-09 07:18:54 -07:00
John Reiser
52f9ef14b9 Check ph.c_len; CERT-FI 829767
id:000010,sig:06,src:000000,op:flip1,pos:11584
2015-05-09 07:13:47 -07:00
John Reiser
8d6c594240 Check ph.c_len; CERT-FI 829767
id:000008,sig:06,src:000000,op:flip1,pos:205
2015-05-09 07:05:17 -07:00
John Reiser
7ad77ff540 Check blocksize. CERT-FI 829767
id:000005,sig:06,src:000000,op:havoc,rep:16
2015-05-09 06:56:32 -07:00
John Reiser
acede72e9b Check ph.c_len. CERT-FI 829767
id:000002,sig:06,src:000000,op:havoc,rep:1
2015-05-09 06:49:45 -07:00
John Reiser
771fd732d1 Check e_phentsize; CERT-FI 829767
id:000064,sig:06,sync:upx-macho-crash-2,src:000096
2015-05-09 05:31:36 -07:00
John Reiser
2a79a69f59 PackUnix::unpack() is non-Elf. CERT-FI 829767
id:000057,sig:11,sync:upx-macho-crash-2,src:000108
id:000058,sig:11,sync:upx-macho-crash-2,src:000107
id:000059,sig:06,sync:upx-macho-crash-2,src:000106
id:000060,sig:06,sync:upx-macho-crash-2,src:000103
2015-05-09 05:14:12 -07:00
John Reiser
8c0321697f Check PackHeader before decompress; CERT-FI id:000002,sig:06,src:000000,op:flip1,pos:4629 2015-05-08 20:13:44 -07:00
John Reiser
0151b3f9b3 Validate Mach_segment_command.cmdsize; CERT-FI id:000000,sig:11,src:000000,op:havoc,rep:2 2015-05-08 19:45:05 -07:00
John Reiser
82a51f35ea Validate header CERT_FI id:000000,sig:11,src:000000,op:flip1,pos:1 2015-05-08 19:22:24 -07:00
John Reiser
35944cbfc1 Validate fat_head; CERT-FI id:000000,sig:06,src:000000,op:flip1,pos:7 2015-05-08 18:32:42 -07:00
John Reiser
f0aef9b28b Check input data; CERT-FI upx-crashes-elf id:000000,sig:11,src:000000,op:flip1,pos:0 2015-05-08 17:04:16 -07:00
John Reiser
ae37c3902c Apple codesign requires a different secTEXT.size 2015-03-27 20:41:00 -07:00
John Reiser
d612585582 C/7zTypes.h #if (WITH_LZMA >= 0x938) 2015-03-15 10:30:55 -07:00
John Reiser
7ca14d209c Use upx_uint64_t instead of "unsigned long". 2015-01-10 12:26:35 -08:00
Markus F.X.J. Oberhumer
c37f582c10 Merge. 2015-01-04 11:11:05 +01:00
John Reiser
6272fb3822 ARM --lzma && is_big: stub mmap must allow for cpr0.sz_unc [How did this ever work before?] 2015-01-02 17:36:26 -08:00
Markus F.X.J. Oberhumer
2582fbac59 Update src/Makefile to use more conservative gcc optimization settings. 2015-01-03 01:55:51 +01:00
Markus F.X.J. Oberhumer
5abb578e47 p_djgpp2.{cpp,h}: remove usage of "long". 2015-01-03 01:12:46 +01:00
Markus F.X.J. Oberhumer
015ebf89a5 lefile.h: remove usage of "long". 2015-01-03 01:04:41 +01:00
Markus F.X.J. Oberhumer
c6724968f1 pefile.cpp: work around a gcc-3.4 limitation. 2015-01-03 00:40:28 +01:00
Markus F.X.J. Oberhumer
9fa1772ae4 Merge. 2015-01-03 00:34:42 +01:00
Markus F.X.J. Oberhumer
4551937812 Bump version year. 2015-01-03 00:26:48 +01:00
John Reiser
51ee664cae PackLinuxElf32help1 refuses if e_ident[EI_DATA] mismatches bele policy 2015-01-02 15:25:29 -08:00
Markus F.X.J. Oberhumer
fb611a98f9 Welcome 2015. 2015-01-03 00:24:07 +01:00
Markus F.X.J. Oberhumer
a3d5face38 Fix a comment. 2015-01-03 00:21:51 +01:00
László Molnár
424cd497d3 pe64: saved a few bytes in the nrv decompressors 2014-03-18 23:35:30 +01:00
László Molnár
6520f2061e arm/pe: thumb mode stub hopefully fixed 2014-03-10 21:44:23 +01:00
László Molnár
5d93f86b4b armpe_tester: better import handling 2014-03-10 21:42:11 +01:00
László Molnár
b3f63ce7ae pe: fix a bug in pack0() for arm 2014-03-09 23:55:28 +01:00
László Molnár
56de770682 armpe_tester now works on android 2014-03-09 23:42:41 +01:00
László Molnár
940341bc9d arm/pe: import handling updates (untested) 2014-03-08 18:59:26 +01:00
László Molnár
804a0ce601 merge 2014-03-06 22:38:15 +01:00
László Molnár
41054a4c56 handle duplicates in ImportLinker 2014-03-06 22:26:41 +01:00
László Molnár
7b8e5d4180 pe: remove some dead code 2014-03-05 23:59:53 +01:00
László Molnár
ca2369f1c1 pe: win32/win64 pack/unpack seems to work again 2014-03-05 23:40:24 +01:00
László Molnár
129cb0b3cd pe: packing of pe64 starts to work again 2014-03-04 23:51:59 +01:00
László Molnár
632b2ae1ba pe: pack() logic moved to PeFile 2014-03-02 22:34:52 +01:00
László Molnár
18e55061e1 pepfile.* disabled; PeFile64 class introduced 2014-02-20 00:10:18 +01:00
László Molnár
e49b65723f pe: canUnpack moved to PeFile 2014-02-19 23:27:41 +01:00
László Molnár
8e52894763 pe: loadconf handling moved to PeFile 2014-02-19 21:45:24 +01:00
László Molnár
07cba6c774 pe32: tls refactoring 2014-02-18 00:23:42 +01:00
László Molnár
9cb639b505 pe32: refactoring of import handling and unpacking continues 2014-02-16 23:04:39 +01:00
John Reiser
c0f692792f 2014 2014-01-10 19:23:41 -08:00
John Reiser
bd77e0945b more LC_* constants 2014-01-10 19:22:30 -08:00
Markus F.X.J. Oberhumer
f0eb171b2a Strip trailing whitespace. 2014-01-07 23:09:11 +01:00
Markus F.X.J. Oberhumer
fb93662b5c Bump version for next release. 2014-01-07 23:08:00 +01:00
Markus F.X.J. Oberhumer
a26c982e93 Welcome 2014. 2014-01-07 23:05:10 +01:00
Markus F.X.J. Oberhumer
7db3e98944 Small cleanups. 2014-01-07 23:03:16 +01:00
Markus F.X.J. Oberhumer
4a87834e04 New ACC version. 2014-01-07 19:15:57 +00:00
Markus F.X.J. Oberhumer
bf6ecaeeb9 stub: minor cosmetic cleanups. 2013-12-02 19:37:28 +01:00
Markus F.X.J. Oberhumer
f70ef86dfa help.cpp: add a missing con_fg() call. 2013-12-02 19:23:06 +01:00
John Reiser
cd3132667a ARM shlib escape hatch moves to just beyond .text.
https://sourceforge.net/p/upx/bugs/223/
2013-11-22 19:26:19 -08:00
John Reiser
1c459a7bea Sync stubs. 2013-11-16 14:29:52 -08:00
John Reiser
4f0bfeab4c Round down unfilter length to a multiple of 4.
https://sourceforge.net/p/upx/bugs/223
2013-11-16 14:28:59 -08:00
John Reiser
c5c9921b59 Unpack detects is_shlib more robustly. Dispute .e_shoff. 2013-11-16 14:25:53 -08:00
John Reiser
6b63aba1fc Disable jni_onload_* 2013-11-09 16:06:41 -08:00
John Reiser
382331fb11 e_phoff and e_shoff are 32/64 specific 2013-10-28 07:11:40 -07:00
John Reiser
caf9af7ae4 JNI_OnLoad is a pre-DT_INIT in a shared library. 2013-10-26 09:51:25 -07:00
John Reiser
45d2adeb9c Android < 4.1 (kernel < 3.0.31) often has PT_INTERP of /system/bin/linker
with bad PT_LOAD[0].  https://sourceforge.net/p/upx/bugs/221
2013-10-21 07:27:53 -07:00
László Molnár
96708d7592 ImportLinker copied into PeFile 2013-10-12 16:48:56 +02:00
John Reiser
13090d1219 ARM close /proc/self/exe after mmap 2013-10-06 19:56:14 -07:00
László Molnár
8ab229cca9 pe: refactoring started 2013-10-06 22:57:20 +02:00
John Reiser
583cd078dc ARM elf-fold: preserve /proc/self/exe by mmap of one page into stack 2013-10-06 13:22:05 -07:00
László Molnár
aa2ac1bbb8 pe: ImportLinker introduced 2013-10-04 22:48:21 +02:00
Markus F.X.J. Oberhumer
6766b14415 Prepare release. 2013-09-30 14:21:37 +02:00
John Reiser
9d0f9e967f Avoid stmdb with write-back register in stored list,
even when stored value is don't care.
2013-09-21 09:52:21 -07:00
John Reiser
d7609088e5 Silence "warning: cannot find entry symbol _start" 2013-09-21 08:39:15 -07:00
Markus F.X.J. Oberhumer
b2643b6926 Start using the new intergral type names. 2013-09-20 08:19:18 +02:00
Markus F.X.J. Oberhumer
07b65ca069 Introduce integral type names using <stdint.h> terminology like "upx_uint64_t". 2013-09-20 08:16:37 +02:00
Markus F.X.J. Oberhumer
25727f7f99 Minor portability fixes. 2013-09-20 07:48:29 +02:00
Markus F.X.J. Oberhumer
880ae89307 Bump version and tentative release date. 2013-09-20 07:19:06 +02:00
Markus F.X.J. Oberhumer
1496df1989 New ACC version. 2013-09-20 07:09:35 +02:00
Markus F.X.J. Oberhumer
7d8ae6b4b1 Make amd64-win64.pep.S compile with current upx stubtools. 2013-09-20 07:08:09 +02:00
Markus F.X.J. Oberhumer
312d4cccaf stub: start using stubtools bin-upx-20130920. 2013-09-20 06:59:27 +02:00
Markus F.X.J. Oberhumer
ce5f9f95ea stub: fix i386 syntax for current gas versions, and add some explicit
alignments at the end of the file so that we do not depend on gas defaults.
2013-09-20 06:15:46 +02:00
Markus F.X.J. Oberhumer
d9bf8a76d9 Protect against changes from future gas versions in amd64-linux.elf-entry.S. 2013-09-20 05:22:05 +02:00
Markus F.X.J. Oberhumer
f7a35fb9fe stub: save 1 byte in amd64-darwin.{dylib,macho}-entry.S. 2013-09-20 04:20:23 +02:00
Markus F.X.J. Oberhumer
3ba691ded5 Remove trailing whitespace. 2013-09-20 03:25:59 +02:00
Markus F.X.J. Oberhumer
7a7277d56f Use correct "movzwl" opcode in src/stub/src/arch/i386/macros.S. 2013-09-20 03:18:19 +02:00
László Molnár
76be5dd1d3 linker: Section::offset should be u64 2013-09-01 21:38:44 +02:00
László Molnár
53dc63f3bc linker: a small 64-bit relocation support related fix 2013-09-01 11:15:30 +02:00
László Molnár
80da0bc9d5 pepfile: infoWarning about unsupported relocation types fixed 2013-08-28 22:33:39 +02:00
László Molnár
bce7af4e11 fixed 8 bit range checking in ElfLinkerAMD64::relocate1 2013-08-28 22:31:40 +02:00
László Molnár
9da09b51ed win64/pe: tls callback assembly improvements + misc cleanups 2013-08-28 21:53:23 +02:00
László Molnár
86392f197f win64/pe: lzma support added 2013-08-28 00:24:54 +02:00
László Molnár
1c13046297 win64/pe: added nrv2b and nrv2d support 2013-08-27 22:06:52 +02:00
László Molnár
fbc756b531 win64/pe: filter support added 2013-08-27 21:22:21 +02:00
László Molnár
6c64b06453 win64/pe: uncompression seems to work; tls handling improvement 2013-08-26 22:07:55 +02:00
László Molnár
241834029a 64 relocation handling added; basic DLL support works 2013-08-25 23:54:13 +02:00
László Molnár
5b8a9c0b47 basic win64 PE support added 2013-08-22 22:01:09 +02:00
László Molnár
037c29d24a added full support for 64-bit relocations 2013-08-22 21:43:11 +02:00
László Molnár
893f26ac9a fix wcle fixup unpacking segfault (sf.net bug 220) 2013-08-19 13:39:44 +02:00
John Reiser
d43f8e3100 Alignment bug in test or decompress of shared library;
sourceforge.net/p/upx/bugs/218/
2013-07-06 13:50:15 -07:00
John Reiser
2b42acf7b8 ARM heuristic dcache flush by sweeping 1/2 MB 2013-06-10 14:20:59 -07:00
John Reiser
f65b80ed42 ARM remember readlink("/proc/self/exe",) as environment variable " =" (3 spaces) 2013-06-09 20:33:59 -07:00
John Reiser
e84abbdc82 ARM __clear_cache() has bugs
Linux hostname 3.0.8-482645-user #1 SMP PREEMPT Mon Apr 30 19:43:45 KST 2012 armv7l GNU/Linux
  Processor	: ARMv7 Processor rev 3 (v7l)

  processor	: 0
  BogoMIPS	: 597.12

  processor	: 1
  BogoMIPS	: 597.12

  CPU implementer	: 0x41
  CPU architecture: 7
  CPU variant	: 0x1
  CPU part	: 0xc09
  CPU revision	: 3

  Hardware	: Espresso10
  Revision	: 000a
2013-06-09 13:03:06 -07:00
John Reiser
66269eabe9 ARM Try a hole so that kernel does not extend brk(0) 2013-06-08 08:39:08 -07:00
John Reiser
36c0928483 ARM __clear_cache() on escape hatch; http://sourceforge.net/p/upx/bugs/214/ 2013-06-07 07:08:03 -07:00
John Reiser
9237e15adc Fix ARM compress shared library. 2013-05-10 16:20:52 -07:00
Markus F.X.J. Oberhumer
0d3a2072b2 Add some more sanity checks in pefile.cpp. 2013-04-04 14:30:52 +02:00
Markus F.X.J. Oberhumer
aa2ee5dfc2 New ACC version. 2013-03-20 16:48:27 +00:00
John Reiser
b515fa39ec Apple codesign follies: need more flags 2013-03-07 19:47:44 -08:00
Markus F.X.J. Oberhumer
76e3f4eb92 Post-release version bump. 2013-02-20 13:50:12 +01:00
Markus F.X.J. Oberhumer
7082594bbc Prepare release. 2013-02-18 11:03:33 +01:00
Markus F.X.J. Oberhumer
36dd35f238 Silence some compilation warnings. 2013-02-18 11:01:30 +01:00
John Reiser
9c9fb6a485 DEBUG-only bug in decimal() 2013-02-15 16:35:45 -08:00
John Reiser
5438a4837b more AT_PHDR trouble 2013-02-15 16:32:51 -08:00
Markus F.X.J. Oberhumer
84996e8cb6 Bump tentative release date. 2013-02-12 10:32:11 +01:00
Markus F.X.J. Oberhumer
87a368a857 Welcome 2013. 2013-02-12 10:14:03 +01:00
Markus F.X.J. Oberhumer
21412d93dd New ACC version. 2013-02-12 08:16:44 +00:00
John Reiser
0b11ff22b4 internal documentation: pointer to source for Apple codesign 2013-02-03 11:27:02 -08:00
John Reiser
8fafa78796 sync stubs 2013-01-31 12:33:16 -08:00
John Reiser
c43158f8a2 find PT_LOAD in case ARM PT_EXIDX is first 2013-01-31 12:21:51 -08:00
John Reiser
92ad524947 clear registers at user entry (paranoia) 2013-01-31 12:20:42 -08:00
John Reiser
b362a61863 fix for user brk() on ARM with static linking 2013-01-31 12:19:35 -08:00
John Reiser
468fec38d7 Fix .e_ident[EI_OSABI] for Debian armhf. 2013-01-30 13:31:35 -08:00
John Reiser
89830a5ae0 Mac OS X codesign disallows overhang of vmsize. 2013-01-25 15:58:25 -08:00
John Reiser
5977c296bd Fix codesign for Mac OS X. 2013-01-24 15:28:21 -08:00
Markus F.X.J. Oberhumer
25d706a913 Whitespace cleanup. 2012-10-31 15:50:52 +01:00
John Reiser
048236aaaa Isolate change to p_mach.cpp of previous revision
(p_lx_elf.cpp and p_lx_elf.h were included by mistake.)
2012-10-10 08:58:15 -07:00
John Reiser
d442c58fd1 MachO no longer needs contiguous LC_SEGMENT (SourceForge bug 3308161) 2012-10-10 08:51:52 -07:00
John Reiser
f890f6bb09 ignore another .vmsize==0; fix unfold which needs another page 2012-08-23 14:26:42 -07:00
John Reiser
036d466790 allow 3-byte decompressor overrun; fix DEBUG decimal(); unify with i386 2012-08-23 14:25:32 -07:00
John Reiser
dee47ba2d8 implement DEBUG 2012-08-23 14:22:55 -07:00
John Reiser
be96c28b77 fix DEBUG decimal() of negative number 2012-08-23 12:37:44 -07:00
John Reiser
ad1c0f578e fix DEBUG decimal() of negative number 2012-08-23 07:31:30 -07:00
John Reiser
c8f7b1b72c MacOSX launcher gets SIGBUS when it cannot find mapped Mach_header.
Add segZERO, segMHDR, secMHDR.
2012-08-22 20:46:35 -07:00
John Reiser
c89702ae84 skip 0==.vmsize; also DEBUG, DPRINTF 2012-08-22 20:43:00 -07:00
John Reiser
2d29a82250 PackMachBase<T>::pack1() segTEXT.vmaddr must ignore zero-length segments 2012-08-20 20:02:26 -07:00
John Reiser
b36c65e654 fix Mac OS X code signing; also leave room for LC_UUID 2012-08-04 16:44:21 -07:00
John Reiser
09b072b908 Leave space for code signing on Mac OS X. 2012-08-03 13:28:33 -07:00
John Reiser
0ae9fee350 Mach_linkedit_data_command 2012-08-03 13:20:00 -07:00
John Reiser
1579182ed9 PackUnix::canUnpack() allows zero-filled last page 2012-08-03 13:19:28 -07:00
John Reiser
074671aa71 ::unpack "if (fo)"; also "delete []" (SourceForge bug 3545609) 2012-07-19 20:11:44 -07:00
John Reiser
36b7c47247 __DWARF LC_SEGMENT_64 with .vmsize==0 (SourceForge bug 3308161) 2012-07-18 15:37:41 -07:00
John Reiser
8a5d352733 Portability: fix "EOFException: premature end of file" doing ELF on Windows.
OutputFile::read() was bad news; fsync() should work, but was missing.
2012-07-12 14:25:28 -07:00
John Reiser
f383629282 compressWithFilters(..., inhibit_compression_check=0) // SourceForge bug 3541020
Not good to check compression ratio on every block when blocksize < file_size,
as when --force_execve of Elf > 0x80000 bytes.
2012-07-12 07:04:56 -07:00
John Reiser
a6d717cb04 big endian, too: ARM Linux EABI version 4 and 5 is a mess 2012-07-07 07:45:51 -07:00
Markus F.X.J. Oberhumer
84a5753301 New ACC version. 2012-05-31 16:08:14 +00:00
Markus F.X.J. Oberhumer
5d2d9c7e81 Update .hgignore. Update valgrind macros. 2012-04-26 09:05:35 +02:00
Markus F.X.J. Oberhumer
82801d1411 Fix some typos in documentation and comments. 2012-03-27 02:14:03 +02:00
John Reiser
340c3963d8 MIPS mmap_privanon in .S in case gcc learns how to 'bal'. 2012-03-14 08:24:04 -07:00
John Reiser
ef15cf9847 merge 2012-03-13 19:56:30 -07:00
John Reiser
4d613ccfa7 MIPS mmap_privanon() forgot to set syscall number; also gcc __asm__() problems.
[Sourceforge upx-Bugs-3503753]
2012-03-13 19:54:47 -07:00
Markus F.X.J. Oberhumer
43ce34d547 Welcome 2012. 2012-01-01 22:35:11 +01:00
Markus F.X.J. Oberhumer
eda074cd80 New ACC version. 2012-01-01 21:18:43 +00:00
Markus F.X.J. Oberhumer
a38721db93 Remove meaningless "const" from casts. 2011-12-14 06:05:41 +01:00
Markus F.X.J. Oberhumer
a06e811717 Remove extra semicolons. 2011-12-14 06:05:08 +01:00
Markus F.X.J. Oberhumer
86e534ff75 Remove trailing whitespace. Remove hard tabs. 2011-12-14 06:03:08 +01:00
John Reiser
640d5b2dec Option --preserve-build-id for Gnu ELF; contributed by Nicholas Twerdochlib
(SourceForge [ upx-Patches-3413335 ])
2011-12-13 17:26:03 -08:00
Markus F.X.J. Oberhumer
cf28306997 Post-release version bump. 2011-12-13 01:30:00 +01:00
Markus F.X.J. Oberhumer
fed3ed9f9a Prepare release. 2011-12-12 11:55:45 +01:00
Markus F.X.J. Oberhumer
260138ba11 Silence some compilation warnings. 2011-12-12 11:30:02 +01:00
John Reiser
d4a22c7851 Sync stub for amd64-darwin.macho-entry. 2011-12-06 07:03:53 -08:00
John Reiser
06cf986490 overlap unfolded stub on Mach-O amd64 [SourceForge upx-Bugs-3447184] 2011-12-02 22:01:13 -08:00
John Reiser
adf9aa04ce overlap unfolded stub on Mach-O i386 [SourceForge upx-Bugs-3447184] 2011-12-02 20:51:13 -08:00
John Reiser
69f66fbe52 rebuild using broader dependencies of previous commit 2011-11-23 13:25:25 -08:00
John Reiser
d061005c89 propagate dependency on i386-linux.elf-main.c by hand 2011-11-23 13:23:11 -08:00
John Reiser
f6ee8b9f04 MSVC++ disallows zero-length array in struct 2011-11-23 13:05:00 -08:00
John Reiser
31af22c2ff ARM_is_QNX looks for PT_INTERP containing "ldqnx" 2011-10-16 15:04:18 -07:00
John Reiser
c421e3f243 ARM stub: fix editing mistake 2011-10-16 13:40:21 -07:00
John Reiser
6e92902407 ARM_is_QNX() heuristic 2011-10-16 13:11:03 -07:00
John Reiser
6256381dc3 mmap_privanon() in stub for arm,i386,mips eases QNX 2011-10-16 11:39:46 -07:00
John Reiser
b247b051ea QNX on armel (experimental) 2011-10-15 19:49:37 -07:00
Markus F.X.J. Oberhumer
afbd553622 Silence some compilation warnings. 2011-08-30 03:40:53 +02:00
John Reiser
36bc14e884 fix PackMachFat::unpack for test mode ("-t"): fo==NULL 2011-07-11 14:37:40 -07:00
John Reiser
9c5d0ff2ff PeFile::processRelocs() defends itself against corrupt PE header 2011-06-08 10:06:42 -07:00
John Reiser
cfa6c8ddf6 Fix ::pack3 for shared library. 2011-06-06 20:00:43 -07:00
John Reiser
21924bf022 move stub escape hatch for shared library to end of .text [glibc-2.13.90] 2011-06-02 07:18:50 -07:00
John Reiser
eea33f6019 Document copy ONLY for old_dtinit, .e_shoff in compressed shared library. 2011-05-31 11:01:40 -07:00
John Reiser
66d48ae808 MH_BUNDLE enum 2011-05-30 07:22:31 -07:00