Compare commits

...

107 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer d7ba31cab8 Bump release date. 2020-01-22 22:29:58 +01:00
John Reiser 342b1b7d6c EM_PPC64 forgot get_te16(&...) for ehdri.e_machine
So compression on big-endian host was not correct.
https://github.com/upx/upx/issues/334
	modified:   p_lx_elf.cpp
2020-01-19 18:48:50 -08:00
John Reiser 936013f60c Decompression escape hatch for ELF can require a new page.
If not enough room on last page of .text, and ElfXX_Ehdr not PF_X,
then the escape hatch must use a new page.
https://github.com/upx/upx/issues/308
	modified:   ../.github/travis_testsuite_1-expected_sha256sums.sh
	modified:   stub/src/amd64-linux.elf-main.c
	modified:   stub/src/i386-linux.elf-main.c
    Plus stub/*-linux.elf-fold.h and stub/tmp/*-linux.elf-fold.map
2020-01-19 13:25:55 -08:00
Markus F.X.J. Oberhumer fdf2eddc73 Update Travis. 2020-01-16 13:38:30 +01:00
Markus F.X.J. Oberhumer 4409753014 Update Travis. 2020-01-16 01:54:41 +01:00
Markus F.X.J. Oberhumer 9172ae3d19 New ACC version. 2020-01-16 01:53:55 +01:00
John Reiser e2f60adc95 Detect 0==DT_SYMTAB in invert_pt_dynamic()
https://github.com/upx/upx/issues/333
	modified:   p_lx_elf.cpp
2020-01-14 18:45:52 -08:00
John Reiser 1bb93d4fce Detect bad e_shstrtab better.
https://github.com/upx/upx/issues/332
	modified:   p_lx_elf.cpp
2020-01-13 17:26:31 -08:00
John Reiser eb90eab632 Detect bogus DT_SYMENT.
https://github.com/upx/upx/issues/331
	modified:   p_lx_elf.cpp
2020-01-13 17:10:02 -08:00
Markus F.X.J. Oberhumer 0f4975fd7f Update Travis. 2020-01-08 17:30:03 +01:00
Markus F.X.J. Oberhumer b5b1f06a11 Avoid some compilation warnings. 2020-01-08 06:04:21 +01:00
Markus F.X.J. Oberhumer 86f8eb0930 Fix shadowing global symbols. 2020-01-08 05:44:06 +01:00
Markus F.X.J. Oberhumer 91ad0e7572 Revert "Cleanup legacy symbols: basename, index"
This reverts commit 47ddace96a.
2020-01-08 05:41:56 +01:00
Markus F.X.J. Oberhumer b034ee98fe Revert "Mention --assume-execute-permission"
This reverts commit 29fa358077.
2020-01-08 05:40:40 +01:00
Markus F.X.J. Oberhumer ded07f8781 Revert "MSVC lacks S_IXUSR"
This reverts commit 62a07df45e.
2020-01-08 05:38:44 +01:00
Markus F.X.J. Oberhumer 849bdd87e1 Revert "Option --assume-execute-permission"
This reverts commit 4484acf9d6.
2020-01-08 05:38:19 +01:00
Markus F.X.J. Oberhumer 643e48efd7 Update Travis. 2020-01-08 05:18:43 +01:00
Markus F.X.J. Oberhumer 92f072cf70 Silence some compiler warnings. 2020-01-08 04:49:27 +01:00
Markus F.X.J. Oberhumer 95bf2e2e41 Update testsuite checksums caused by version date bump. 2020-01-08 04:37:59 +01:00
Markus F.X.J. Oberhumer 6a6c6d84eb Rebuild stubs. 2020-01-08 04:30:08 +01:00
Markus F.X.J. Oberhumer 08a689c81e Bump tentative release date. 2020-01-08 04:21:30 +01:00
Markus F.X.J. Oberhumer d1174385ef Welcome 2020. 2020-01-08 04:13:28 +01:00
John Reiser cb5f590e10 More hacking Android shlib.
https://github.com/upx/upx/issues/318
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2019-12-12 20:23:33 -08:00
John Reiser 5ed9c66ed9 Hack Android shared libraries on arm64.
https://github.com/upx/upx/issues/318
	modified:   p_lx_elf.cpp
2019-12-12 17:05:50 -08:00
John Reiser b8f52d14f4 user_init_va on AARCH64
https://github.com/upx/upx/issues/318  (work-in-progress)
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2019-12-04 14:26:46 -08:00
John Reiser 5d295c24f0 DT_NEEDED can be duplicated
modified:   p_lx_elf.cpp
2019-11-26 19:33:27 -08:00
John Reiser 8be9da8280 Avoid bogus values in PT_DYNAMIC segment.
Detect duplicate DT_*.
Detect out-of-bounds hashtab and gashtab.
Detect missing DT_REL, DT_RELA.
Detect out-of-bounds d_val.
https://github.com/upx/upx/issues/317
	modified:   p_lx_elf.cpp
2019-11-23 20:06:14 -08:00
John Reiser 819c33fee2 Detect malformed Mach-o file in ::canUnpack()
https://github.com/upx/upx/issues/314
https://github.com/upx/upx/issues/315
	modified:   p_mach.cpp
2019-11-15 21:32:06 -08:00
John Reiser 75a2cc4ecb Sync testsuite (amd64, 32-bit ARM, 64-bit ARM)
modified:   ../.github/travis_testsuite_1-expected_sha256sums.sh
	modified:   Makefile
2019-10-27 21:56:30 -07:00
John Reiser e2833cf303 Message when /proc/self/exe lacks Read permission
Done: amd64, 32-bit ARM, 64-bit ARM.  TODO: mips, PowerpC
https://github.com/upx/upx/issues/302
	modified:   stub/amd64-linux.elf-entry.h
	modified:   stub/arm.v4a-linux.elf-entry.h
	modified:   stub/arm.v5a-linux.elf-entry.h
	modified:   stub/arm64-linux.elf-entry.h
	modified:   stub/armeb.v4a-linux.elf-entry.h
	modified:   stub/src/amd64-linux.elf-entry.S
	modified:   stub/src/arm.v4a-linux.elf-entry.S
	modified:   stub/src/arm64-linux.elf-entry.S
	modified:   stub/src/arm64-linux.elf-fold.S
	modified:   stub/tmp/amd64-linux.elf-entry.bin.dump
	modified:   stub/tmp/arm.v4a-linux.elf-entry.bin.dump
	modified:   stub/tmp/arm.v5a-linux.elf-entry.bin.dump
	modified:   stub/tmp/arm64-linux.elf-entry.bin.dump
	modified:   stub/tmp/armeb.v4a-linux.elf-entry.bin.dump
2019-10-27 21:30:41 -07:00
John Reiser 801de73dbe random assembler?
modified:   ../stub/arm64-linux.elf-entry.h
2019-10-27 21:15:15 -07:00
John Reiser 6a53c0b3d4 [Append to previous commit message.]
https://github.com/upx/upx/issues/286
	modified:   p_vmlinx.cpp
2019-07-21 10:51:59 -07:00
John Reiser 58b122d97d Better checking for malformed input
https://github.com/upx/upx/issues
	modified:   p_vmlinx.cpp
2019-07-21 10:48:50 -07:00
John Reiser 276b748aa6 Ignore malformed ElfXX_Shdr in search for .text or .note
https://github.com/upx/upx/issues/287
	modified:   p_vmlinx.cpp
2019-07-21 07:40:21 -07:00
John Reiser 23570097cf MSVC barfs on {unsigned == long int) [because sizeof() is the same!]
https://github.com/upx/upx/issues/283
	modified:   p_lx_elf.cpp
2019-07-14 13:39:09 -07:00
John Reiser 62a07df45e MSVC lacks S_IXUSR
modified:   p_unix.cpp
2019-07-14 13:38:51 -07:00
John Reiser 593a69ce25 PT_LOAD[0] with ElfXX.Ehdr only
https://github.com/upx/upx/issues/283
	modified:   p_lx_elf.cpp
2019-07-14 13:08:56 -07:00
John Reiser c33603e324 'bound' register was clobbered
modified:   stub/src/arch/arm64/v8/lzma_d-arm.S
2019-07-14 13:05:52 -07:00
John Reiser 29fa358077 Mention --assume-execute-permission
for MSYS2 and other permission-poor OS.
	modified:   NEWS
2019-05-10 07:03:51 -07:00
John Reiser 49766388bc Fix compression and de-compression of Android shared libraries
Handle relocation (and DT_INIT_ARRAY[0]==NULL) when !DT_INIT.
Warn about missing --android-shlib if (ET_DYN && !DF_1_PIE && Arm*).
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
https://github.com/upx/upx/issues/265
https://github.com/upx/upx/issues/262
https://github.com/upx/upx/issues/259
https://github.com/upx/upx/issues/243
https://github.com/upx/upx/issues/229
https://github.com/upx/upx/issues/220
2019-04-14 19:59:08 -07:00
John Reiser f23267bddd Fix rotate+lop of PT_INTERP in shared library
Found while working on https://github.com/upx/upx/issues/262
but probably does not help that bug.
	modified:   p_lx_elf.cpp
2019-04-01 21:35:53 -07:00
John Reiser 4484acf9d6 Option --assume-execute-permission
modified:   main.cpp
	modified:   options.h
	modified:   p_unix.cpp
https://github.com/upx/upx/issues/256
2019-03-31 10:25:06 -07:00
John Reiser 47ddace96a Cleanup legacy symbols: basename, index
modified:   conf.h
https://github.com/upx/upx/issues/257
2019-03-31 10:12:41 -07:00
John Reiser 8aadbcd786 Enable standalone compiling, to investigate size of compiled code
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/nrv2b_d32.S
	modified:   stub/src/arch/arm64/v8/nrv2d_d32.S
	modified:   stub/src/arch/arm64/v8/nrv2e_d32.S
2019-03-03 14:27:33 -08:00
John Reiser 517bc9db0b PR_SET_MM (previous commit had typo) is from 7 years ago: 2012
modified:   stub/src/include/linux.h
2019-03-03 14:26:20 -08:00
John Reiser 16bfa7b846 PT_SET_MM since 2012
modified:   stub/src/include/linux.h
2019-03-02 16:12:14 -08:00
John Reiser 570b2d0e88 arm64-linux.elf changed when PT_LOAD[1] no longer forces 4KB alignment
modified:   travis_testsuite_1-expected_sha256sums.sh
2019-03-02 16:10:37 -08:00
John Reiser 2653a0749a de-tabify
modified:   stub/src/arch/i386/bxx.S
2019-03-02 15:48:44 -08:00
John Reiser 3de0008543 i386-darwin.macho re-implementation, especially for MacOS <= 10.8.x (Mountain Lion)
[i386 will not be supported by new MacOS beginning fall 2019.]
https://github.com/upx/upx/issues/246
	modified:   p_mach.cpp
	modified:   stub/i386-darwin.macho-entry.h
	modified:   stub/i386-darwin.macho-fold.h
	modified:   stub/i386-darwin.macho-upxmain.exe
	modified:   stub/i386-darwin.macho-upxmain.h
	new file:   stub/src/arch/i386/bxx.S
	new file:   stub/src/arch/i386/nrv2b_d32-easy.S
	new file:   stub/src/arch/i386/nrv2d_d32-easy.S
	new file:   stub/src/arch/i386/nrv2e_d32-easy.S
	modified:   stub/src/i386-darwin.macho-entry.S
	modified:   stub/src/i386-darwin.macho-fold.S
	modified:   stub/src/i386-darwin.macho-main.c
	modified:   stub/src/i386-darwin.macho-upxmain.c
	modified:   stub/tmp/i386-darwin.macho-entry.bin.dump
	modified:   stub/tmp/i386-darwin.macho-fold.map
2019-03-02 15:39:30 -08:00
John Reiser d4e2d7e8a8 arm64 (aarch64) and PAGE_SIZE > 4KiB
Future: use prctl(PR_SET_MM, PR_SET_MM_START_BRK, addr)
https://github.com/upx/upx/issues/254
	modified:   p_lx_elf.cpp
	modified:   stub/src/amd64-linux.elf-main.c
2019-03-01 20:31:41 -08:00
John Reiser a9c08c6f52 __MSYS2__ acts like UNIX but cannot handle --x permission
https://github.com/upx/upx/issues/256
	modified:   p_unix.cpp
2019-03-01 16:46:49 -08:00
Markus F.X.J. Oberhumer c2aa5c35f7 Silence a gcc-4.6 compiler warning. 2019-02-25 13:41:54 +01:00
John Reiser 423f1a8758 pack4() "__TEXT".nsects can differ from prototype to actual
modified:   p_mach.cpp
2019-02-18 14:41:43 -08:00
Markus F.X.J. Oberhumer cc5f684e33 Update testsuite checksums caused by version date bump. 2019-02-15 11:14:18 +01:00
Markus F.X.J. Oberhumer b6646d319a Bump tentative release date. 2019-02-15 11:12:07 +01:00
Markus F.X.J. Oberhumer 3667fa4e44 Welcome 2019. 2019-02-15 11:04:09 +01:00
John Reiser d1c80154f6 SHT_NOTE with ~SHF_ALLOC; as for 'gold' linker version
https://github.com/upx/upx/issues/243
	modified:   p_lx_elf.cpp
2019-02-12 21:13:24 -08:00
John Reiser 3c2bfc742e g++ -Wsign-compare is not as picky as MSVC warning C4018: '<': signed/unsigned mismatch
https://github.com/upx/upx/issues/247
	modified:   p_lx_elf.cpp
2019-02-09 08:04:58 -08:00
John Reiser d60fef753f check_pt_load(); u32_t, u64_t; (off_t) is not unsigned!
https://github.com/upx/upx/issues/247
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2019-02-01 19:31:57 -08:00
John Reiser 70ed2d0d03 Allow Load Configuration directory > 256, with info().
https://github.com/upx/upx/issues/245
	modified:   pefile.cpp
2019-01-26 07:51:16 -08:00
John Reiser 716d203a78 Testsuite checksums
amd64-linux.elf
commit 6b500bc83b
Date:   Wed Aug 22 14:39:14 2018 -0700

arm-linux.elf, armeb-linux.elf:
commit 75c31dff1d
Date:   Thu Dec 13 20:10:57 2018 -0800

	modified:   .github/travis_testsuite_1-expected_sha256sums.sh
2018-12-31 11:08:53 -08:00
John Reiser 9719a7dd56 MSVC pettiness
https://github.com/upx/upx/issues/238
	modified:   p_lx_elf.cpp
2018-12-26 18:38:30 -08:00
John Reiser c097233bf3 Stronger checks for DT_HASH, DT_GNU_HASH
https://github.com/upx/upx/issues/238
	modified:   p_lx_elf.cpp
2018-12-26 13:00:20 -08:00
John Reiser 69a583281f MemBuffer::subref() for 64-bit offsets; better diagnosis for bad .e_shoff
https://github.com/upx/upx/issues/235 (POC14)
	modified:   mem.cpp
	modified:   mem.h
	modified:   p_lx_elf.cpp
2018-12-16 16:00:15 -08:00
John Reiser 8e90c9af2b Corner cases for e_shnum vs e_shstrndx
modified:   p_lx_elf.cpp
2018-12-16 15:36:51 -08:00
John Reiser a784284b7f Check user_init_off. Also remove '\n' from error messages.
https://github.com/upx/upx/issues/235  POC11
	modified:   p_lx_elf.cpp
2018-12-16 12:14:22 -08:00
John Reiser 0509edf08d ElfXX_Sym.st_name is always 32 bits
modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2018-12-16 11:32:58 -08:00
John Reiser 7ca20f424f Typos
modified:   p_lx_elf.cpp
2018-12-15 21:17:26 -08:00
John Reiser b74d51c2a8 More checking of e_shstrndx
https://github.com/upx/upx/issues/235  POC6
	modified:   p_lx_elf.cpp
2018-12-15 21:12:15 -08:00
John Reiser 58061cd121 Check .p_offset
https://github.com/upx/upx/issues/235  POC13
	modified:   p_lx_elf.cpp
2018-12-15 20:59:45 -08:00
John Reiser b8f6be5389 More checking of DT_HASH and DT_GNU_HASH
https://github.com/upx/upx/issues/235  POC12
	modified:   p_lx_elf.cpp
2018-12-15 20:43:33 -08:00
John Reiser 7c766b3313 Check e_shstrndx and Shdr.st_name
https://github.com/upx/upx/issues/235  POC10
	modified:   p_lx_elf.cpp
2018-12-15 20:27:20 -08:00
John Reiser 91b81b587b Abandon when outrageous Elf64_Dyn.d_tag
https://github.com/upx/upx/issues/235  POC8
	modified:   p_lx_elf.cpp
2018-12-15 19:35:13 -08:00
John Reiser 780a4347b8 Check DT_HASH and DT_GNU_HASH.
https://github.com/upx/upx/issues/235  POC2,POC4
Also cleanup checking of symbol number and .st_name
in POC1,POC3,POC5,POC7,POC9,POC11
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2018-12-15 19:16:14 -08:00
John Reiser 606ad08dd1 Check symbol number and .st_name
https://github.com/upx/upx/issues/235  POC1,POC3,POC7,POC9
	modified:   p_elf_enum.h
	modified:   p_lx_elf.h
	modified:   p_lx_elf.cpp
2018-12-14 21:32:49 -08:00
John Reiser 75c31dff1d Use THUMB 'ret' when in THUMB mode.
https://github.com/upx/upx/issues/236
https://github.com/upx/upx/issues/229
	modified:   src/arm.v4t-linux.shlib-init.S

	modified:   arm.v5t-linux.shlib-init.h
	modified:   tmp/arm.v5t-linux.shlib-init.bin.dump
2018-12-13 20:14:14 -08:00
John Reiser 473b90419f Mach-o for 'rust' has intermixed LC_SEGMENT64 "__DWARF" with 0==.vmsize
https://github.com/upx/upx/issues/222
	modified:   p_mach.cpp
	modified:   stub/src/amd64-darwin.macho-main.c
	modified:   stub/src/amd64-darwin.macho-upxmain.c
	also *-darwin.macho-fold.{h,map}
2018-10-13 21:06:37 -07:00
John Reiser f88b85e126 MSVC error C4146: unary minus operator applied to unsigned type, result still unsigned
modified:   p_lx_elf.cpp
2018-10-09 20:27:19 -07:00
John Reiser b122f8e9d0 Optimize /proc/self/exe. Sync stubs.
See also commit 78b1da5c00 earlier today
for https://github.com/upx/upx/issues/225 .
	modified:   stub/src/arm.v4a-linux.elf-entry.S
	modified:   stub/src/arm.v4a-linux.elf-fold.S
	also *.h, *.map, *.bin.dump
2018-10-09 20:11:34 -07:00
John Reiser cb8b1595a1 Pay more attention to 0==.e_shnum
modified:   p_lx_elf.cpp
2018-10-09 19:38:43 -07:00
John Reiser 1bee919276 cosmetic: developer quality-of-life
modified:   packer.cpp
2018-10-09 19:35:03 -07:00
John Reiser 78b1da5c00 Avoid dcache==>icache trouble with mflg_data; heuristic cache_flush for 32-bit ARM
modified:   arm.v4a-linux.elf-entry.S
	modified:   arm.v4a-linux.elf-fold.S
2018-10-09 19:24:50 -07:00
John Reiser bb8239ccda more DPRINTF
modified:   amd64-linux.elf-main.c
2018-10-09 19:23:06 -07:00
John Reiser 2a594ad0a7 Better return value when de-compression method mismatches.
modified:   arch/amd64/lzma_d.S
	modified:   arch/amd64/nrv2b_d.S
	modified:   arch/amd64/nrv2d_d.S
	modified:   arch/amd64/nrv2e_d.S
2018-10-07 10:15:48 -07:00
John Reiser b05073550c "pop %rcx", not %ecx
modified:   amd64-darwin.macho-entry.S
	modified:   amd64-linux.elf-entry.S
2018-10-07 10:11:45 -07:00
John Reiser 37d6a34e58 MSVC is a nimrod. (All verions 10.0 through 14.1)
"(4074): error C4146: unary minus operator applied to unsigned type, result still unsigned"
So what?  Many programmers are much better than the typical Microsoft coder.
The C standard GUARANTEES that unsigned arithmetic uses two's complement,
ignores overflow, and the result is what the hardware adder produces.
	modified:   p_lx_elf.cpp
2018-09-23 20:45:07 -07:00
John Reiser 4f0cba9bb6 /proc/self/exe mapping had wrong offset in stub for 32-bit ARM
https://github.com/upx/upx/issues/221
	modified:   stub/src/arm.v4a-linux.elf-entry.S
	modified:   stub/src/arm.v4a-linux.elf-fold.S
	also arm*.*-linux.elf-*.{h,map}
2018-09-23 20:32:37 -07:00
John Reiser 4d1c754af9 Preserve Mach_segment_header.flags; fix non-PIE main programs on MacOS.
https://github.com/upx/upx/issues/222
	modified:   p_mach.cpp
	modified:   p_mach.h
	modified:   stub/src/amd64-darwin.macho-entry.S
	also *.macho-*.h, *.macho-fold.map, amd64-darwin.macho-entry.bin.dump
2018-09-22 18:50:37 -07:00
John Reiser c1cfde21d7 Map when .vmsize (not .filesize). More debugging DPRINTF;
modified:   stub/src/amd64-darwin.macho-main.c
	also *.macho-fold.h, *.macho-fold.map
2018-09-22 13:06:45 -07:00
John Reiser bb1f9cdecd Propagate pagezero_vmsize; fix overlay_offset.
modified:   p_mach.cpp
2018-09-22 12:11:51 -07:00
John Reiser b259b0ca28 Print failed syscalls to stderr
modified:   stub/src/amd64-darwin.macho-fold.S
2018-09-22 12:09:22 -07:00
John Reiser 0051dfc84f --android-shlib: Relocate ABS _edata etc.
https://github.com/upx/upx/issues/220
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2018-09-16 15:10:40 -07:00
John Reiser 9f294e6ce5 Fix "upx -d" de-compression when input is compressed Android shlib.
https://github.com/upx/upx/issues/220
	modified:   p_lx_elf.cpp
2018-09-16 13:09:43 -07:00
John Reiser 153ea8be03 MSVC signed/unsigned
modified:   p_mach.cpp
2018-09-11 21:13:27 -07:00
John Reiser f3f7f97f8d MSVC signed/unsigned
modified:   p_mach.cpp
2018-09-09 15:58:24 -07:00
John Reiser 9bb6854e64 Fix stub for MacOS El Capitan, which has "pre-linked" /usr/bin/dyld
https://github.com/upx/upx/issues/218
https://github.com/Homebrew/homebrew-core/pull/31846
	modified:   src/amd64-darwin.macho-main.c
	    also *-darwin.mach-fold.{h,map}
2018-09-09 15:37:54 -07:00
John Reiser 4bba1e6cb7 Merge branch 'devel' of https://github.com/upx/upx into devel 2018-09-08 11:43:41 -07:00
John Reiser 597e8fe407 Fix de-compression for Mach-O files (MacOS)
https://github.com/upx/upx/issues/219
	modified:   p_mach.cpp
	modified:   p_mach.h
2018-09-08 11:41:38 -07:00
Markus F.X.J. Oberhumer 556c541ffb Sync with latest upx-testsuite changes. 2018-09-06 13:57:15 +02:00
John Reiser 5963f18f7c Merge branch 'devel' of https://github.com/upx/upx into devel 2018-09-04 20:54:21 -07:00
John Reiser 0dac6b7be3 MacOS de-compression (upx -d)
https://github.com/upx/upx/issues/218
	modified:   p_mach.cpp
2018-09-04 20:52:17 -07:00
Markus F.X.J. Oberhumer 296ede780b Update Travis. 2018-08-29 15:13:46 +02:00
Markus F.X.J. Oberhumer faaa19331a Update Travis. 2018-08-27 16:43:21 +02:00
Markus F.X.J. Oberhumer 88cb5886f3 Update Travis. 2018-08-26 06:42:46 +02:00
Markus F.X.J. Oberhumer 2fcc3f86c0 Introduce environment variable UPX_DISABLE_GITREV_WARNING. 2018-08-26 06:29:58 +02:00
Markus F.X.J. Oberhumer 9362fde9eb Update testsuite checksums caused by version bump. 2018-08-26 06:15:54 +02:00
Markus F.X.J. Oberhumer 56f4d781c1 Post-release version bump. 2018-08-26 06:08:40 +02:00
425 changed files with 11785 additions and 11833 deletions
+13 -3
View File
@@ -3,6 +3,11 @@
os: Visual Studio 2015 os: Visual Studio 2015
branches:
except:
- /^gitlab.*/
- /^travis.*/
environment: environment:
global: { TRAVIS_OS_NAME: windows, CROSS: "", C: "", B: release, T: "", X: "" } global: { TRAVIS_OS_NAME: windows, CROSS: "", C: "", B: release, T: "", X: "" }
matrix: matrix:
@@ -14,8 +19,10 @@ environment:
- { C: msvc-12.0-x64, CL_VERSION: 18.00, VS_VERSION: 2013 } - { C: msvc-12.0-x64, CL_VERSION: 18.00, VS_VERSION: 2013 }
- { C: msvc-14.0-x86, CL_VERSION: 19.00, VS_VERSION: 2015 } - { C: msvc-14.0-x86, CL_VERSION: 19.00, VS_VERSION: 2015 }
- { C: msvc-14.0-x64, CL_VERSION: 19.00, VS_VERSION: 2015 } - { C: msvc-14.0-x64, CL_VERSION: 19.00, VS_VERSION: 2015 }
- { C: msvc-14.1-x86, CL_VERSION: 19.12, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 } - { C: msvc-14.1-x86, CL_VERSION: 19.16, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 }
- { C: msvc-14.1-x64, CL_VERSION: 19.12, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 } - { C: msvc-14.1-x64, CL_VERSION: 19.16, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 }
- { C: msvc-14.2-x86, CL_VERSION: 19.24, VS_VERSION: 2019, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 }
- { C: msvc-14.2-x64, CL_VERSION: 19.24, VS_VERSION: 2019, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 }
UPX_AUTOMATIC_BUILDS_SSL_KEY: UPX_AUTOMATIC_BUILDS_SSL_KEY:
secure: PZMpVeqnEYe39kK+Zu2/fnmZ6/HG6Lvls0hh9GMVU9vCWsr8xaU7kIbHBS01puUkb4bEWPILKYvSEDuhOhguDjd/P4QdXWipvV/F2GaVax0= secure: PZMpVeqnEYe39kK+Zu2/fnmZ6/HG6Lvls0hh9GMVU9vCWsr8xaU7kIbHBS01puUkb4bEWPILKYvSEDuhOhguDjd/P4QdXWipvV/F2GaVax0=
UPX_AUTOMATIC_BUILDS_SSL_IV: UPX_AUTOMATIC_BUILDS_SSL_IV:
@@ -58,6 +65,8 @@ install:
- if "%C%"=="msvc-14.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 ) - if "%C%"=="msvc-14.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 )
- if "%C%"=="msvc-14.1-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 ) - if "%C%"=="msvc-14.1-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 )
- if "%C%"=="msvc-14.1-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 ) - if "%C%"=="msvc-14.1-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 )
- if "%C%"=="msvc-14.2-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 )
- if "%C%"=="msvc-14.2-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 )
build_script: build_script:
- cd c:\projects\upx - cd c:\projects\upx
@@ -96,6 +105,7 @@ test_script:
# now run the UPX testsuite using bash # now run the UPX testsuite using bash
- cd c:\projects\upx - cd c:\projects\upx
- bash ./.github/travis_testsuite_1.sh - bash ./.github/travis_testsuite_1.sh
- bash ./.github/travis_deploy.sh # info: it seems that ssh is not properly installed/started on the 2019 worker image
- if NOT "%VS_VERSION%"=="2019" ( bash ./.github/travis_deploy.sh )
# vim:set ts=2 sw=2 et: # vim:set ts=2 sw=2 et:
+9
View File
@@ -37,6 +37,7 @@ else
fi fi
subdir=${subdir%%:*}; subdir=${subdir%%/*}; subdir=${subdir%%--*} subdir=${subdir%%:*}; subdir=${subdir%%/*}; subdir=${subdir%%--*}
case $branch in case $branch in
appveyor*) ;;
devel*) ;; devel*) ;;
gitlab*) ;; gitlab*) ;;
master*) ;; master*) ;;
@@ -103,6 +104,14 @@ else
fi fi
d=$d-$BM_C-$BM_B d=$d-$BM_C-$BM_B
# remove redundant -m32/-m64/-x86/-x64 from directory name
if [[ $d =~ ^((i386-darwin|i386-linux|i386-win32).*)(-m32|-x86)(-.+)?$ ]]; then
d="${BASH_REMATCH[1]}${BASH_REMATCH[4]}"
fi
if [[ $d =~ ^((amd64-darwin|amd64-linux|amd64-win64).*)(-m64|-x64)(-.+)?$ ]]; then
d="${BASH_REMATCH[1]}${BASH_REMATCH[4]}"
fi
if [[ -n $subdir ]]; then if [[ -n $subdir ]]; then
print_header "DEPLOY $subdir/$d" print_header "DEPLOY $subdir/$d"
else else
+21 -12
View File
@@ -134,18 +134,27 @@ if [[ -n $BM_CROSS ]]; then
fi # BM_CROSS fi # BM_CROSS
if [[ "$CC" == "false" ]]; then # generic if [[ "$CC" == "false" ]]; then # generic
if [[ -z $BM_CROSS ]]; then if [[ -z $BM_CROSS ]]; then
case $BM_C in if [[ $TRAVIS_OS_NAME == osx ]]; then
clang | clang-m?? | clang-3.4-m?? | clang-[6789][0-9][0-9]-m??) case $BM_C in
CC="clang"; CXX="clang++" ;; # standard system compiler clang | clang-m?? | clang-[6789][0-9][0-9]-m?? | clang-1[0-1][0-9][0-9]-m??)
clang-[345].[0-9]-m??) CC="clang"; CXX="clang++" ;; # standard system compiler
v=${BM_C:6:3}; CC="clang-$v"; CXX="clang++-$v"; SCAN_BUILD="scan-build-$v" ;; esac
gcc | gcc-m?? | gcc-mx32) else
CC="gcc"; CXX="g++" ;; # standard system compiler case $BM_C in
gcc-[34].[0-9]-m?? | gcc-[34].[0-9]-mx32) clang | clang-m?? | clang-3.4-m??)
v=${BM_C:4:3}; CC="gcc-$v"; CXX="g++-$v" ;; CC="clang"; CXX="clang++" ;; # standard system compiler
gcc-[567]-m?? | gcc-[567]-mx32) clang-[3456].[0-9]-m??)
v=${BM_C:4:1}; CC="gcc-$v"; CXX="g++-$v" ;; v=${BM_C:6:3}; CC="clang-$v"; CXX="clang++-$v"; SCAN_BUILD="scan-build-$v" ;;
esac clang-[789]-m??)
v=${BM_C:6:1}; CC="clang-$v"; CXX="clang++-$v"; SCAN_BUILD="scan-build-$v" ;;
gcc | gcc-m?? | gcc-mx32)
CC="gcc"; CXX="g++" ;; # standard system compiler
gcc-[34].[0-9]-m?? | gcc-[34].[0-9]-mx32)
v=${BM_C:4:3}; CC="gcc-$v"; CXX="g++-$v" ;;
gcc-[56789]-m?? | gcc-[56789]-mx32)
v=${BM_C:4:1}; CC="gcc-$v"; CXX="g++-$v" ;;
esac
fi
fi fi
fi # generic fi # generic
case $BM_C in case $BM_C in
@@ -0,0 +1,210 @@
########## begin .sha256sums.recreate
expected_sha256sums__t010_decompressed="\
24158f78c34c4ef94bb7773a6dda7231d289be76c2f5f60e8b9ddb3f800c100e *amd64-linux.elf/upx-3.91
24808d572483f4cd713d66894b3da406755038737007a78b076528e6407e3132 *amd64-linux.elf/upx-3.95
c5007328ffcec842bb808329470afd71c9f7bf6416f5f5c978be1f942fe72618 *amd64-win64.pe/upx-3.95.exe
f7279729eb975e4238f8b8ee56fefa41ccbeb35ef0ffe4c34f8047baab78fff5 *arm-linux.elf/upx-3.95
28d7ca8f0dfca8159e637eaf2057230b6e6719e07751aca1d19a45b5efed817c *arm-wince.pe/upx-3.91.exe
ce81113f8a4ff1cd806811cb80ab8bea5c9c6fbced47451c7f07e50700f9817b *arm64-linux.elf/upx-3.95
b1c1c38d50007616aaf8e942839648c80a6111023e0b411e5fa7a06c543aeb4a *armeb-linux.elf/upx-3.91
84b90eb0d617571fe4885639925b35ca6a61060cb2616bb5bf729b4d701653e4 *armeb-linux.elf/upx-3.95
bcac77a287289301a45fde9a75e4e6c9ad7f8d57856bae6eafaae12ae4445a34 *i386-dos32.djgpp2.coff/upx-3.91.exe
7d331e508449497f64cd47abdd3f00f70307f508ad3fd692d333feb97beccead *i386-dos32.djgpp2.coff/upx-3.95.exe
730a513b72a094697f827e4ac1a4f8ef58a614fc7a7ad448fa58d60cd89af7ed *i386-linux.elf/upx-3.91
a1f3e5ffa7b2cfebe1e475ac1f4c7683b1b8b4e292aa0d04386cc0314dd162c9 *i386-linux.elf/upx-3.95
0dbc3c267ca8cd35ee3ea138b59c8b1ae35872c918be6d17df1a892b75710f9b *i386-win32.pe/upx-3.91.exe
e0dfcb440bb43d53cf68f0178429a5136f8f7f13544499ad17699a98a6f8ffc0 *i386-win32.pe/upx-3.95.exe
8e5333ea040f5594d3e67d5b09e005d52b3a52ef55099a7c11d7e39ead38e66d *m68k-atari.tos/upx-3.91.ttp
8902f38ec3d95d8e077e3ab5fdbb5bad408859913a35deb87041f4f053cd6605 *mips-linux.elf/upx-3.95
c3f44b4d00a87384c03a6f9e7aec809c1addfe3e271244d38a474f296603088c *mipsel-linux.elf/upx-3.91
dd1496bc4e9c32a5d5dd47e3eaabf7b134ca001d48807eebfd3d5e28c8a2ab58 *mipsel-linux.elf/upx-3.95
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
2bc00a51daa0bada19a8fa1bd2c227a8596844fa1b0aa3611087f195072700e2 *powerpc-linux.elf/upx-3.95
a0950546dc17fca9437219431d8ddb0249ce5b08e899e0c799a87ac982adee70 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t020_canonicalized="\
24158f78c34c4ef94bb7773a6dda7231d289be76c2f5f60e8b9ddb3f800c100e *amd64-linux.elf/upx-3.91
24808d572483f4cd713d66894b3da406755038737007a78b076528e6407e3132 *amd64-linux.elf/upx-3.95
c5007328ffcec842bb808329470afd71c9f7bf6416f5f5c978be1f942fe72618 *amd64-win64.pe/upx-3.95.exe
f7279729eb975e4238f8b8ee56fefa41ccbeb35ef0ffe4c34f8047baab78fff5 *arm-linux.elf/upx-3.95
28d7ca8f0dfca8159e637eaf2057230b6e6719e07751aca1d19a45b5efed817c *arm-wince.pe/upx-3.91.exe
ce81113f8a4ff1cd806811cb80ab8bea5c9c6fbced47451c7f07e50700f9817b *arm64-linux.elf/upx-3.95
b1c1c38d50007616aaf8e942839648c80a6111023e0b411e5fa7a06c543aeb4a *armeb-linux.elf/upx-3.91
84b90eb0d617571fe4885639925b35ca6a61060cb2616bb5bf729b4d701653e4 *armeb-linux.elf/upx-3.95
bcac77a287289301a45fde9a75e4e6c9ad7f8d57856bae6eafaae12ae4445a34 *i386-dos32.djgpp2.coff/upx-3.91.exe
7d331e508449497f64cd47abdd3f00f70307f508ad3fd692d333feb97beccead *i386-dos32.djgpp2.coff/upx-3.95.exe
730a513b72a094697f827e4ac1a4f8ef58a614fc7a7ad448fa58d60cd89af7ed *i386-linux.elf/upx-3.91
a1f3e5ffa7b2cfebe1e475ac1f4c7683b1b8b4e292aa0d04386cc0314dd162c9 *i386-linux.elf/upx-3.95
0dbc3c267ca8cd35ee3ea138b59c8b1ae35872c918be6d17df1a892b75710f9b *i386-win32.pe/upx-3.91.exe
e0dfcb440bb43d53cf68f0178429a5136f8f7f13544499ad17699a98a6f8ffc0 *i386-win32.pe/upx-3.95.exe
8e5333ea040f5594d3e67d5b09e005d52b3a52ef55099a7c11d7e39ead38e66d *m68k-atari.tos/upx-3.91.ttp
8902f38ec3d95d8e077e3ab5fdbb5bad408859913a35deb87041f4f053cd6605 *mips-linux.elf/upx-3.95
c3f44b4d00a87384c03a6f9e7aec809c1addfe3e271244d38a474f296603088c *mipsel-linux.elf/upx-3.91
dd1496bc4e9c32a5d5dd47e3eaabf7b134ca001d48807eebfd3d5e28c8a2ab58 *mipsel-linux.elf/upx-3.95
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
2bc00a51daa0bada19a8fa1bd2c227a8596844fa1b0aa3611087f195072700e2 *powerpc-linux.elf/upx-3.95
a0950546dc17fca9437219431d8ddb0249ce5b08e899e0c799a87ac982adee70 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\
82a3c42af2aae745b6b233fb4c0d3b60c3a2b224ada7af4b81d062d913503bac *amd64-linux.elf/upx-3.91
8959e46212b736476f517f911b7740038da882b30788efebf71d0108a01cecf8 *amd64-linux.elf/upx-3.95
099a690a01bb8e08bb88a09919241c499aae1fa282f3fa49588f1240b1fdd3e8 *amd64-win64.pe/upx-3.95.exe
39f86a05b5a7065e13e028638d324d9ddbf72fc537f0a62ad4637364722249f2 *arm-linux.elf/upx-3.95
a6d50d99a37ed7d52ea6b53be1d2ce57550139276d450be0ccfc0c61eac99498 *arm-wince.pe/upx-3.91.exe
7cfb366a6ed04c6a2706a7cc28411c6f190dfde56403fc52eb1677130dd4307f *arm64-linux.elf/upx-3.95
9532ef921b3bfb02deaeb59cb33aaa499132af689fa1df51499790f26e99a790 *armeb-linux.elf/upx-3.91
b076ac9531bee0fbcf44824c2baf83284e747bb381325076c0a1466b9002581c *armeb-linux.elf/upx-3.95
5c365ab8f4c5811a55cceab8d6bfa59ee56c89a966d423e1f734cd27745e7191 *i386-dos32.djgpp2.coff/upx-3.91.exe
70c13950a28362bf4d5f49b496f683e2ed2d28875891cff283e11f2916163956 *i386-dos32.djgpp2.coff/upx-3.95.exe
32649cd041f5bee83d02b065c486ac8f26dd29d28a05c36503d42edd62ce7767 *i386-linux.elf/upx-3.91
f8dc23edc677f99075746f5f722ceb1642a82e3f38e5041fa1bf232016bdfc6e *i386-linux.elf/upx-3.95
1ab486ab59e331a811b7b16880b0673443a378442d875067377d4427075e124c *i386-win32.pe/upx-3.91.exe
f0416ec4793a0eed79858feaec6e5f9e04e8cdd7f7fe8bdef9c25fffbef6d358 *i386-win32.pe/upx-3.95.exe
2139848afeae725b6d7d95786a7ac5f07bf7116a76dfee169f99b3444cfca277 *m68k-atari.tos/upx-3.91.ttp
45c6f581807c0382462911899d30957d10ff58e6f2c4fde15d2187a0affa7785 *mips-linux.elf/upx-3.95
bc1ab2df1985aec60f78b1ee7adf52c6bc30d207dc4aca5f7f3b2cc187cc98ed *mipsel-linux.elf/upx-3.91
29d67983278a5149d122eb98b2f73f8abb648bc88cfcaae7ad468d69d5dbe3c4 *mipsel-linux.elf/upx-3.95
0a652f004aac31d2baa4610561ecd8210841f366b2f210953212a9e0750c301f *powerpc-linux.elf/upx-3.91
2bfc2e143736f378904f0f1322aaaf4086877fb37fd783ab4d0789825d59e6d5 *powerpc-linux.elf/upx-3.95
2c8657627f2247963d0187d6e5cf02fbe3bd84f2475908c234ecc1ae081b9ba7 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\
fcbe8cf92e76268950bd09e1285ce4cd9756d5505784e1e495a54623a88de8c5 *amd64-linux.elf/upx-3.91
272dbd7aa6eba2202008b9d5853fe8e24e894e7df66bf988690d96f428aeb93d *amd64-linux.elf/upx-3.95
7b7bd8e5c0d4e29ef9f3b97eb76dfe0afbe711172e25ee9c3079d656c5d036dd *amd64-win64.pe/upx-3.95.exe
21af84a819e789fad98534cb973c4ad3806cf7676caf546c9e4ace33d559e7e0 *arm-linux.elf/upx-3.95
74060375496ef1450252c9b30547ef3235b79e2b57666500dd44c61fedc0539e *arm-wince.pe/upx-3.91.exe
efb6240ce6a2be00906a4a3ba7652160e5aee43ed968961c1bc55ea370f6cd93 *arm64-linux.elf/upx-3.95
dc24337091e85595bf9ce259a702c52e9cc10e31d759df8f1ad26e65c148ed04 *armeb-linux.elf/upx-3.91
cde5cc6967cbee06c260a25eef3d7cdaf430bf8a63db5a6dfc8a9079ec895c52 *armeb-linux.elf/upx-3.95
217f050aecd01f04ef9eba37fed518c4380f170d3cdb483ae019312fad827490 *i386-dos32.djgpp2.coff/upx-3.91.exe
5a909066dd5aac865e36a26f7d002a8ddf6ae57e93a1dc1f6582b922388e9489 *i386-dos32.djgpp2.coff/upx-3.95.exe
909650339b3a93360b622a4ab2c9a2e489206ddbd4af2556101ff68a1082cf0f *i386-linux.elf/upx-3.91
d778256d361ab72ea9629a45a8c8ea501007978f64df6a003024f7a07efaf8e4 *i386-linux.elf/upx-3.95
8217b20bac36090189a7415196e96df93e0110f5d716d15ed84d0c1ac4b001e5 *i386-win32.pe/upx-3.91.exe
eb6a8c4e3652c75f4b054cc36933a4c9853ca23e4f2790ad6505368dc1ba82b7 *i386-win32.pe/upx-3.95.exe
29bf5c38da5cf33aecf6c48c55acdb0d73a3878790786f48815cbd8ad1819037 *m68k-atari.tos/upx-3.91.ttp
5163bf81989cf96127e833eacafa605248b3139ade256512122a8d56a00d8475 *mips-linux.elf/upx-3.95
6da6103fb68113c930f59455a504a5fbb1b982971d488f6cb34e6e19154eb812 *mipsel-linux.elf/upx-3.91
98c5ea01aeabb9d3d54b47dbce13b5884e3ff2b856598d191fe50eb026da48b4 *mipsel-linux.elf/upx-3.95
35458012d9e90013c6ff6442b9a5b2a5dc90ea1451c7653b0d144ea8be9b8fd5 *powerpc-linux.elf/upx-3.91
a61669951a13a530fa06d9e0286c4c9ff18e47be836ccdde4c24acc5d0e7dda0 *powerpc-linux.elf/upx-3.95
852844b06078a5c820936e31cd52f4edc44b42ee9aa0edca9a21ee41b4442af5 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\
24d0578ee2a83d40de7740c7141c1b102961c505a04155ca3b66c73c493eee64 *amd64-linux.elf/upx-3.91
4253f580fa8bb00db0a093c3826350f759f096098fcb43195eb71f4213479d85 *amd64-linux.elf/upx-3.95
626ac9e02a60c25ab26bfd96120ef728abd3c7ed56b23b81cf22f439a8673e5f *amd64-win64.pe/upx-3.95.exe
40d1f54eb707b51223a36e939caabd7a4df81c87edd12f36c40f525bcf59f919 *arm-linux.elf/upx-3.95
8f29c06b3eb3770eae267e6adad6bbaf3c03e12a1649e085d044d7ea03638d3b *arm-wince.pe/upx-3.91.exe
bebb9c6327d88eb92bad9b1182d4f8f732caaed4e6aff169057ad108016a6f72 *arm64-linux.elf/upx-3.95
94010dc973ce886131b6ecd9775e0a3e9ed421503bfc74954f31a154e4a60d39 *armeb-linux.elf/upx-3.91
49b3c157b56c2cf2b206447b981d7e74561fde02569ccb73814a187163a1e05a *armeb-linux.elf/upx-3.95
12fd7e4e4e5c4067880e7e3db0526601f67d1456e7fa2c77e46beb3c10234bb1 *i386-dos32.djgpp2.coff/upx-3.91.exe
3771f947c9ce27221c3c647aa6814cc990734cd4f5ec8b4a1e4fb890e8352130 *i386-dos32.djgpp2.coff/upx-3.95.exe
27141ee7a92c81461233e0f7ef2dd22bf9d086c6b006af9a7a63906ea998a8b3 *i386-linux.elf/upx-3.91
bdeda6183b13f14b389829be4c23e8aeb202ff16b9b5f6644ec98ef448529780 *i386-linux.elf/upx-3.95
37871a1a85954ced4211b3930d4f27acd51f77e999ea8801c01667f221ccde4a *i386-win32.pe/upx-3.91.exe
27a77ed9d8243e1f1ccf2051f80977c8727790823dcdfd33d788b97ee32482eb *i386-win32.pe/upx-3.95.exe
bd45c11476def67a48cd8c8b79fde0bcc10da4a4811fd1cd87acb4b8cb317f7c *m68k-atari.tos/upx-3.91.ttp
b2d63e1a494f9ad8296f7c5b90c22d67c4e554c6bd2d0a9685c8d45bf2b4cba4 *mips-linux.elf/upx-3.95
48772c5cc502e503978da73d6f72eea2cafa55c06726c3b61f8b80e17f523b18 *mipsel-linux.elf/upx-3.91
e7499fb50da2a7000e5ccb9d8b0d022c71ec449c81e2edf27e48e413f0258c1e *mipsel-linux.elf/upx-3.95
fdf8a7484ca0771d11509183639610fa0dcdb36d195013a8f4f754094545a259 *powerpc-linux.elf/upx-3.91
839de35bcc7e7beb185055c60ad8728731a0456c7a32bb69e30faee5646dfdbc *powerpc-linux.elf/upx-3.95
dccd1b5296c1a70533332e9eec2788f74abcebf223fb6e44642148bdcc63b195 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t140_compress_lzma_2_no_filter="\
8bdcd33cb7073de57e3b72fcdfd52693d80e063c8f18c146fcbcb93feaa57438 *amd64-linux.elf/upx-3.91
c0cc9f01d4c74c003df410070f19181275650c96d6267b5af6d2029f72ecc2d5 *amd64-linux.elf/upx-3.95
32df633b40027b08da5a0cb4845294c971c2e133ee2506684979a3532c5fc685 *amd64-win64.pe/upx-3.95.exe
91474e9a68d5225916b2582ffbcae23d2644ece6f823686b1692edba0d909066 *arm-linux.elf/upx-3.95
19455d55f642e610df5f9071d59cde24d5db013ae8215a9946b3a995c6cb123a *arm-wince.pe/upx-3.91.exe
abd540824d65696fbb0aa45e1935f286435fc9c53049ac66d916cf53c39278b5 *arm64-linux.elf/upx-3.95
832db37f9c05d6e80e44d26974bc8368dcc02eadeeb37f4f79513855dc5e8ffb *armeb-linux.elf/upx-3.91
339086e40ae660fec688995a1fdb3b89487859891521a8dd03b44aaba9372331 *armeb-linux.elf/upx-3.95
3b4466fb3defcff86d7679b7c35929f959eba2e8d64f08099e3fbc5e7fd5aab9 *i386-dos32.djgpp2.coff/upx-3.91.exe
6a722037156b5b75e6622f4ac8187d163a73f7e090c0b6374d0c745f84ba197c *i386-dos32.djgpp2.coff/upx-3.95.exe
b67cc7eaee651c5ee41b02ae1894c3740274a1dd258e734c7933c48edf81ed06 *i386-linux.elf/upx-3.91
68eb9861137a5d0c05367f671343556f145d40aac49c6f7455d081b263d3e1ff *i386-linux.elf/upx-3.95
906fbf9f6c1e3483f6e9f003c602f20c584b013cf89c51cd17c8095c514a1d1d *i386-win32.pe/upx-3.91.exe
ca1e4f751677eab4e24d73d04e69c4c7f645798fa6bb416468bddde9c5dda61c *i386-win32.pe/upx-3.95.exe
11fbc05a27d6e2468baa64efc58bf23693e90d3a374b267d4a72a866af56e284 *m68k-atari.tos/upx-3.91.ttp
a81d82d7606f1735889dbfa1a5de1c6d35209c31e6e56c48cc40c9470d07da54 *mips-linux.elf/upx-3.95
3ce5b8a9b36a71c33a644a8cd4fc9e5cb1009f5133d1df181c18c175b94143e4 *mipsel-linux.elf/upx-3.91
f2e03dad0165c3adb683c3bd8f26117dca53a577c8603441abeda911af07204f *mipsel-linux.elf/upx-3.95
174eb63cf809b0a105fccfa5318a754da6685610c3ffa3d81ba41ced4a040984 *powerpc-linux.elf/upx-3.91
01d6aa378efda299ade377d1bcd04611a467cb903efb82545205ed439c566c26 *powerpc-linux.elf/upx-3.95
e9b32f705ea249cfafcd3e6181f7632f38b304dcba0ab39690e8a5ffbcc2504f *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t150_compress_ucl_2_all_filters="\
9d2d9449ff3cd62389337d76d419306b18be18c48dc23c89b9048ab13856999d *amd64-linux.elf/upx-3.91
f221da0c79fa1a59de5becf341126b1a41f19c9860ce66676e927b0546956d16 *amd64-linux.elf/upx-3.95
a0c35f620eb4f5c49cc7c0ae591c9bc1ff39fe3b5a084a7038c37ac4242172be *amd64-win64.pe/upx-3.95.exe
a09b27147773e2288dc0a7075097bd76d86d0fdd6fb9d0726c4b928bc8b74b1b *arm-linux.elf/upx-3.95
ff5abf994119a68584d752f5d3ab120ec9f28b2a719efede55e6c71cb4d82b57 *arm-wince.pe/upx-3.91.exe
6801a06892b7d1a3534410bfb4a03aed6195dbc5012801a987f0a635f6b3af7a *arm64-linux.elf/upx-3.95
69587df298a09ccf3a1c147cec28942fb0419478163f75f61cf7b72538abeefe *armeb-linux.elf/upx-3.91
985f238569e6aa2c3973a281bfcfd13cfc9e638c10ebb5a3ff07c4051c97c488 *armeb-linux.elf/upx-3.95
fe14d316c0dc98bc49e6c0f5888a83b1fa8e58caea6d211301726fee0cdd020e *i386-dos32.djgpp2.coff/upx-3.91.exe
e4dd0a9565f7a501520997a48227d027e37fa3becf3b84e839c5f96aa169e601 *i386-dos32.djgpp2.coff/upx-3.95.exe
301a0b90694809ad0be9d354a7a9d6baa3fa9b4ccd62264166c95d86142df164 *i386-linux.elf/upx-3.91
3a6c56ba29940b4ac3b42d23cdfd21d0331036b082e50f4d2d87e1508567591f *i386-linux.elf/upx-3.95
91d816d5ecee3ffa48bc624283a600758776790fe928c2dc1846a72cd4d9d14d *i386-win32.pe/upx-3.91.exe
1930f3a09c0ec1a12056be6469f12d048a572bcdd7a62dc2c006a1c46f09fcf6 *i386-win32.pe/upx-3.95.exe
9024f8d52cf40726f27c0782fe63eb15b6aa33789c97a343fb80b901df8a7468 *m68k-atari.tos/upx-3.91.ttp
4dbfb026a0e10ffb43b8053c1f32b20c1632f8963c93a3170230c0a7dbc3e805 *mips-linux.elf/upx-3.95
aaca5c6fdadb4f735b1f5ff99e1394ba711db28b1e22f1df9119ee2693c419b3 *mipsel-linux.elf/upx-3.91
9edd1d514102ed0955f9a333b1de41ca3550ec34d075dbd69dc09a7f6325b68e *mipsel-linux.elf/upx-3.95
1ffcbc5041300c223ef03dbbed131560f942033d3df55b317099d1a8ad2ced69 *powerpc-linux.elf/upx-3.91
9884be7a7d0a459e8d90ecdb663d2dfb166199e3ae614ef2478aa8d7dab215ef *powerpc-linux.elf/upx-3.95
7847d39cc94308d7509b1515eef2daee0fcca48678ec2540570a05d6d461e76c *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t160_compress_all_methods_1_no_filter="\
5f9e96872c68df382efb48502d5d81b8afe3240d4eba9f81643863b0c4db4c56 *amd64-linux.elf/upx-3.91
e9eeb7710b3e2d54c7cbabf7cb4de2c40c30efdf1dccbe5324bb58cfd665fbc8 *amd64-linux.elf/upx-3.95
46043947b045c1e7bb5a1e29b369a61609c5a7e7b5c89e029d3606e38703da4f *amd64-win64.pe/upx-3.95.exe
2b801d5b4f61ed2c90fd54648b1aad3f346f7539f4f8047c6d6585eafa443800 *arm-linux.elf/upx-3.95
6b5f6961874812665512518792cb5a21a7c013e5fb6e2da30e72591625983a13 *arm-wince.pe/upx-3.91.exe
444850947143d981137eb825225c2a09e9a67da186812d0c0b25304b9cefcca5 *arm64-linux.elf/upx-3.95
950e6cbae17f14cb53da024d814790aa006c019060cbc0a11a277eb5e0722cbb *armeb-linux.elf/upx-3.91
2a0e7f240ee8cabfa026a58aae0e9763eb4d21bb0ce59c538cb4a8bd0734c422 *armeb-linux.elf/upx-3.95
3094ac645a70cd5316e777208eb2af00116cab03b0924fed9f6f2f4d1335d975 *i386-dos32.djgpp2.coff/upx-3.91.exe
97e1f9535799fb58b7814d20fc18ce78fabef669b7467da4ec0da952dc003597 *i386-dos32.djgpp2.coff/upx-3.95.exe
6614ffb7d8f742a9407a99515608399e370732bcdf041b13280de5ecb83d6e35 *i386-linux.elf/upx-3.91
323c3943a677fe84d526da7707d865e57d28d9e24b5d7055e71bf3e9ffc924a8 *i386-linux.elf/upx-3.95
7a2deccab37f364e650df63ed3719433b38ee53193e29e7737bc352998a27281 *i386-win32.pe/upx-3.91.exe
0accf03fe46774a170710f5477f6e7095ba9ace0850bb3a1c697c1b1ec570be3 *i386-win32.pe/upx-3.95.exe
efb22c80605d58fb96a302c58fcc5c1bdf143f90a6874004fae6549df2a224c8 *m68k-atari.tos/upx-3.91.ttp
754295165a9c08364e9754322868c6f4df7c2772746d844a04fda3287907f362 *mips-linux.elf/upx-3.95
bf63ab0df4b2d45f3f156ebf9fd7e60e6cb175f688f68bd14b5e699e6b95872b *mipsel-linux.elf/upx-3.91
4a2894fb946d684d370f7d252abc43afcff0a339ef2aeaeaa23767ff3e6b15fd *mipsel-linux.elf/upx-3.95
fcb40e252de5e3a7f495d338ad6bf6dc73aee7d10513e06b07a270161fe449d8 *powerpc-linux.elf/upx-3.91
e282ca41f508ae63defc249aa2e4318540362ae8b3c40f31bf46946a6a1bf5f6 *powerpc-linux.elf/upx-3.95
8b67e3e700f6d5afb99bc561e5d2e5850b2eea4b5a854cab0c84766e6df2a4a6 *powerpc64le-linux.elf/upx-3.95
"
expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\
42c2358cc7a6a1252c1fb8bb29562e3047d839a506720ef0dff098cbd6cd08c3 *amd64-linux.elf/upx-3.91
e11f33fa80dda7e2b547cc375c1802f5f075a80f12033c123c97b2d572ad8757 *amd64-linux.elf/upx-3.95
77230816a4ebc51a430e8304ea331399491c548d182aa001b8d653e2d7b6ea9a *amd64-win64.pe/upx-3.95.exe
54cb369bf7b8e1e55380a2a97bd7e644cb0da79982d1678eea7a668362d93610 *arm-linux.elf/upx-3.95
7818cd3cbc877d3781ae1ce0abbaf4a19186af55cb675229f406943d552694dd *arm-wince.pe/upx-3.91.exe
3186b21f336cae305bbcadcddc5691969752b4a97094f27344361d49037a9b48 *arm64-linux.elf/upx-3.95
1ff49ccf438feefb7a8c9467c6fa3d6ad218cf9abdf12870522a1b24fd26f0c6 *armeb-linux.elf/upx-3.91
b43bb20b5e372dd877015e0fffd18e908ed3d53ffa057624ab4242f07515e11a *armeb-linux.elf/upx-3.95
ce60084e86b17798e34e59c21b6cea28702d850f786f9e35e41a2bc873178f53 *i386-dos32.djgpp2.coff/upx-3.91.exe
aa3f9f5742e5f7aa87a7578d92b54425da6eb4b173200408f3e30384c4089370 *i386-dos32.djgpp2.coff/upx-3.95.exe
d63d34bffb7864f1af6c76edb85820b01f3ccb053528b075b81b1425feabe797 *i386-linux.elf/upx-3.91
e42f1febc0ca7f54adf7b2fd721aac2f9e72680e0e010ed2368f669f8d341071 *i386-linux.elf/upx-3.95
21d932deff36167a2f030773e8f68f952fc4fb67bf1864c515f3930f572fb624 *i386-win32.pe/upx-3.91.exe
7665c75c47fc3b7913e0849187070e8ddf73f584f1e2495f51d3ebb32cf0ad21 *i386-win32.pe/upx-3.95.exe
17420ed467a4f326c79c13d0b89b6d3a4dd6a2d3b96f199d7e9dd31528439f2f *m68k-atari.tos/upx-3.91.ttp
d93f08394e03b17044be5f22ff496913aeaf0a6927d2b926452aadc32af2a479 *mips-linux.elf/upx-3.95
b0d689013481cc7f668a2559a7d696356ab7adafe68ae49f9e7e68ced1d6a8ff *mipsel-linux.elf/upx-3.91
2593ca7f7609a44ae87c22a2d72e0470737253967eb82f9a8ceda9496b195503 *mipsel-linux.elf/upx-3.95
236f784979481ed09b875fb7302bb31beb151140752ea62ef9ad4aa0ec073a4f *powerpc-linux.elf/upx-3.91
70d0da07e4ac2e249864644fdf29935352452416f70b7362d0e62ab87ec05653 *powerpc-linux.elf/upx-3.95
f98e35412b9fda2aaa58c6f84b843b3d9493781b6510ac4ec0af9ccb9327a141 *powerpc64le-linux.elf/upx-3.95
"
########## end .sha256sums.recreate
+3 -102
View File
@@ -125,107 +125,7 @@ recreate_expected_sha256sums() {
echo "########## end .sha256sums.recreate" >> "$o" echo "########## end .sha256sums.recreate" >> "$o"
} }
########## begin .sha256sums.recreate source "$argv0dir/travis_testsuite_1-expected_sha256sums.sh" || exit 1
expected_sha256sums__t010_decompressed="\
24158f78c34c4ef94bb7773a6dda7231d289be76c2f5f60e8b9ddb3f800c100e *amd64-linux.elf/upx-3.91
28d7ca8f0dfca8159e637eaf2057230b6e6719e07751aca1d19a45b5efed817c *arm-wince.pe/upx-3.91.exe
b1c1c38d50007616aaf8e942839648c80a6111023e0b411e5fa7a06c543aeb4a *armeb-linux.elf/upx-3.91
bcac77a287289301a45fde9a75e4e6c9ad7f8d57856bae6eafaae12ae4445a34 *i386-dos32.djgpp2.coff/upx-3.91.exe
730a513b72a094697f827e4ac1a4f8ef58a614fc7a7ad448fa58d60cd89af7ed *i386-linux.elf/upx-3.91
0dbc3c267ca8cd35ee3ea138b59c8b1ae35872c918be6d17df1a892b75710f9b *i386-win32.pe/upx-3.91.exe
8e5333ea040f5594d3e67d5b09e005d52b3a52ef55099a7c11d7e39ead38e66d *m68k-atari.tos/upx-3.91.ttp
c3f44b4d00a87384c03a6f9e7aec809c1addfe3e271244d38a474f296603088c *mipsel-linux.elf/upx-3.91
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
"
expected_sha256sums__t020_canonicalized="\
24158f78c34c4ef94bb7773a6dda7231d289be76c2f5f60e8b9ddb3f800c100e *amd64-linux.elf/upx-3.91
28d7ca8f0dfca8159e637eaf2057230b6e6719e07751aca1d19a45b5efed817c *arm-wince.pe/upx-3.91.exe
b1c1c38d50007616aaf8e942839648c80a6111023e0b411e5fa7a06c543aeb4a *armeb-linux.elf/upx-3.91
bcac77a287289301a45fde9a75e4e6c9ad7f8d57856bae6eafaae12ae4445a34 *i386-dos32.djgpp2.coff/upx-3.91.exe
730a513b72a094697f827e4ac1a4f8ef58a614fc7a7ad448fa58d60cd89af7ed *i386-linux.elf/upx-3.91
0dbc3c267ca8cd35ee3ea138b59c8b1ae35872c918be6d17df1a892b75710f9b *i386-win32.pe/upx-3.91.exe
8e5333ea040f5594d3e67d5b09e005d52b3a52ef55099a7c11d7e39ead38e66d *m68k-atari.tos/upx-3.91.ttp
c3f44b4d00a87384c03a6f9e7aec809c1addfe3e271244d38a474f296603088c *mipsel-linux.elf/upx-3.91
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
"
expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\
7301bb93535f91bb789b44da75c2f365cc2d0fa99a4d597f49de8716d96dbcf6 *amd64-linux.elf/upx-3.91
17a9aef8087ca2b3f5fc4e3a41d7c4d721bf3ad222030ac2068ed00eb85a9deb *arm-wince.pe/upx-3.91.exe
3ddbde0d00ff6ea9ce163d889e6f418146b35238d05005b98b76adb555bcf644 *armeb-linux.elf/upx-3.91
f680566e3daae0526c5f6965c23219d7946c4d4117eeaa277bd9e68e907418c6 *i386-dos32.djgpp2.coff/upx-3.91.exe
14394ce9806dc7a3622addfb625d1731e021600e0489dc7c8ea7f30c54d1fd37 *i386-linux.elf/upx-3.91
d3cfb5347758ee54e54cfc92ae502a3e19702cd4fec115d74f84f8a5ab7a9bc2 *i386-win32.pe/upx-3.91.exe
d0e68eed8f001f3074351acbc7133bd41f67f8e3b7e5f82d5df1911481123378 *m68k-atari.tos/upx-3.91.ttp
58db1b12b5462dbb05c08d7952cacd7c7090a6b3cbfbf9b431e6390f246cbb95 *mipsel-linux.elf/upx-3.91
4fd2e2fc33563e95453f9b4a52c153f248937a548cbfe746bb0d71f19ae5ad03 *powerpc-linux.elf/upx-3.91
"
expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\
e537c1a28bea559cbe43cd23723443e2617316a40a6632927f6d94589f800efe *amd64-linux.elf/upx-3.91
33a13fa63379b9eae6878cd2bfb0b41963795a27bc5a026de0b50b4a43131b12 *arm-wince.pe/upx-3.91.exe
3c6f9ab67e21c72073f66c558765d8f07f192ba63d3ffb2ce40ebc9178ccd5ef *armeb-linux.elf/upx-3.91
28bc9ee28b73b11a32fb2e4d3ad99ff06d61cf5b9f104052db89f6f6f0557ca9 *i386-dos32.djgpp2.coff/upx-3.91.exe
8201f15f7ef5e54cddb18474a5ed2d48e2fc7726d6014c457ad3cd82c01e1072 *i386-linux.elf/upx-3.91
5bebadb8455b052580b1f22a949c3eb5a441c8b6ba9c6b50506cb703fc3f65ce *i386-win32.pe/upx-3.91.exe
e4d3a430f93b41a3aa67492e6c06d74a1fcd4e06b272de2c681252d91b7a953a *m68k-atari.tos/upx-3.91.ttp
1bd8be4eb09dc39b4b0d447ef4eebac29c51d56380be79b46461962dea81b8fb *mipsel-linux.elf/upx-3.91
c1928cd500450f1f09f2c0265980c329cd0e083095abb3a48f1999a7dd551309 *powerpc-linux.elf/upx-3.91
"
expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\
3fadda0299775195558de2ac25a673ab65467bd147ab8aaf57b7af1542f1d5de *amd64-linux.elf/upx-3.91
99f7d8d7faf57c78053158c6a6915dab8c5cfdcc73112cee9607bcec55837ae8 *arm-wince.pe/upx-3.91.exe
8f06e11a0c60fd83db607089b7ad985a48a26ee09bd533e55072f9fe2ba39f2f *armeb-linux.elf/upx-3.91
542c368392f2d584145cc51d51b9dbc5dc61754597bb1cb7673821a2a4650816 *i386-dos32.djgpp2.coff/upx-3.91.exe
edf61800e09e0ef963b27fded0e032839f4b0cb907a84e43d19ed31bd536440f *i386-linux.elf/upx-3.91
ef5e25c79d356e9ed0736f34dc5ee7a8f4c66d0c330b8d16672fac7d829b5a7c *i386-win32.pe/upx-3.91.exe
2c85e506d670aef707789e5d8a97901ddbb42f50a205a207f575f79b901c2cd7 *m68k-atari.tos/upx-3.91.ttp
93014cd6edd07fafcae133b449837f550f92eeab86ceebd8e7ed5337ab65bdc2 *mipsel-linux.elf/upx-3.91
761f0d45b61e020fd8931cd5192677d06b34fec64a534d99be9fe0346eb56d2b *powerpc-linux.elf/upx-3.91
"
expected_sha256sums__t140_compress_lzma_2_no_filter="\
4abe4fff006e53ee147573d74a0f7feba9ebc62b8233e19ac331c5350391bd66 *amd64-linux.elf/upx-3.91
df8ad2d951368ddfb64b8c405f4b4727a2cf5f1c823ecd6e1d298eb21cad0afc *arm-wince.pe/upx-3.91.exe
cd109f76ff00030f564a883da5a57784d9626e85c2c54e6de1f0f2cfda709325 *armeb-linux.elf/upx-3.91
deeae51e0a4c25e6f5afd741361eea445c198fba247b583663b010778699419a *i386-dos32.djgpp2.coff/upx-3.91.exe
591d02bbb604aab55ed653411ea5888d3e93c5e078f3fc79f73d54b12bc83b22 *i386-linux.elf/upx-3.91
171bde9f27a5571b524e9d7cdba6cefa142bb8a0b114c4d5294944ee5781e0bb *i386-win32.pe/upx-3.91.exe
54ca62d5f15ce87708867f7b349584799779711bca015a3ebac69f5cf077b905 *m68k-atari.tos/upx-3.91.ttp
bc9c9ce0ce7ce32e3f77fca39ffdd7809731e93f978fb201ea49b53a980c5d4e *mipsel-linux.elf/upx-3.91
4357697b615fb40d041ad5a2217a4722aa9066d2100ba2c73212262f581f820f *powerpc-linux.elf/upx-3.91
"
expected_sha256sums__t150_compress_ucl_2_all_filters="\
15dd4ad982953a1f7b7c74e7cb34e777fc7db11201280cd5af19ac547c8b9a0f *amd64-linux.elf/upx-3.91
a8cd8c9abb50ab45f30bd2f01bcb4d2e934806440ef206d7da44097aced7085b *arm-wince.pe/upx-3.91.exe
c7af209eb44204a6e4ccbed18e1b3f6eaac5df01c1106426d375d1cd65cd01fd *armeb-linux.elf/upx-3.91
ea265e1f78c23beb632187bfebcb4ae15ce688f10e87db69952ab54724666042 *i386-dos32.djgpp2.coff/upx-3.91.exe
530a267e8fdae0f4b746df62d3f2d406c6bcb08a58058448b867e372dd4a6cc6 *i386-linux.elf/upx-3.91
7c3d7398f63eb9e235992d2d8fd6de9e355f6f21621c45032a6ae6c9009067e6 *i386-win32.pe/upx-3.91.exe
bf11d38e3a2cd2c585fdb2173368287e3d82edd5727ea3508c21752b2e7c5a53 *m68k-atari.tos/upx-3.91.ttp
271adf2c52ed777c00a17a19283478e226d76181b1dfb72d6c3aead3923fbad4 *mipsel-linux.elf/upx-3.91
a0152edb1476dc0f713bcd55a7462de200e92e7d057ff4a9af92c7af6abbc3bc *powerpc-linux.elf/upx-3.91
"
expected_sha256sums__t160_compress_all_methods_1_no_filter="\
16d2a30dd00dfd38d3aba417a087a7341314fa8f5769f8c87565728f2f2bf06a *amd64-linux.elf/upx-3.91
560335ec9f89f2cb8b2a2cff51b4d3dee215c68ecfc0a182fab4a838fafee166 *arm-wince.pe/upx-3.91.exe
b3b0a0c277e947cfc19048e142e71c902cfe6d77931b2a1caeba63b9449aa8c7 *armeb-linux.elf/upx-3.91
d5f89d57c0d74923e557410e1b5ec135e3853985965bfe9fd38283851896b4c9 *i386-dos32.djgpp2.coff/upx-3.91.exe
e6586de002ae8ccda77d9088e37412c1069626e807d81722c1cd810a8a7367e6 *i386-linux.elf/upx-3.91
4c73a38e81fe12f36dc37e514f8580c12bdf5d8cb92e9a07b7070db291a2f7eb *i386-win32.pe/upx-3.91.exe
53d9857238472bf4e2822134e8d63c11d6ed32f83615bb7491ba4441ff55c6c2 *m68k-atari.tos/upx-3.91.ttp
6b11b762f1dbf07e3135a2ccfbf558d44f4743e23e73ce7c143396b26ae49c4d *mipsel-linux.elf/upx-3.91
96bcf3f5f0f5168d5cdfc01dee5d35e77e0eb8401ae6623ab559254cc99ffbdc *powerpc-linux.elf/upx-3.91
"
expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\
3ded78e90066b688f820a35fe10270c2d3c00bc4c09d02f811b14a959003cd6b *amd64-linux.elf/upx-3.91
6f70c268d4686a50db2843efc58ef547048d8ed0d758bad0c95a50b3ce155a1f *arm-wince.pe/upx-3.91.exe
20acc14939776fcd2e643cea83075d84a764fb12942ce52fa0e72dc313df026b *armeb-linux.elf/upx-3.91
45ae9d42b5c6f1eec0ebc75e656c767efe796719b00922ba9e8095ffa5373450 *i386-dos32.djgpp2.coff/upx-3.91.exe
a6f13ec927d6a44fddd1af92190a530ff59282134080cd9881fef47b34e262f2 *i386-linux.elf/upx-3.91
14b192b5419ca0ec2b3f238dc6ed9c17596e82ff2674a299d4b0a76d118a73de *i386-win32.pe/upx-3.91.exe
0c341752253e2c530f3dfefc1b4b3619f931f7e23f032a7feffeb192a6a3c373 *m68k-atari.tos/upx-3.91.ttp
24887c6e98651b663cf04720bf7467501fa260a86ae8f83507669cce05d4b8bf *mipsel-linux.elf/upx-3.91
22947eb320540740b012aa53e85b99b038d5c4bf0ebcd28ea76c1c4f9018878f *powerpc-linux.elf/upx-3.91
"
########## end .sha256sums.recreate
# /*********************************************************************** # /***********************************************************************
# // init # // init
@@ -268,6 +168,7 @@ if [[ $BM_B =~ (^|\+)coverage($|\+) ]]; then
fi fi
export UPX="--prefer-ucl --no-color --no-progress" export UPX="--prefer-ucl --no-color --no-progress"
export UPX_DISABLE_GITREV_WARNING=1
# let's go # let's go
if ! $upx_run --version; then echo "UPX-ERROR: FATAL: upx --version FAILED"; exit 1; fi if ! $upx_run --version; then echo "UPX-ERROR: FATAL: upx --version FAILED"; exit 1; fi
@@ -285,7 +186,7 @@ testdir=t010_decompressed
mkdir $testdir; v=expected_sha256sums__$testdir; echo -n "${!v}" >$testdir/.sha256sums.expected mkdir $testdir; v=expected_sha256sums__$testdir; echo -n "${!v}" >$testdir/.sha256sums.expected
testsuite_header $testdir testsuite_header $testdir
for f in $upx_testsuite_SRCDIR/files/packed/*/upx-3.91*; do for f in $upx_testsuite_SRCDIR/files/packed/*/upx-3.9[15]*; do
testsuite_split_f $f testsuite_split_f $f
[[ -z $fb ]] && continue [[ -z $fb ]] && continue
echo "# $f" echo "# $f"
+360 -96
View File
@@ -2,12 +2,19 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer # Copyright (C) Markus Franz Xaver Johannes Oberhumer
sudo: false sudo: false
dist: precise os: linux
dist: xenial
language: cpp language: cpp
notifications: { email: { on_success: never, on_failure: change } } notifications: { email: { on_success: never, on_failure: change } }
branches:
except:
- /^appveyor.*/
- /^gitlab.*/
# Ubuntu 12.04 LTS "Precise" # Ubuntu 12.04 LTS "Precise"
# also see TB_OS_linux_precise_llvm below
.ubuntu_precise_toolchain_sources: &PS .ubuntu_precise_toolchain_sources: &PS
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5 - llvm-toolchain-precise-3.5
@@ -19,10 +26,31 @@ notifications: { email: { on_success: never, on_failure: change } }
# Ubuntu 14.04 LTS "Trusty" # Ubuntu 14.04 LTS "Trusty"
.ubuntu_trusty_toolchain_sources: &TS .ubuntu_trusty_toolchain_sources: &TS
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-trusty-3.9
- llvm-toolchain-trusty-4.0
- llvm-toolchain-trusty-5.0 - llvm-toolchain-trusty-5.0
- llvm-toolchain-trusty-6.0
- llvm-toolchain-trusty-7
- llvm-toolchain-trusty-8
# Ubuntu 16.04 LTS "Xenial"
.ubuntu_xenial_toolchain_sources: &XS
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-6.0
- llvm-toolchain-xenial-7
- llvm-toolchain-xenial-8
env: env:
global: global:
# TB_LEVEL >= 1: gcc-7, gcc-8, gcc-9, clang-8, xcode11
# TB_LEVEL >= 2: gcc-4.4, gcc-4.8, gcc-6, clang-3.4, clang-7
# TB_LEVEL >= 3: gcc-4.6, gcc-5, clang-3.9, clang-6, xcode9, xcode10
# TB_LEVEL >= 4: include sanitize/scan-build/valgrind builds
# TB_LEVEL >= 5: cross-compilers running testsuite under qemu/wine
# TB_LEVEL >= 6: all other compilers & builds
- TB_LEVEL=5
- TB_OS_linux=1 TB_OS_osx=1
- TB_OS_linux_precise_llvm=1
- CROSS= C= B= T= X= - CROSS= C= B= T= X=
- secure: "YXHLXK+CM5d8yELIUSSs+P0/CoefClO7/AUX1oBj5W75g+YzR5uS2doVsB8UH8S8/GdNxk4P9Jgn4EiEVnjfGgn2eAD9MVpDPIxyJs5vI+5G77asq3QNdSl6QFv3O9I/6yBoVCewgPFPqsMd7Yvs/Ea3LcQkqalVhrC8ybYtmfs6VL2w33gn2J3b3TCn/s21L0ijklM0xvP1GNMDtuUpTSish5wvGOHE/91rwtdUDbJR8u31QY7fTASDiNnL/7ihgEIZ5XxpDYXviX1GC+nemhX1fWpmVmuT8m30Ruodi0yJVGASw9i2SaKv/VX/fJ/w2vlCfspL5LMZKkVLlfpIo3mQGqmMHFxv7mNy+hRu50ptoWNSkWArcqifwveh2liHUpl4jTvWaVll5Tw5VUGJhAUdzCTnqLIbWFnKIgCedL3iRFi4+EbyWNxel8lFESMOTDZFfJG5yEiDJbgbLsUaT2GmrsOphwAG7zDcZzvYTdjg/lF4Wh0MUnQJ+0MhDpii8Ahjp49lAPdw8uRQyyY7d7ksYKXVIkbgl6dRCC5vZSPucJiFjq2BClqIoEmzZPvHveDbovzFkNhJX9tFLrHLcXbPPcegww1FGoQ3wBM6JwJ+TvSD6N4OdCmou05aDuuQeznHi3GxOScjGwxdMIU28fdJDCTDg2rOihm22kHVajo=" - secure: "YXHLXK+CM5d8yELIUSSs+P0/CoefClO7/AUX1oBj5W75g+YzR5uS2doVsB8UH8S8/GdNxk4P9Jgn4EiEVnjfGgn2eAD9MVpDPIxyJs5vI+5G77asq3QNdSl6QFv3O9I/6yBoVCewgPFPqsMd7Yvs/Ea3LcQkqalVhrC8ybYtmfs6VL2w33gn2J3b3TCn/s21L0ijklM0xvP1GNMDtuUpTSish5wvGOHE/91rwtdUDbJR8u31QY7fTASDiNnL/7ihgEIZ5XxpDYXviX1GC+nemhX1fWpmVmuT8m30Ruodi0yJVGASw9i2SaKv/VX/fJ/w2vlCfspL5LMZKkVLlfpIo3mQGqmMHFxv7mNy+hRu50ptoWNSkWArcqifwveh2liHUpl4jTvWaVll5Tw5VUGJhAUdzCTnqLIbWFnKIgCedL3iRFi4+EbyWNxel8lFESMOTDZFfJG5yEiDJbgbLsUaT2GmrsOphwAG7zDcZzvYTdjg/lF4Wh0MUnQJ+0MhDpii8Ahjp49lAPdw8uRQyyY7d7ksYKXVIkbgl6dRCC5vZSPucJiFjq2BClqIoEmzZPvHveDbovzFkNhJX9tFLrHLcXbPPcegww1FGoQ3wBM6JwJ+TvSD6N4OdCmou05aDuuQeznHi3GxOScjGwxdMIU28fdJDCTDg2rOihm22kHVajo="
- secure: "JpSv3+QRmHcfN/bmT3mVkqET44NCPhM/qpcUssCVXnd2GW0qWURoyPHzVMn/gbeAkUjR6djtN3OzJ+M181QmlmTmE26pZC9Q6r1buNDWdkIH1FcpMCa67BBAjmq+yDwulDtvCMv0lbz60v57lzHBOLczF3yMxBVTjXxt1RsrzDLHzzVaDR5lEe+sQUNeRL7Vaq8crimPNTr4ZhMe59eweTO/3AWovuSPf250k1flfv7I8audZgrVZdbVKvj5C3Sziy1AGXcu8mDfET9/Ya2XBCQHWODjiKlnhSxqthhP3gQuacaLjpS2FjvQlamd+I9x6BBoLSeNbiXD9vgCydDUKvmUrU+zQs64U1hHk9WZWVC19kG7lTtTdanGDIUlIUtFZgqE4AQpJaIUWkUmHGyHi61JMvduzX21eL5c5j9DoJteX42FPb1n3xK/JSnUkLMpbFdQuy5inhzefhDfeNzaYxt8nPwHnJqrF73SW4PLDKeRyzvg/P+zqcou8nXrHfA1z9/FlnYzf7Qc9meai9Q/JARX3Q1ZKu5uyG+RuBLe2POq0192w6pflTr1ZlLJsKNSc1147PviKfmpla1lg3/6uVzMp5tgwbve/hx9SDXiRueGttKw/ymsY662+8G24NRKo4fxNklWFHaB4owM84edDzXDckPXbPgue8/HQT8BFio=" - secure: "JpSv3+QRmHcfN/bmT3mVkqET44NCPhM/qpcUssCVXnd2GW0qWURoyPHzVMn/gbeAkUjR6djtN3OzJ+M181QmlmTmE26pZC9Q6r1buNDWdkIH1FcpMCa67BBAjmq+yDwulDtvCMv0lbz60v57lzHBOLczF3yMxBVTjXxt1RsrzDLHzzVaDR5lEe+sQUNeRL7Vaq8crimPNTr4ZhMe59eweTO/3AWovuSPf250k1flfv7I8audZgrVZdbVKvj5C3Sziy1AGXcu8mDfET9/Ya2XBCQHWODjiKlnhSxqthhP3gQuacaLjpS2FjvQlamd+I9x6BBoLSeNbiXD9vgCydDUKvmUrU+zQs64U1hHk9WZWVC19kG7lTtTdanGDIUlIUtFZgqE4AQpJaIUWkUmHGyHi61JMvduzX21eL5c5j9DoJteX42FPb1n3xK/JSnUkLMpbFdQuy5inhzefhDfeNzaYxt8nPwHnJqrF73SW4PLDKeRyzvg/P+zqcou8nXrHfA1z9/FlnYzf7Qc9meai9Q/JARX3Q1ZKu5uyG+RuBLe2POq0192w6pflTr1ZlLJsKNSc1147PviKfmpla1lg3/6uVzMp5tgwbve/hx9SDXiRueGttKw/ymsY662+8G24NRKo4fxNklWFHaB4owM84edDzXDckPXbPgue8/HQT8BFio="
@@ -30,232 +58,468 @@ env:
matrix: matrix:
fast_finish: true fast_finish: true
include: include:
- os: linux - if: 1 = 1
dist: trusty os: linux
dist: xenial
compiler: gcc compiler: gcc
env: X=rebuild-stubs env: X=rebuild-stubs
addons: { apt: { packages: [ "g++-multilib", "lib32z1" ] } } addons: { apt: { packages: [ "g++-multilib", "lib32z1" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: C=gcc-4.4-m32 env: C=gcc-4.4-m32
addons: { apt: { sources: *PS, packages: [ "g++-4.4-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *PS, packages: [ "g++-4.4-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: C=gcc-4.4-m64 env: C=gcc-4.4-m64
addons: { apt: { sources: *PS, packages: [ "g++-4.4" ] } } addons: { apt: { sources: *PS, packages: [ "g++-4.4" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: C=gcc-4.5-m32 env: C=gcc-4.5-m32
addons: { apt: { sources: *PS, packages: [ "g++-4.5-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *PS, packages: [ "g++-4.5-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: C=gcc-4.5-m64 env: C=gcc-4.5-m64
addons: { apt: { sources: *PS, packages: [ "g++-4.5" ] } } addons: { apt: { sources: *PS, packages: [ "g++-4.5" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: C=gcc-4.6-m32 env: C=gcc-4.6-m32
addons: { apt: { packages: [ "g++-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { packages: [ "g++-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: C=gcc-4.6-m64 env: C=gcc-4.6-m64
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: C=gcc-4.7-m32 env: C=gcc-4.7-m32
addons: { apt: { sources: *PS, packages: [ "g++-4.7-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *PS, packages: [ "g++-4.7-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: C=gcc-4.7-m64 env: C=gcc-4.7-m64
addons: { apt: { sources: *PS, packages: [ "g++-4.7" ] } } addons: { apt: { sources: *PS, packages: [ "g++-4.7" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-4.8-m32 env: C=gcc-4.8-m32
addons: { apt: { sources: *PS, packages: [ "g++-4.8-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { packages: [ "g++-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-4.8-m64 env: C=gcc-4.8-m64
addons: { apt: { sources: *PS, packages: [ "g++-4.8" ] } } - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
- os: linux os: linux
dist: trusty dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-4.8-mx32 env: C=gcc-4.8-mx32
addons: { apt: { packages: [ "g++-multilib", "libx32stdc++-4.8-dev" ] } } addons: { apt: { packages: [ "g++-multilib", "libx32stdc++-4.8-dev" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-4.9-m32 env: C=gcc-4.9-m32
addons: { apt: { sources: *PS, packages: [ "g++-4.9-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *TS, packages: [ "g++-4.9-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-4.9-m64 env: C=gcc-4.9-m64
addons: { apt: { sources: *PS, packages: [ "g++-4.9" ] } } addons: { apt: { sources: *TS, packages: [ "g++-4.9" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: linux
dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-5-m32 env: C=gcc-5-m32
addons: { apt: { sources: *PS, packages: [ "g++-5-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *TS, packages: [ "g++-5-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: linux
dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-5-m64 env: C=gcc-5-m64
addons: { apt: { sources: *PS, packages: [ "g++-5" ] } } addons: { apt: { sources: *TS, packages: [ "g++-5" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-6-m32 env: C=gcc-6-m32
addons: { apt: { sources: *PS, packages: [ "g++-6-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *TS, packages: [ "g++-6-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-6-m64 env: C=gcc-6-m64
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } } addons: { apt: { sources: *TS, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
env: C=gcc-6-m32 B=debug os: linux
addons: { apt: { sources: *PS, packages: [ "g++-6-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=debug
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=debug+sanitize
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=sanitize
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=valgrind T=valgrind
addons: { apt: { sources: *PS, packages: [ "g++-6", valgrind ] } }
- os: linux
dist: trusty dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-7-m32 env: C=gcc-7-m32
addons: { apt: { sources: *TS, packages: [ "g++-7-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *TS, packages: [ "g++-7-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
os: linux
dist: trusty dist: trusty
compiler: gcc compiler: gcc
env: C=gcc-7-m64 env: C=gcc-7-m64
addons: { apt: { sources: *TS, packages: [ "g++-7" ] } } addons: { apt: { sources: *TS, packages: [ "g++-7" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
os: linux
dist: trusty
compiler: gcc
env: C=gcc-8-m32
addons: { apt: { sources: *TS, packages: [ "g++-8-multilib", "zlib1g-dev:i386" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
os: linux
dist: trusty
compiler: gcc
env: C=gcc-8-m64
addons: { apt: { sources: *TS, packages: [ "g++-8" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: trusty
compiler: gcc
env: C=gcc-8-m32 B=debug
addons: { apt: { sources: *TS, packages: [ "g++-8-multilib", "zlib1g-dev:i386" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: trusty
compiler: gcc
env: C=gcc-8-m64 B=debug
addons: { apt: { sources: *TS, packages: [ "g++-8" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
# must use sudo CAP_SYS_PTRACE for sanitize - see https://github.com/travis-ci/travis-ci/issues/9033
sudo: true
os: linux
dist: trusty
compiler: gcc
env: C=gcc-8-m64 B=debug+sanitize
addons: { apt: { sources: *TS, packages: [ "g++-8" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
# must use sudo CAP_SYS_PTRACE for sanitize - see https://github.com/travis-ci/travis-ci/issues/9033
sudo: true
os: linux
dist: trusty
compiler: gcc
env: C=gcc-8-m64 B=sanitize
addons: { apt: { sources: *TS, packages: [ "g++-8" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
os: linux
dist: trusty
compiler: gcc
env: C=gcc-8-m64 B=valgrind T=valgrind
addons: { apt: { sources: *TS, packages: [ "g++-8", valgrind ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
os: linux
dist: xenial
compiler: gcc
env: C=gcc-9-m32
addons: { apt: { sources: *XS, packages: [ "g++-9-multilib", "zlib1g-dev:i386" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
os: linux
dist: xenial
compiler: gcc
env: C=gcc-9-m64
addons: { apt: { sources: *XS, packages: [ "g++-9" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.4-m32 env: C=clang-3.4-m32
addons: { apt: { packages: [ "g++-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { packages: [ "g++-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.4-m64 env: C=clang-3.4-m64
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.5-m32 env: C=clang-3.5-m32
addons: { apt: { sources: *PS, packages: [ "clang-3.5", "g++-6-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *PS, packages: [ "clang-3.5", "g++-6-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.5-m64 env: C=clang-3.5-m64
addons: { apt: { sources: *PS, packages: [ "clang-3.5" ] } } addons: { apt: { sources: *PS, packages: [ "clang-3.5" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.6-m32 env: C=clang-3.6-m32
addons: { apt: { sources: *PS, packages: [ "clang-3.6", "g++-6-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *PS, packages: [ "clang-3.6", "g++-6-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.6-m64 env: C=clang-3.6-m64
addons: { apt: { sources: *PS, packages: [ "clang-3.6" ] } } addons: { apt: { sources: *PS, packages: [ "clang-3.6" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.7-m32 env: C=clang-3.7-m32
addons: { apt: { sources: *PS, packages: [ "clang-3.7", "g++-6-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *PS, packages: [ "clang-3.7", "g++-6-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.7-m64 env: C=clang-3.7-m64
addons: { apt: { sources: *PS, packages: [ "clang-3.7" ] } } addons: { apt: { sources: *PS, packages: [ "clang-3.7" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.8-m32 env: C=clang-3.8-m32
addons: { apt: { sources: *PS, packages: [ "clang-3.8", "g++-6-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *PS, packages: [ "clang-3.8", "g++-6-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
os: linux
dist: precise
compiler: clang compiler: clang
env: C=clang-3.8-m64 env: C=clang-3.8-m64
addons: { apt: { sources: *PS, packages: [ "clang-3.8" ] } } addons: { apt: { sources: *PS, packages: [ "clang-3.8" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: linux
dist: trusty
compiler: clang compiler: clang
env: C=clang-3.9-m32 env: C=clang-3.9-m32
addons: { apt: { sources: *PS, packages: [ "clang-3.9", "g++-6-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *TS, packages: [ "clang-3.9", "g++-7-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: linux
dist: trusty
compiler: clang compiler: clang
env: C=clang-3.9-m64 env: C=clang-3.9-m64
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } } addons: { apt: { sources: *TS, packages: [ "clang-3.9" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: trusty
compiler: clang compiler: clang
env: C=clang-3.9-m64 B=debug+sanitize env: C=clang-4.0-m32
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } } addons: { apt: { sources: *TS, packages: [ "clang-4.0", "g++-7-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: trusty
compiler: clang compiler: clang
env: C=clang-3.9-m64 B=sanitize env: C=clang-4.0-m64
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } } addons: { apt: { sources: *TS, packages: [ "clang-4.0" ] } }
- os: linux
compiler: clang - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
env: C=clang-3.9-m64 B=debug+scan-build os: linux
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } }
- os: linux
compiler: clang
env: C=clang-3.9-m64 B=scan-build
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } }
- os: linux
dist: trusty dist: trusty
compiler: clang compiler: clang
env: C=clang-5.0-m32 env: C=clang-5.0-m32
addons: { apt: { sources: *TS, packages: [ "clang-5.0", "g++-7-multilib", "zlib1g-dev:i386" ] } } addons: { apt: { sources: *TS, packages: [ "clang-5.0", "g++-7-multilib", "zlib1g-dev:i386" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: linux
dist: trusty dist: trusty
compiler: clang compiler: clang
env: C=clang-5.0-m64 env: C=clang-5.0-m64
addons: { apt: { sources: *TS, packages: [ "clang-5.0" ] } } addons: { apt: { sources: *TS, packages: [ "clang-5.0" ] } }
- os: linux
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: linux
dist: trusty
compiler: clang
env: C=clang-6.0-m32
addons: { apt: { sources: *TS, packages: [ "clang-6.0", "g++-7-multilib", "zlib1g-dev:i386" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: linux
dist: trusty
compiler: clang
env: C=clang-6.0-m64
addons: { apt: { sources: *TS, packages: [ "clang-6.0" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
# must use sudo CAP_SYS_PTRACE for sanitize - see https://github.com/travis-ci/travis-ci/issues/9033
sudo: true
os: linux
dist: trusty
compiler: clang
env: C=clang-6.0-m64 B=debug+sanitize
addons: { apt: { sources: *TS, packages: [ "clang-6.0" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
# must use sudo CAP_SYS_PTRACE for sanitize - see https://github.com/travis-ci/travis-ci/issues/9033
sudo: true
os: linux
dist: trusty
compiler: clang
env: C=clang-6.0-m64 B=sanitize
addons: { apt: { sources: *TS, packages: [ "clang-6.0" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
os: linux
dist: trusty
compiler: clang
env: C=clang-6.0-m64 B=debug+scan-build
addons: { apt: { sources: *TS, packages: [ "clang-6.0", "clang-tools-6.0" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
os: linux
dist: trusty
compiler: clang
env: C=clang-6.0-m64 B=scan-build
addons: { apt: { sources: *TS, packages: [ "clang-6.0", "clang-tools-6.0" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: xenial
compiler: clang
env: C=clang-7-m32
addons: { apt: { sources: *XS, packages: [ "clang-7", "g++-9-multilib", "zlib1g-dev:i386" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
os: linux
dist: xenial
compiler: clang
env: C=clang-7-m64
addons: { apt: { sources: *XS, packages: [ "clang-7" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
os: linux
dist: xenial
compiler: clang
env: C=clang-8-m32
addons: { apt: { sources: *XS, packages: [ "clang-8", "g++-9-multilib", "zlib1g-dev:i386" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
os: linux
dist: xenial
compiler: clang
env: C=clang-8-m64
addons: { apt: { sources: *XS, packages: [ "clang-8" ] } }
# Ubuntu 12.04 cross compilers
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: CROSS=arm-linux-gnueabi C=gcc-4.6 T=qemu env: CROSS=arm-linux-gnueabi C=gcc-4.6 T=qemu
addons: { apt: { packages: [ "g++-arm-linux-gnueabi", "qemu-user" ] } } addons: { apt: { packages: [ "g++-arm-linux-gnueabi", "qemu-user" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: CROSS=arm-linux-gnueabihf C=gcc-4.6 T=qemu env: CROSS=arm-linux-gnueabihf C=gcc-4.6 T=qemu
addons: { apt: { packages: [ "g++-arm-linux-gnueabihf", "qemu-user" ] } } addons: { apt: { packages: [ "g++-arm-linux-gnueabihf", "qemu-user" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: CROSS=i386-w64-mingw32 C=gcc-4.6 T=wine env: CROSS=i386-w64-mingw32 C=gcc-4.6 T=wine
addons: { apt: { packages: [ "binutils-mingw-w64-i686", "g++-mingw-w64-i686", "wine" ] } } addons: { apt: { packages: [ "binutils-mingw-w64-i686", "g++-mingw-w64-i686", "wine" ] } }
- os: linux - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-9]$/
os: linux
dist: precise
compiler: gcc compiler: gcc
env: CROSS=x86_64-w64-mingw32 C=gcc-4.6 T=wine env: CROSS=x86_64-w64-mingw32 C=gcc-4.6 T=wine
addons: { apt: { packages: [ "binutils-mingw-w64-x86-64", "g++-mingw-w64-x86-64", "wine" ] } } addons: { apt: { packages: [ "binutils-mingw-w64-x86-64", "g++-mingw-w64-x86-64", "wine" ] } }
- os: osx
# Ubuntu 16.04 cross compilers
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-90]$/
os: linux
dist: xenial
compiler: gcc
env: CROSS=mips-linux-gnu C=gcc-5 T=qemu
addons: { apt: { packages: [ "g++-5-mips-linux-gnu", "qemu-user" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-90]$/
os: linux
dist: xenial
compiler: gcc
env: CROSS=mipsel-linux-gnu C=gcc-5 T=qemu
addons: { apt: { packages: [ "g++-5-mipsel-linux-gnu", "qemu-user" ] } }
- if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-90]$/
os: linux
dist: xenial
compiler: gcc
env: CROSS=powerpc-linux-gnu C=gcc-5 T=qemu
addons: { apt: { packages: [ "g++-5-powerpc-linux-gnu", "qemu-user" ] } }
- if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: osx
osx_image: xcode6.4 osx_image: xcode6.4
compiler: clang compiler: clang
# must use debug build or else we get "ld: internal error: atom not found" when linking # must use debug build or else we get "ld: internal error: atom not found" when linking
env: C=clang-602-m32 B=debug env: C=clang-602-m32 B=debug
- os: osx - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: osx
osx_image: xcode6.4 osx_image: xcode6.4
compiler: clang compiler: clang
# must use debug build or else we get "ld: internal error: atom not found" when linking # must use debug build or else we get "ld: internal error: atom not found" when linking
env: C=clang-602-m64 B=debug env: C=clang-602-m64 B=debug
- os: osx
- if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: osx
osx_image: xcode7.3 osx_image: xcode7.3
compiler: clang compiler: clang
env: C=clang-703-m32 env: C=clang-703-m32
- os: osx - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: osx
osx_image: xcode7.3 osx_image: xcode7.3
compiler: clang compiler: clang
env: C=clang-703-m64 env: C=clang-703-m64
- os: osx
- if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: osx
osx_image: xcode8.3 osx_image: xcode8.3
compiler: clang compiler: clang
env: C=clang-802-m32 env: C=clang-802-m32
- os: osx - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
os: osx
osx_image: xcode8.3 osx_image: xcode8.3
compiler: clang compiler: clang
env: C=clang-802-m64 env: C=clang-802-m64
- os: osx
osx_image: xcode9.2 - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: osx
osx_image: xcode9.4
compiler: clang compiler: clang
env: C=clang-900-m32 env: C=clang-902-m32
- os: osx - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
osx_image: xcode9.2 os: osx
osx_image: xcode9.4
compiler: clang compiler: clang
env: C=clang-900-m64 env: C=clang-902-m64
- if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
os: osx
osx_image: xcode10.3
compiler: clang
env: C=clang-1001-m64
- if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
os: osx
osx_image: xcode11.3
compiler: clang
env: C=clang-1100-m64
addons: { homebrew: { packages: [ "coreutils" ] } }
install: install:
- uname -a; pwd; id; umask - uname -a; pwd; id; umask
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser Copyright (c) 1996-2020 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io https://upx.github.io
+1 -1
View File
@@ -1,7 +1,7 @@
# #
# UPX toplevel Makefile - needs GNU make 3.81 or better # UPX toplevel Makefile - needs GNU make 3.81 or better
# #
# Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
# #
MAKEFLAGS += -rR MAKEFLAGS += -rR
+3
View File
@@ -2,6 +2,9 @@
User visible changes for UPX User visible changes for UPX
================================================================== ==================================================================
Changes in 3.96 (23 Jan 2020):
* bug fixes - see https://github.com/upx/upx/milestone/5
Changes in 3.95 (26 Aug 2018): Changes in 3.95 (26 Aug 2018):
* Flag --android-shlib to work around bad design in Android * Flag --android-shlib to work around bad design in Android
* Flag --force-pie when ET_DYN main program is not marked as DF_1_PIE * Flag --force-pie when ET_DYN main program is not marked as DF_1_PIE
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser Copyright (c) 1996-2020 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io https://upx.github.io
+4 -4
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser Copyright (c) 1996-2020 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io https://upx.github.io
@@ -103,9 +103,9 @@ THE FUTURE
COPYRIGHT COPYRIGHT
========= =========
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
This program may be used freely, and you are welcome to This program may be used freely, and you are welcome to
redistribute it under certain conditions. redistribute it under certain conditions.
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser Copyright (c) 1996-2020 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io https://upx.github.io
+1 -1
View File
@@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser Copyright (c) 1996-2020 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io https://upx.github.io
+1 -1
View File
@@ -1,5 +1,5 @@
Decompressing ELF Directly to Memory on Linux/x86 Decompressing ELF Directly to Memory on Linux/x86
Copyright (C) 2000-2018 John F. Reiser jreiser@BitWagon.com Copyright (C) 2000-2020 John F. Reiser jreiser@BitWagon.com
References: References:
<elf.h> definitions for the ELF file format <elf.h> definitions for the ELF file format
+5 -5
View File
@@ -13,7 +13,7 @@ B<upx> S<[ I<command> ]> S<[ I<options> ]> I<filename>...
=head1 ABSTRACT =head1 ABSTRACT
The Ultimate Packer for eXecutables The Ultimate Packer for eXecutables
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser Copyright (c) 1996-2020 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io https://upx.github.io
@@ -934,13 +934,13 @@ Please report all bugs immediately to the authors.
=head1 COPYRIGHT =head1 COPYRIGHT
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
Copyright (C) 2002-2018 Jens Medoch Copyright (C) 2002-2020 Jens Medoch
This program may be used freely, and you are welcome to This program may be used freely, and you are welcome to
redistribute it under certain conditions. redistribute it under certain conditions.
+2 -2
View File
@@ -1,7 +1,7 @@
# #
# UPX Makefile - needs GNU make 3.81 or better # UPX Makefile - needs GNU make 3.81 or better
# #
# Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
# #
# build configuration options for this Makefile # build configuration options for this Makefile
@@ -148,7 +148,7 @@ upx_testsuite_SRCDIR := $(top_srcdir)/../upx-testsuite
endif endif
endif endif
# run the UPX testsuite # run the UPX testsuite
# The expected (old) checksums are in $(top_srcdir)/.github/travis_testsuite_1.sh # The expected (old) checksums are in $(top_srcdir)/.github/travis_testsuite_1-expected_sha256sums.sh
# The actual (new) checksums are in tmp-testsuite/testsuite_1/.sha256sums.recreate # The actual (new) checksums are in tmp-testsuite/testsuite_1/.sha256sums.recreate
ifneq ($(wildcard $(upx_testsuite_SRCDIR)/files/packed/.),) ifneq ($(wildcard $(upx_testsuite_SRCDIR)/files/packed/.),)
ifneq ($(wildcard $(top_srcdir)/.github/travis_testsuite_1.sh),) ifneq ($(wildcard $(top_srcdir)/.github/travis_testsuite_1.sh),)
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+8 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -30,6 +30,12 @@
#include "compress.h" #include "compress.h"
#include "mem.h" #include "mem.h"
#if (ACC_CC_CLANG)
# pragma clang diagnostic ignored "-Wshadow"
#endif
#if (ACC_CC_GNUC >= 0x040200)
# pragma GCC diagnostic ignored "-Wshadow"
#endif
#if (ACC_CC_MSC) #if (ACC_CC_MSC)
# pragma warning(disable: 4456) // -Wno-shadow # pragma warning(disable: 4456) // -Wno-shadow
#endif #endif
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+4 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -230,7 +230,9 @@ typedef size_t upx_rsize_t;
#endif #endif
// avoid warnings about shadowing global functions // avoid warnings about shadowing global functions
#undef basename
#undef index #undef index
#undef outp
#define basename upx_basename #define basename upx_basename
#define index upx_index #define index upx_index
#define outp upx_outp #define outp upx_outp
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2004-2018 John F. Reiser Copyright (C) 2004-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+6 -6
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -412,10 +412,10 @@ void show_version(int x)
if (v != NULL && v[0]) if (v != NULL && v[0])
fprintf(fp, "LZMA SDK version %s\n", v); fprintf(fp, "LZMA SDK version %s\n", v);
#endif #endif
fprintf(fp, "Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer\n"); fprintf(fp, "Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer\n");
fprintf(fp, "Copyright (C) 1996-2018 Laszlo Molnar\n"); fprintf(fp, "Copyright (C) 1996-2020 Laszlo Molnar\n");
fprintf(fp, "Copyright (C) 2000-2018 John F. Reiser\n"); fprintf(fp, "Copyright (C) 2000-2020 John F. Reiser\n");
fprintf(fp, "Copyright (C) 2002-2018 Jens Medoch\n"); fprintf(fp, "Copyright (C) 2002-2020 Jens Medoch\n");
#if (WITH_ZLIB) #if (WITH_ZLIB)
fprintf(fp, "Copyright (C) 1995" "-2005 Jean-loup Gailly and Mark Adler\n"); fprintf(fp, "Copyright (C) 1995" "-2005 Jean-loup Gailly and Mark Adler\n");
#endif #endif
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+14 -7
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -1540,11 +1540,18 @@ int __acc_cdecl_main main(int argc, char *argv[])
if (gitrev[0]) if (gitrev[0])
{ {
FILE *f = stdout; bool warn = true;
int fg = con_fg(f,FG_RED); const char *ee = getenv("UPX_DISABLE_GITREV_WARNING");
con_fprintf(f,"\nWARNING: this is an unstable beta version - use for testing only! Really.\n"); if (ee && ee[0] && strcmp(ee, "1") == 0)
fg = con_fg(f,fg); warn = false;
UNUSED(fg); if (warn)
{
FILE *f = stdout;
int fg = con_fg(f, FG_RED);
con_fprintf(f, "\nWARNING: this is an unstable beta version - use for testing only! Really.\n");
fg = con_fg(f, fg);
UNUSED(fg);
}
} }
#if 0 && defined(__GLIBC__) #if 0 && defined(__GLIBC__)
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+86 -56
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -27,7 +27,7 @@
#ifndef __ACC_H_INCLUDED #ifndef __ACC_H_INCLUDED
#define __ACC_H_INCLUDED 1 #define __ACC_H_INCLUDED 1
#define ACC_VERSION 20170301L #define ACC_VERSION 20200116L
#if defined(__CYGWIN32__) && !defined(__CYGWIN__) #if defined(__CYGWIN32__) && !defined(__CYGWIN__)
# define __CYGWIN__ __CYGWIN32__ # define __CYGWIN__ __CYGWIN32__
#endif #endif
@@ -52,6 +52,8 @@
# error "__cplusplus" # error "__cplusplus"
# elif (__cplusplus < 199711L) # elif (__cplusplus < 199711L)
# define ACC_LANG_CXX 1 # define ACC_LANG_CXX 1
# elif (__cplusplus >= 201402L)
# define ACC_LANG_CXX __cplusplus
# elif defined(_MSC_VER) && defined(_MSVC_LANG) && (_MSVC_LANG+0 >= 201402L) && 1 # elif defined(_MSC_VER) && defined(_MSVC_LANG) && (_MSVC_LANG+0 >= 201402L) && 1
# define ACC_LANG_CXX _MSVC_LANG # define ACC_LANG_CXX _MSVC_LANG
# else # else
@@ -66,6 +68,33 @@
# endif # endif
#endif #endif
#endif #endif
#if defined(ACC_CFG_ASSERT_LANG_ASSEMBLER) && (ACC_CFG_ASSERT_LANG_ASSEMBLER+0)
# if !(ACC_LANG_ASSEMBLER)
# error "ACC_CFG_ASSERT_LANG_ASSEMBLER"
# endif
# if (ACC_CFG_ASSERT_LANG_ASSEMBLER > 1) && (ACC_CFG_ASSERT_LANG_ASSEMBLER < ACC_LANG_ASSEMBLER)
# error "ACC_CFG_ASSERT_LANG_ASSEMBLER standard min version"
# endif
#endif
#if defined(ACC_CFG_ASSERT_LANG_C) && (ACC_CFG_ASSERT_LANG_C+0)
# if !(ACC_LANG_C)
# error "ACC_CFG_ASSERT_LANG_C"
# endif
# if (ACC_CFG_ASSERT_LANG_C > 1) && (ACC_CFG_ASSERT_LANG_C < ACC_LANG_C)
# error "ACC_CFG_ASSERT_LANG_C standard min version"
# endif
#endif
#if defined(ACC_CFG_ASSERT_LANG_CXX) && (ACC_CFG_ASSERT_LANG_CXX+0)
# if !(ACC_LANG_CXX)
# error "ACC_CFG_ASSERT_LANG_CXX"
# endif
# if !defined(__cplusplus)
# error "ACC_CFG_ASSERT_LANG_CXX __cplusplus"
# endif
# if (ACC_CFG_ASSERT_LANG_CXX > 1) && (ACC_CFG_ASSERT_LANG_CXX < ACC_LANG_CXX)
# error "ACC_CFG_ASSERT_LANG_CXX standard min version"
# endif
#endif
#if !defined(ACC_CFG_NO_DISABLE_WUNDEF) #if !defined(ACC_CFG_NO_DISABLE_WUNDEF)
#if defined(__ARMCC_VERSION) #if defined(__ARMCC_VERSION)
# pragma diag_suppress 193 # pragma diag_suppress 193
@@ -523,6 +552,9 @@
# if defined(_AIX) || defined(__AIX__) || defined(__aix__) # if defined(_AIX) || defined(__AIX__) || defined(__aix__)
# define ACC_OS_POSIX_AIX 1 # define ACC_OS_POSIX_AIX 1
# define ACC_INFO_OS_POSIX "aix" # define ACC_INFO_OS_POSIX "aix"
# elif defined(__DragonFly__)
# define ACC_OS_POSIX_DRAGONFLY 1
# define ACC_INFO_OS_POSIX "dragonfly"
# elif defined(__FreeBSD__) # elif defined(__FreeBSD__)
# define ACC_OS_POSIX_FREEBSD 1 # define ACC_OS_POSIX_FREEBSD 1
# define ACC_INFO_OS_POSIX "freebsd" # define ACC_INFO_OS_POSIX "freebsd"
@@ -965,6 +997,9 @@
#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
# define ACC_ARCH_MCS51 1 # define ACC_ARCH_MCS51 1
# define ACC_INFO_ARCH "mcs51" # define ACC_INFO_ARCH "mcs51"
#elif defined(__microblaze__) || defined(__MICROBLAZE__)
# define ACC_ARCH_MICROBLAZE 1
# define ACC_INFO_ARCH "microblaze"
#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
# define ACC_ARCH_MIPS 1 # define ACC_ARCH_MIPS 1
# define ACC_INFO_ARCH "mips" # define ACC_INFO_ARCH "mips"
@@ -1563,7 +1598,7 @@ extern "C" {
#endif #endif
#if !defined(ACC_UNUSED_LABEL) #if !defined(ACC_UNUSED_LABEL)
# if (ACC_CC_CLANG >= 0x020800ul) # if (ACC_CC_CLANG >= 0x020800ul)
# define ACC_UNUSED_LABEL(l) (__acc_gnuc_extension__ ((void) ((const void *) &&l))) # define ACC_UNUSED_LABEL(l) (__acc_gnuc_extension__ ((void) ACC_STATIC_CAST(const void *, &&l)))
# elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_INTELC || ACC_CC_WATCOMC) # elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_INTELC || ACC_CC_WATCOMC)
# define ACC_UNUSED_LABEL(l) if __acc_cte(0) goto l # define ACC_UNUSED_LABEL(l) if __acc_cte(0) goto l
# else # else
@@ -2040,7 +2075,11 @@ extern "C" {
#endif #endif
#endif #endif
#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER)
# if (ACC_CC_AZTECC || ACC_CC_ZORTECHC) # if (ACC_LANG_CXX >= 201103L)
# define ACC_COMPILE_TIME_ASSERT_HEADER(e) static_assert(e, #e);
# elif (ACC_LANG_C >= 201112L)
# define ACC_COMPILE_TIME_ASSERT_HEADER(e) _Static_assert(e, #e);
# elif (ACC_CC_AZTECC || ACC_CC_ZORTECHC)
# define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-!(e)]; ACC_EXTERN_C_END # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-!(e)]; ACC_EXTERN_C_END
# elif (ACC_CC_DMC || ACC_CC_SYMANTECC) # elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
# define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1u-2*!(e)]; ACC_EXTERN_C_END # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1u-2*!(e)]; ACC_EXTERN_C_END
@@ -2055,7 +2094,11 @@ extern "C" {
# endif # endif
#endif #endif
#if !defined(ACC_COMPILE_TIME_ASSERT) #if !defined(ACC_COMPILE_TIME_ASSERT)
# if (ACC_CC_AZTECC) # if (ACC_LANG_CXX >= 201103L)
# define ACC_COMPILE_TIME_ASSERT(e) {static_assert(e, #e);}
# elif (ACC_LANG_C >= 201112L)
# define ACC_COMPILE_TIME_ASSERT(e) {_Static_assert(e, #e);}
# elif (ACC_CC_AZTECC)
# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-!(e)];} # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-!(e)];}
# elif (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x030000ul)) # elif (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x030000ul))
# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)] __attribute__((__unused__));} # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)] __attribute__((__unused__));}
@@ -2378,7 +2421,9 @@ ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_LONG == sizeof(long))
# define ACC_WORDSIZE 4 # define ACC_WORDSIZE 4
#elif (ACC_ARCH_Z80) #elif (ACC_ARCH_Z80)
# define ACC_WORDSIZE 1 # define ACC_WORDSIZE 1
#elif (ACC_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) #elif (ACC_ARCH_MIPS) && (ACC_SIZEOF_LONG == 8) && (defined(__R5900) || defined(__MIPS_PSX2__))
# define ACC_WORDSIZE 8
#elif (ACC_ARCH_MIPS) && (ACC_SIZEOF_LONG == 4) && defined(__mips64) && defined(_MIPS_SIM) && defined(_ABIN32) && (_MIPS_SIM+0 == _ABIN32+0)
# define ACC_WORDSIZE 8 # define ACC_WORDSIZE 8
#elif (ACC_OS_OS400 || defined(__OS400__)) #elif (ACC_OS_OS400 || defined(__OS400__))
# define ACC_WORDSIZE 8 # define ACC_WORDSIZE 8
@@ -2780,6 +2825,7 @@ ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
# endif # endif
#elif (ACC_ARCH_RISCV) #elif (ACC_ARCH_RISCV)
# define ACC_OPT_AVOID_UINT_INDEX 1 # define ACC_OPT_AVOID_UINT_INDEX 1
# if 0
# ifndef ACC_OPT_UNALIGNED16 # ifndef ACC_OPT_UNALIGNED16
# define ACC_OPT_UNALIGNED16 1 # define ACC_OPT_UNALIGNED16 1
# endif # endif
@@ -2791,6 +2837,7 @@ ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
# define ACC_OPT_UNALIGNED64 1 # define ACC_OPT_UNALIGNED64 1
# endif # endif
# endif # endif
# endif
#elif (ACC_ARCH_S390) #elif (ACC_ARCH_S390)
# ifndef ACC_OPT_UNALIGNED16 # ifndef ACC_OPT_UNALIGNED16
# define ACC_OPT_UNALIGNED16 1 # define ACC_OPT_UNALIGNED16 1
@@ -3377,7 +3424,7 @@ ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) == sizeof(acc_uint_fast6
#if (ACC_OS_POSIX) #if (ACC_OS_POSIX)
# if (ACC_OS_POSIX_AIX) # if (ACC_OS_POSIX_AIX)
# define HAVE_SYS_RESOURCE_H 1 # define HAVE_SYS_RESOURCE_H 1
# elif (ACC_OS_POSIX_DARWIN || ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_NETBSD || ACC_OS_POSIX_OPENBSD) # elif (ACC_OS_POSIX_DARWIN || ACC_OS_POSIX_DRAGONFLY || ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_NETBSD || ACC_OS_POSIX_OPENBSD)
# define HAVE_STRINGS_H 1 # define HAVE_STRINGS_H 1
# undef HAVE_MALLOC_H # undef HAVE_MALLOC_H
# elif (ACC_OS_POSIX_HPUX || ACC_OS_POSIX_INTERIX) # elif (ACC_OS_POSIX_HPUX || ACC_OS_POSIX_INTERIX)
@@ -6679,35 +6726,31 @@ ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f) # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
#endif #endif
ACCLIB_PUBLIC(void, acc_getopt_init) (acc_getopt_p g, ACCLIB_PUBLIC(void, acc_getopt_init) (acc_getopt_p g,
int start_argc, int argc, char** argv) int start_argc, int argc, char **argv)
{ {
memset(g, 0, sizeof(*g)); memset(g, 0, sizeof(*g));
g->optind = start_argc; g->optind = start_argc;
g->argc = argc; g->argv = argv; g->argc = argc; g->argv = argv;
g->optopt = -1; g->optopt = -1;
} }
static int __ACCLIB_FUNCNAME(acc_getopt_rotate) (char** p, int first, int middle, int last) static int __ACCLIB_FUNCNAME(acc_getopt_rotate) (char **p, int first, int middle, int last)
{ {
int i = middle, n = middle - first; int i = middle, n = middle - first;
if (first >= middle || middle >= last) return 0; if (first >= middle || middle >= last) return 0;
for (;;) for (;;) {
{ char *t = p[first]; p[first++] = p[i]; p[i++] = t;
char* t = p[first]; p[first] = p[i]; p[i] = t; if (first == middle) {
if (++first == middle) if (i == last) break;
{
if (++i == last) break;
middle = i; middle = i;
} } else if (i == last)
else if (++i == last)
i = middle; i = middle;
} }
return n; return n;
} }
static int __ACCLIB_FUNCNAME(acc_getopt_perror) (acc_getopt_p g, int ret, const char* f, ...) static int __ACCLIB_FUNCNAME(acc_getopt_perror) (acc_getopt_p g, int ret, const char *f, ...)
{ {
if (g->opterr) if (g->opterr) {
{ #if defined(HAVE_STDARG_H) && (HAVE_STDARG_H)
#if (HAVE_STDARG_H)
struct { va_list ap; } s; struct { va_list ap; } s;
va_start(s.ap, f); va_start(s.ap, f);
g->opterr(g, f, &s); g->opterr(g, f, &s);
@@ -6720,16 +6763,15 @@ static int __ACCLIB_FUNCNAME(acc_getopt_perror) (acc_getopt_p g, int ret, const
return ret; return ret;
} }
ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g, ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
const char* shortopts, const char *shortopts,
const acc_getopt_longopt_p longopts, const acc_getopt_longopt_p longopts,
int* longind) int *longind)
{ {
#define pe __ACCLIB_FUNCNAME(acc_getopt_perror) #define pe __ACCLIB_FUNCNAME(acc_getopt_perror)
int ordering = ACC_GETOPT_PERMUTE; int ordering = ACC_GETOPT_PERMUTE;
int missing_arg_ret = g->bad_option; int missing_arg_ret = g->bad_option;
char* a; char *a;
if (shortopts) if (shortopts) {
{
if (*shortopts == '-' || *shortopts == '+') if (*shortopts == '-' || *shortopts == '+')
ordering = *shortopts++ == '-' ? ACC_GETOPT_RETURN_IN_ORDER : ACC_GETOPT_REQUIRE_ORDER; ordering = *shortopts++ == '-' ? ACC_GETOPT_RETURN_IN_ORDER : ACC_GETOPT_REQUIRE_ORDER;
if (*shortopts == ':') if (*shortopts == ':')
@@ -6746,20 +6788,17 @@ ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
goto acc_label_next_shortopt; goto acc_label_next_shortopt;
g->optind -= __ACCLIB_FUNCNAME(acc_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind); g->optind -= __ACCLIB_FUNCNAME(acc_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind);
g->pending_rotate_first = g->pending_rotate_middle = g->optind; g->pending_rotate_first = g->pending_rotate_middle = g->optind;
if (ordering == ACC_GETOPT_PERMUTE) if (ordering == ACC_GETOPT_PERMUTE) {
{
while (g->optind < g->argc && !(g->argv[g->optind][0] == '-' && g->argv[g->optind][1])) while (g->optind < g->argc && !(g->argv[g->optind][0] == '-' && g->argv[g->optind][1]))
++g->optind; ++g->optind;
g->pending_rotate_middle = g->optind; g->pending_rotate_middle = g->optind;
} }
if (g->optind >= g->argc) if (g->optind >= g->argc) {
{
g->optind = g->pending_rotate_first; g->optind = g->pending_rotate_first;
goto acc_label_eof; goto acc_label_eof;
} }
a = g->argv[g->optind]; a = g->argv[g->optind];
if (a[0] == '-' && a[1] == '-') if (a[0] == '-' && a[1] == '-') {
{
size_t l = 0; size_t l = 0;
const acc_getopt_longopt_p o; const acc_getopt_longopt_p o;
const acc_getopt_longopt_p o1 = NULL; const acc_getopt_longopt_p o1 = NULL;
@@ -6770,12 +6809,13 @@ ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
goto acc_label_eof; goto acc_label_eof;
for (a += 2; a[l] && a[l] != '=' && a[l] != '#'; ) for (a += 2; a[l] && a[l] != '=' && a[l] != '#'; )
++l; ++l;
for (o = longopts; l && o && o->name; ++o) for (o = longopts; l && o && o->name; ++o) {
{
if (strncmp(a, o->name, l) != 0) if (strncmp(a, o->name, l) != 0)
continue; continue;
if (!o->name[l]) if (!o->name[l])
goto acc_label_found_o; goto acc_label_found_o;
if ((o->has_arg & (ACC_GETOPT_EXACT_ARG | 0x80)) == (ACC_GETOPT_EXACT_ARG | 0x80))
continue;
need_exact |= o->has_arg & ACC_GETOPT_EXACT_ARG; need_exact |= o->has_arg & ACC_GETOPT_EXACT_ARG;
if (o1) o2 = o; if (o1) o2 = o;
else o1 = o; else o1 = o;
@@ -6787,8 +6827,7 @@ ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
o = o1; o = o1;
acc_label_found_o: acc_label_found_o:
a += l; a += l;
switch (o->has_arg & 0x2f) switch (o->has_arg & 0x2f) {
{
case ACC_GETOPT_OPTIONAL_ARG: case ACC_GETOPT_OPTIONAL_ARG:
if (a[0]) if (a[0])
g->optarg = a + 1; g->optarg = a + 1;
@@ -6798,7 +6837,7 @@ ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
g->optarg = a + 1; g->optarg = a + 1;
else if (g->optind < g->argc) else if (g->optind < g->argc)
g->optarg = g->argv[g->optind++]; g->optarg = g->argv[g->optind++];
if (!g->optarg) if (!g->optarg || (!g->optarg[0] && (o->has_arg & 0x40)))
return pe(g, missing_arg_ret, "option '--%s' requires an argument", o->name); return pe(g, missing_arg_ret, "option '--%s' requires an argument", o->name);
break; break;
case ACC_GETOPT_REQUIRED_ARG | 0x20: case ACC_GETOPT_REQUIRED_ARG | 0x20:
@@ -6814,43 +6853,35 @@ ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
} }
if (longind) if (longind)
*longind = (int) (o - longopts); *longind = (int) (o - longopts);
if (o->flag) if (o->flag) {
{
*o->flag = o->val; *o->flag = o->val;
return 0; return 0;
} }
return o->val; return o->val;
} }
if (a[0] == '-' && a[1]) if (a[0] == '-' && a[1]) {
{
unsigned char c; unsigned char c;
const char* s; const char *s;
acc_label_next_shortopt: acc_label_next_shortopt:
a = g->argv[g->optind] + ++g->shortpos; a = g->argv[g->optind] + ++g->shortpos;
c = (unsigned char) *a++; s = NULL; c = (unsigned char) *a++; s = NULL;
if (c != ':' && shortopts) if (c != ':' && shortopts)
s = strchr(shortopts, c); s = strchr(shortopts, c);
if (!s || s[1] != ':') if (!s || s[1] != ':') {
{
if (!a[0]) if (!a[0])
{ ++g->optind; g->shortpos = 0; } { ++g->optind; g->shortpos = 0; }
if (!s) if (!s) {
{
g->optopt = c; g->optopt = c;
return pe(g, g->bad_option, "invalid option '-%c'", c); return pe(g, g->bad_option, "invalid option '-%c'", c);
} }
} } else {
else
{
++g->optind; g->shortpos = 0; ++g->optind; g->shortpos = 0;
if (a[0]) if (a[0])
g->optarg = a; g->optarg = a;
else if (s[2] != ':') else if (s[2] != ':') {
{
if (g->optind < g->argc) if (g->optind < g->argc)
g->optarg = g->argv[g->optind++]; g->optarg = g->argv[g->optind++];
else else {
{
g->optopt = c; g->optopt = c;
return pe(g, missing_arg_ret, "option '-%c' requires an argument", c); return pe(g, missing_arg_ret, "option '-%c' requires an argument", c);
} }
@@ -6858,8 +6889,7 @@ ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
} }
return c; return c;
} }
if (ordering == ACC_GETOPT_RETURN_IN_ORDER) if (ordering == ACC_GETOPT_RETURN_IN_ORDER) {
{
++g->optind; ++g->optind;
g->optarg = a; g->optarg = a;
return 1; return 1;
@@ -7352,7 +7382,7 @@ static int acc_pclock_read_clock_gettime_t_libc(acc_pclock_handle_p h, acc_pcloc
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) != 0) if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) != 0)
return -1; return -1;
c->tv_sec = ts.tv_sec; c->tv_sec = ts.tv_sec;
c->tv_nsec = (acc_uint32l_t) ts.tv_nsec; c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
ACC_UNUSED(h); return 0; ACC_UNUSED(h); return 0;
} }
#endif #endif
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+12 -3
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -155,12 +155,14 @@
DT_RELA = 7, /* Relocations which do contain an addend */ DT_RELA = 7, /* Relocations which do contain an addend */
DT_RELASZ = 8, /* Total size of Rela relocs */ DT_RELASZ = 8, /* Total size of Rela relocs */
DT_RELAENT = 9, /* Size of one RELA relocation */ DT_RELAENT = 9, /* Size of one RELA relocation */
DT_STRSZ = 10, /* Size of string table */
DT_SYMENT = 11, /* Size of one symbol table entry */
DT_INIT = 12, /* Address of init function */ DT_INIT = 12, /* Address of init function */
DT_FINI = 13, /* Address of termination function */ DT_FINI = 13, /* Address of termination function */
DT_REL = 17, /* Relocations which contain no addend */ DT_REL = 17, /* Relocations which contain no addend */
DT_RELSZ = 18, /* Total size of Rel relocs */ DT_RELSZ = 18, /* Total size of Rel relocs */
DT_RELENT = 19, /* Size of one Rel relocation */ DT_RELENT = 19, /* Size of one Rel relocation */
DT_STRSZ = 10, /* Sizeof string table */
DT_PLTREL = 20, /* Type of reloc in PLT */ DT_PLTREL = 20, /* Type of reloc in PLT */
DT_TEXTREL = 22, /* Reloc might modify .text */ DT_TEXTREL = 22, /* Reloc might modify .text */
DT_JMPREL = 23, /* Address of PLT relocs */ DT_JMPREL = 23, /* Address of PLT relocs */
@@ -240,6 +242,13 @@
R_PPC_JMP_SLOT = 21, R_PPC_JMP_SLOT = 21,
R_PPC64_JMP_SLOT = R_PPC_JMP_SLOT, R_PPC64_JMP_SLOT = R_PPC_JMP_SLOT,
R_X86_64_JUMP_SLOT = 7 R_X86_64_JUMP_SLOT = 7
, R_ARM_ABS32 = 2
, R_ARM_GLOB_DAT = 21
, R_AARCH64_ABS64 = 257
, R_AARCH64_GLOB_DAT = 1025
}; };
#endif //} #endif //}
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+846 -157
View File
File diff suppressed because it is too large Load Diff
+17 -5
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -33,7 +33,6 @@
#ifndef __UPX_P_LX_ELF_H //{ #ifndef __UPX_P_LX_ELF_H //{
#define __UPX_P_LX_ELF_H 1 #define __UPX_P_LX_ELF_H 1
class PackLinuxElf : public PackUnix class PackLinuxElf : public PackUnix
{ {
typedef PackUnix super; typedef PackUnix super;
@@ -156,12 +155,16 @@ protected:
Elf32_Phdr const *elf_find_ptype(unsigned type, Elf32_Phdr const *phdr0, unsigned phnum); Elf32_Phdr const *elf_find_ptype(unsigned type, Elf32_Phdr const *phdr0, unsigned phnum);
Elf32_Shdr const *elf_find_section_name(char const *) const; Elf32_Shdr const *elf_find_section_name(char const *) const;
Elf32_Shdr const *elf_find_section_type(unsigned) const; Elf32_Shdr const *elf_find_section_type(unsigned) const;
unsigned check_pt_load(Elf32_Phdr const *);
unsigned check_pt_dynamic(Elf32_Phdr const *); unsigned check_pt_dynamic(Elf32_Phdr const *);
void invert_pt_dynamic(Elf32_Dyn const *); void invert_pt_dynamic(Elf32_Dyn const *);
void const *elf_find_dynamic(unsigned) const; void const *elf_find_dynamic(unsigned) const;
Elf32_Dyn const *elf_has_dynamic(unsigned) const; Elf32_Dyn const *elf_has_dynamic(unsigned) const;
virtual upx_uint64_t elf_unsigned_dynamic(unsigned) const; virtual upx_uint64_t elf_unsigned_dynamic(unsigned) const;
virtual int adjABS(Elf32_Sym *sym, unsigned delta);
char const *get_str_name(unsigned st_name, unsigned symnum) const;
char const *get_dynsym_name(unsigned symnum, unsigned relnum) const;
protected: protected:
Elf32_Ehdr ehdri; // from input file Elf32_Ehdr ehdri; // from input file
MemBuffer lowmem; // especially for shlib MemBuffer lowmem; // especially for shlib
@@ -188,6 +191,8 @@ protected:
Elf32_Shdr *sec_strndx; Elf32_Shdr *sec_strndx;
Elf32_Shdr const *sec_dynsym; Elf32_Shdr const *sec_dynsym;
Elf32_Shdr const *sec_dynstr; Elf32_Shdr const *sec_dynstr;
unsigned symnum_end;
unsigned strtab_end;
__packed_struct(cprElfHdr1) __packed_struct(cprElfHdr1)
Elf32_Ehdr ehdr; Elf32_Ehdr ehdr;
@@ -260,7 +265,8 @@ protected:
virtual void pack4(OutputFile *, Filter &); // append pack header virtual void pack4(OutputFile *, Filter &); // append pack header
virtual void unpack(OutputFile *fo); virtual void unpack(OutputFile *fo);
virtual void unRela64(upx_uint64_t dt_rela, Elf64_Rela *rela0, unsigned relasz, virtual void unRela64(upx_uint64_t dt_rela, Elf64_Rela *rela0, unsigned relasz,
MemBuffer &membuf, upx_uint64_t const load_off, OutputFile *fo); MemBuffer &membuf, upx_uint64_t const load_off, upx_uint64_t const old_dtinit,
OutputFile *fo);
virtual void generateElfHdr( virtual void generateElfHdr(
OutputFile *, OutputFile *,
@@ -287,12 +293,16 @@ protected:
Elf64_Phdr const *elf_find_ptype(unsigned type, Elf64_Phdr const *phdr0, unsigned phnum); Elf64_Phdr const *elf_find_ptype(unsigned type, Elf64_Phdr const *phdr0, unsigned phnum);
Elf64_Shdr const *elf_find_section_name(char const *) const; Elf64_Shdr const *elf_find_section_name(char const *) const;
Elf64_Shdr const *elf_find_section_type(unsigned) const; Elf64_Shdr const *elf_find_section_type(unsigned) const;
upx_uint64_t check_pt_load(Elf64_Phdr const *);
upx_uint64_t check_pt_dynamic(Elf64_Phdr const *); upx_uint64_t check_pt_dynamic(Elf64_Phdr const *);
void invert_pt_dynamic(Elf64_Dyn const *); void invert_pt_dynamic(Elf64_Dyn const *);
void const *elf_find_dynamic(unsigned) const; void const *elf_find_dynamic(unsigned) const;
Elf64_Dyn const *elf_has_dynamic(unsigned) const; Elf64_Dyn const *elf_has_dynamic(unsigned) const;
virtual upx_uint64_t elf_unsigned_dynamic(unsigned) const; virtual upx_uint64_t elf_unsigned_dynamic(unsigned) const;
virtual int adjABS(Elf64_Sym *sym, unsigned delta);
char const *get_str_name(unsigned st_name, unsigned symnum) const;
char const *get_dynsym_name(unsigned symnum, unsigned relnum) const;
protected: protected:
Elf64_Ehdr ehdri; // from input file Elf64_Ehdr ehdri; // from input file
MemBuffer lowmem; // especially for shlib MemBuffer lowmem; // especially for shlib
@@ -319,6 +329,8 @@ protected:
Elf64_Shdr *sec_strndx; Elf64_Shdr *sec_strndx;
Elf64_Shdr const *sec_dynsym; Elf64_Shdr const *sec_dynsym;
Elf64_Shdr const *sec_dynstr; Elf64_Shdr const *sec_dynstr;
unsigned symnum_end;
unsigned strtab_end;
__packed_struct(cprElfHdr1) __packed_struct(cprElfHdr1)
Elf64_Ehdr ehdr; Elf64_Ehdr ehdr;
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2001-2018 John F. Reiser Copyright (C) 2001-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+172 -153
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 2004-2018 John Reiser Copyright (C) 2004-2020 John Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -269,84 +269,22 @@ PackMachBase<T>::addStubEntrySections(Filter const *)
addLoader("ELFMAINY,IDENTSTR,+40,ELFMAINZ,FOLDEXEC", NULL); addLoader("ELFMAINY,IDENTSTR,+40,ELFMAINZ,FOLDEXEC", NULL);
} }
void PackMachI386::addStubEntrySections(Filter const *ft) void PackMachI386::addStubEntrySections(Filter const * /*ft*/)
{ {
int const n_mru = ft->n_mru; // FIXME: belongs to filter? packerf? addLoader("MACHMAINX", NULL); // different for MY_DYLIB vs MH_EXECUTE
if (my_filetype==Mach_header::MH_EXECUTE) {
if (Mach_header::MH_EXECUTE == my_filetype) { addLoader("MACH_UNC", NULL);
addLoader("I386BXX0", NULL); // .word offset to f_exp
} }
else { //addLoader(getDecompressorSections(), NULL);
addLoader("LEXEC000", NULL); // entry to stub addLoader(
} ( M_IS_NRV2E(ph.method) ? "NRV_HEAD,NRV2E,NRV_TAIL"
if (ft->id) { // decompr, unfilter are separate : M_IS_NRV2D(ph.method) ? "NRV_HEAD,NRV2D,NRV_TAIL"
if (Mach_header::MH_EXECUTE != my_filetype) { : M_IS_NRV2B(ph.method) ? "NRV_HEAD,NRV2B,NRV_TAIL"
addLoader("LXUNF000", NULL); // 2-byte jump to f_exp : M_IS_LZMA(ph.method) ? "LZMA_ELF00,LZMA_DEC20,LZMA_DEC30"
} : NULL), NULL);
addLoader("LXUNF002", NULL); // entry to f_unf if (hasLoaderSection("CFLUSH"))
// prolog to f_unf addLoader("CFLUSH");
if (0x80==(ft->id & 0xF0)) { addLoader("MACHMAINY,IDENTSTR,+40,MACHMAINZ,FOLDEXEC", NULL);
if (256==n_mru) {
addLoader("MRUBYTE0", NULL);
}
else if (n_mru) {
addLoader("LXMRU005", NULL);
}
if (n_mru) {
addLoader("LXMRU006", NULL);
}
else {
addLoader("LXMRU007", NULL);
}
}
else {
if (0x40==(ft->id & 0xF0)) {
addLoader("LXUNF008", NULL);
}
}
if (Mach_header::MH_EXECUTE == my_filetype) {
addFilter32(ft->id); // f_unf body
if (0x80==(ft->id & 0xF0)) {
if (0==n_mru) {
addLoader("LXMRU058", NULL);
}
}
addLoader("LXUNF035", NULL); // epilog to f_unf
}
else { // MH_DYLIB
addLoader("LXUNF010", NULL); // jmp32 lxunf0 # to rest of f_unf
if (n_mru) {
addLoader("LEXEC009", NULL); // empty (unify source with other cases)
}
}
}
if (Mach_header::MH_EXECUTE == my_filetype) {
addLoader("I386BXX1", NULL);
}
addLoader("LEXEC010", NULL); // prolog to f_exp
addLoader(getDecompressorSections(), NULL);
addLoader("LEXEC015", NULL); // epilog to f_exp
if (ft->id) {
if (Mach_header::MH_EXECUTE != my_filetype) {
if (0x80!=(ft->id & 0xF0)) {
addLoader("LXUNF042", NULL); // lxunf0:
}
addFilter32(ft->id); // body of f_unf
if (0x80==(ft->id & 0xF0)) {
if (0==n_mru) {
addLoader("LXMRU058", NULL);
}
}
addLoader("LXUNF035", NULL); // epilog to f_unf
}
}
else {
addLoader("LEXEC017", NULL); // epilog to f_exp
}
addLoader("IDENTSTR", NULL);
addLoader("LEXEC020", NULL);
addLoader("FOLDEXEC", NULL);
} }
void PackMachAMD64::addStubEntrySections(Filter const * /*ft*/) void PackMachAMD64::addStubEntrySections(Filter const * /*ft*/)
@@ -517,19 +455,18 @@ PackMachBase<T>::compare_segment_command(void const *const aa, void const *const
if (xa < xb) return -1; // LC_SEGMENT first if (xa < xb) return -1; // LC_SEGMENT first
if (xa > xb) return 1; if (xa > xb) return 1;
if (0 != xa) return 0; // not LC_SEGMENT if (0 != xa) return 0; // not LC_SEGMENT
// Beware 0==.vmsize (some MacOSX __DWARF debug info: a "comment") // Ascending by .fileoff so that find_SEGMENT_gap works
if (a->vmsize!=0 && b->vmsize!=0) { if (a->fileoff < b->fileoff)
if (a->vmaddr < b->vmaddr) return -1; // ascending by .vmaddr
if (a->vmaddr > b->vmaddr) return 1;
}
else { // 0==.vmsize goes last, except ordered by fileoff
if (a->vmsize) return -1; // 'a' is first
if (b->vmsize) return 1; // 'a' is last
if (a->fileoff < b->fileoff)
return -1; return -1;
if (a->fileoff > b->fileoff) if (a->fileoff > b->fileoff)
return 1; return 1;
} // Ascending by .vmaddr
if (a->vmaddr < b->vmaddr) return -1;
if (a->vmaddr > b->vmaddr) return 1;
// Descending by .vmsize
if (a->vmsize) return -1; // 'a' is first
if (b->vmsize) return 1; // 'a' is last
// What could remain?
return 0; return 0;
} }
@@ -551,13 +488,14 @@ PackMachBase<T>::compare_segment_command(void const *const aa, void const *const
#define PAGE_MASK64 (~(upx_uint64_t)0<<12) #define PAGE_MASK64 (~(upx_uint64_t)0<<12)
#define PAGE_SIZE64 ((upx_uint64_t)0-PAGE_MASK64) #define PAGE_SIZE64 ((upx_uint64_t)0-PAGE_MASK64)
unsigned const blankLINK = 16; // size of our empty __LINK segment
// Note: "readelf --segments" ==> "otool -hl" or "otool -hlv" etc. (Xcode on MacOS) // Note: "readelf --segments" ==> "otool -hl" or "otool -hlv" etc. (Xcode on MacOS)
template <class T> template <class T>
void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader
{ {
// offset of p_info in compressed file // offset of p_info in compressed file
overlay_offset = secTEXT.addr + sizeof(linfo); overlay_offset = secTEXT.offset + sizeof(linfo);
super::pack4(fo, ft); super::pack4(fo, ft);
if (Mach_header::MH_EXECUTE == my_filetype) { if (Mach_header::MH_EXECUTE == my_filetype) {
@@ -581,10 +519,9 @@ void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader
segLINK.fileoff = len; // must be in the file segLINK.fileoff = len; // must be in the file
segLINK.vmaddr = len + segTEXT.vmaddr; segLINK.vmaddr = len + segTEXT.vmaddr;
fo->write(page, 16); len += 16; fo->write(page, blankLINK); len += blankLINK;
// reserve convex hull of input segments segLINK.vmsize = PAGE_SIZE;
segLINK.vmsize -= (segLINK.vmaddr - segTEXT.vmaddr); segLINK.filesize = blankLINK;
segLINK.filesize = 16;
// Get a writeable copy of the stub to make editing easier. // Get a writeable copy of the stub to make editing easier.
ByteArray(upxstub, sz_stub_main); ByteArray(upxstub, sz_stub_main);
@@ -592,9 +529,8 @@ void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader
Mach_header *const mhp = (Mach_header *)upxstub; Mach_header *const mhp = (Mach_header *)upxstub;
mhp->cpusubtype = my_cpusubtype; mhp->cpusubtype = my_cpusubtype;
mhp->flags = mhdro.flags;
char *tail = (char *)(1+ mhp); char *tail = (char *)(1+ mhp);
Mach_section_command *sectxt = 0; // in temp for output
unsigned txt_addr = 0;
char *const lcp_end = mhdro.sizeofcmds + tail; char *const lcp_end = mhdro.sizeofcmds + tail;
Mach_command *lcp = (Mach_command *)(1+ mhp); Mach_command *lcp = (Mach_command *)(1+ mhp);
Mach_command *lcp_next; Mach_command *lcp_next;
@@ -611,10 +547,12 @@ void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader
case Mach_command::LC_SEGMENT: // fall through case Mach_command::LC_SEGMENT: // fall through
case Mach_command::LC_SEGMENT_64: { case Mach_command::LC_SEGMENT_64: {
Mach_segment_command *const segptr = (Mach_segment_command *)lcp; Mach_segment_command *const segptr = (Mach_segment_command *)lcp;
if (!strcmp("__PAGEZERO", segptr->segname)) {
segptr->vmsize = pagezero_vmsize;
}
if (!strcmp("__TEXT", segptr->segname)) { if (!strcmp("__TEXT", segptr->segname)) {
sectxt = (Mach_section_command *)(1+ segptr);
txt_addr = sectxt->addr;
sz_cmd = (segTEXT.nsects * sizeof(secTEXT)) + sizeof(segTEXT); sz_cmd = (segTEXT.nsects * sizeof(secTEXT)) + sizeof(segTEXT);
mhp->sizeofcmds += sizeof(secTEXT) * (1 - segptr->nsects);
memcpy(tail, &segTEXT, sz_cmd); tail += sz_cmd; memcpy(tail, &segTEXT, sz_cmd); tail += sz_cmd;
goto next; goto next;
} }
@@ -623,6 +561,16 @@ void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader
delta = offLINK - segptr->fileoff; // relocation constant delta = offLINK - segptr->fileoff; // relocation constant
sz_cmd = sizeof(segLINK); sz_cmd = sizeof(segLINK);
if (Mach_header::CPU_TYPE_I386==mhdri.cputype
&& Mach_header::MH_EXECUTE==mhdri.filetype) {
segLINK.maxprot = 0
| Mach_command::VM_PROT_EXECUTE
| Mach_command::VM_PROT_WRITE
| Mach_command::VM_PROT_READ;
segLINK.initprot = 0
| Mach_command::VM_PROT_WRITE
| Mach_command::VM_PROT_READ;
}
memcpy(tail, &segLINK, sz_cmd); tail += sz_cmd; memcpy(tail, &segLINK, sz_cmd); tail += sz_cmd;
goto next; goto next;
} }
@@ -673,8 +621,6 @@ void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader
skip = 1; skip = 1;
} break; } break;
case Mach_command::LC_UNIXTHREAD: { // pre-LC_MAIN case Mach_command::LC_UNIXTHREAD: { // pre-LC_MAIN
threado_setPC(secTEXT.addr +
(threadc_getPC(lcp) - txt_addr));
skip = 1; skip = 1;
} break; } break;
case Mach_command::LC_LOAD_DYLIB: { case Mach_command::LC_LOAD_DYLIB: {
@@ -1239,9 +1185,8 @@ void PackMachBase<T>::pack1(OutputFile *const fo, Filter &/*ft*/) // generate e
mhdro = mhdri; mhdro = mhdri;
if (my_filetype==Mach_header::MH_EXECUTE) { if (my_filetype==Mach_header::MH_EXECUTE) {
memcpy(&mhdro, stub_main, sizeof(mhdro)); memcpy(&mhdro, stub_main, sizeof(mhdro));
mhdro.flags = mhdri.flags;
COMPILE_TIME_ASSERT(sizeof(mhdro.flags) == sizeof(unsigned)) COMPILE_TIME_ASSERT(sizeof(mhdro.flags) == sizeof(unsigned))
mhdro.flags &= ~ (unsigned) Mach_header::MH_PIE; // we require fixed address
mhdro.flags |= Mach_header::MH_BINDATLOAD; // DT_BIND_NOW
} }
unsigned pos = sizeof(mhdro); unsigned pos = sizeof(mhdro);
fo->write(&mhdro, sizeof(mhdro)); fo->write(&mhdro, sizeof(mhdro));
@@ -1266,12 +1211,16 @@ void PackMachBase<T>::pack1(OutputFile *const fo, Filter &/*ft*/) // generate e
segTEXT.cmdsize = sizeof(segTEXT) + sizeof(secTEXT); segTEXT.cmdsize = sizeof(segTEXT) + sizeof(secTEXT);
strncpy((char *)segTEXT.segname, "__TEXT", sizeof(segTEXT.segname)); strncpy((char *)segTEXT.segname, "__TEXT", sizeof(segTEXT.segname));
if (my_filetype==Mach_header::MH_EXECUTE) { if (my_filetype==Mach_header::MH_EXECUTE) {
int k; // must ignore zero-length segments, which sort last if (Mach_header::MH_PIE & mhdri.flags) {
for (k=1 /*n_segment*/; --k>=0; ) segTEXT.vmaddr = segZERO.vmsize; // contiguous
if (msegcmd[k].vmsize!=0) }
break; else { // not MH_PIE
segTEXT.vmaddr = PAGE_MASK64 & (~PAGE_MASK64 + // Start above all eventual mappings.
msegcmd[k].vmsize + msegcmd[k].vmaddr ); // Cannot enlarge segZERO.vmsize because MacOS 10.13 (HighSierra)
// won't permit re-map of PAGEZERO.
// Stub will fill with PROT_NONE first.
segTEXT.vmaddr = vma_max;
}
} }
if (my_filetype==Mach_header::MH_DYLIB) { if (my_filetype==Mach_header::MH_DYLIB) {
segTEXT.vmaddr = 0; segTEXT.vmaddr = 0;
@@ -1315,18 +1264,10 @@ void PackMachBase<T>::pack1(OutputFile *const fo, Filter &/*ft*/) // generate e
segLINK = segTEXT; segLINK = segTEXT;
segLINK.cmdsize = sizeof(segLINK); segLINK.cmdsize = sizeof(segLINK);
strncpy((char *)segLINK.segname, "__LINKEDIT", sizeof(segLINK.segname)); strncpy((char *)segLINK.segname, "__LINKEDIT", sizeof(segLINK.segname));
segLINK.nsects = 0;
segLINK.initprot = Mach_command::VM_PROT_READ; segLINK.initprot = Mach_command::VM_PROT_READ;
segLINK.nsects = 0;
segLINK.vmsize = 0;
// Adjust later: .vmaddr .vmsize .fileoff .filesize // Adjust later: .vmaddr .vmsize .fileoff .filesize
upx_uint64_t up(0);
unsigned const ncmds = mhdri.ncmds;
for (unsigned j= 0; j < ncmds; ++j) if (lc_seg == msegcmd[j].cmd) {
upx_uint64_t sup = msegcmd[j].vmsize + msegcmd[j].vmaddr;
if (up < sup) {
up = sup;
segLINK.vmsize = sup - segLINK.vmaddr;
}
}
unsigned gap = 0; unsigned gap = 0;
if (my_filetype == Mach_header::MH_EXECUTE) { if (my_filetype == Mach_header::MH_EXECUTE) {
@@ -1355,8 +1296,10 @@ void PackMachBase<T>::pack1(OutputFile *const fo, Filter &/*ft*/) // generate e
pos += cmdsize; pos += cmdsize;
fo->write((char const *)ptr1, cmdsize); fo->write((char const *)ptr1, cmdsize);
// 400: space for LC_UUID, LC_RPATH, LC_CODE_SIGNATURE, etc.
gap = 400 + threado_size(); gap = 400 + threado_size();
secTEXT.addr = gap + pos; secTEXT.offset = gap + pos;
secTEXT.addr = secTEXT.offset + segTEXT.vmaddr;
break; break;
} }
} }
@@ -1484,7 +1427,7 @@ void PackMachBase<T>::unpack(OutputFile *fo)
} }
} }
// Put LC_SEGMENT together at the beginning, ascending by .vmaddr. // Put LC_SEGMENT together at the beginning
qsort(msegcmd, ncmds, sizeof(*msegcmd), compare_segment_command); qsort(msegcmd, ncmds, sizeof(*msegcmd), compare_segment_command);
n_segment = 0; n_segment = 0;
for (unsigned j= 0; j < ncmds; ++j) { for (unsigned j= 0; j < ncmds; ++j) {
@@ -1499,6 +1442,9 @@ void PackMachBase<T>::unpack(OutputFile *fo)
fi->seek(- (off_t)(sizeof(bhdr) + ph.c_len), SEEK_CUR); fi->seek(- (off_t)(sizeof(bhdr) + ph.c_len), SEEK_CUR);
for (unsigned k = 0; k < ncmds; ++k) { for (unsigned k = 0; k < ncmds; ++k) {
if (msegcmd[k].cmd==lc_seg && msegcmd[k].filesize!=0) { if (msegcmd[k].cmd==lc_seg && msegcmd[k].filesize!=0) {
if (!strcmp("__TEXT", msegcmd[k].segname)) {
segTEXT = msegcmd[k];
}
if (fo) if (fo)
fo->seek(msegcmd[k].fileoff, SEEK_SET); fo->seek(msegcmd[k].fileoff, SEEK_SET);
unpackExtent(msegcmd[k].filesize, fo, total_in, total_out, unpackExtent(msegcmd[k].filesize, fo, total_in, total_out,
@@ -1510,6 +1456,8 @@ void PackMachBase<T>::unpack(OutputFile *fo)
} }
Mach_segment_command const *sc = (Mach_segment_command const *)(void *)(1+ mhdr); Mach_segment_command const *sc = (Mach_segment_command const *)(void *)(1+ mhdr);
if (my_filetype==Mach_header::MH_DYLIB) { // rest of lc_seg are not compressed if (my_filetype==Mach_header::MH_DYLIB) { // rest of lc_seg are not compressed
upx_uint64_t cpr_mod_init_func(0);
TE32 unc_mod_init_func; *(int *)&unc_mod_init_func = 0;
Mach_segment_command const *rc = rawmseg; Mach_segment_command const *rc = rawmseg;
rc = (Mach_segment_command const *)(rc->cmdsize + (char const *)rc); rc = (Mach_segment_command const *)(rc->cmdsize + (char const *)rc);
sc = (Mach_segment_command const *)(sc->cmdsize + (char const *)sc); sc = (Mach_segment_command const *)(sc->cmdsize + (char const *)sc);
@@ -1521,12 +1469,20 @@ void PackMachBase<T>::unpack(OutputFile *fo)
) { ) {
if (lc_seg==rc->cmd if (lc_seg==rc->cmd
&& 0!=rc->filesize ) { && 0!=rc->filesize ) {
if (!strcmp("__DATA", rc->segname)) {
cpr_mod_init_func = get_mod_init_func(rc);
fi->seek(cpr_mod_init_func - 4*sizeof(TE32), SEEK_SET);
fi->readx(&unc_mod_init_func, sizeof(unc_mod_init_func));
}
fi->seek(rc->fileoff, SEEK_SET); fi->seek(rc->fileoff, SEEK_SET);
if (fo) if (fo)
fo->seek(sc->fileoff, SEEK_SET); fo->seek(sc->fileoff, SEEK_SET);
unsigned const len = rc->filesize; unsigned const len = rc->filesize;
MemBuffer data(len); MemBuffer data(len);
fi->readx(data, len); fi->readx(data, len);
if (!strcmp("__DATA", rc->segname)) {
set_te32(&data[o__mod_init_func - rc->fileoff], unc_mod_init_func);
}
if (fo) if (fo)
fo->write(data, len); fo->write(data, len);
} }
@@ -1562,7 +1518,13 @@ int PackMachBase<T>::canUnpack()
my_cpusubtype = mhdri.cpusubtype; my_cpusubtype = mhdri.cpusubtype;
int headway = (int)mhdri.sizeofcmds; int headway = (int)mhdri.sizeofcmds;
if (1024 < headway) { if (headway < (int)(3 * sizeof(Mach_segment_command)
+ sizeof(Mach_main_command))) {
infoWarning("Mach_header.sizeofcmds = %d too small", headway);
throwCantUnpack("file corrupted");
}
sz_mach_headers = headway + sizeof(mhdri);
if (2048 < headway) {
infoWarning("Mach_header.sizeofcmds(%d) > 1024", headway); infoWarning("Mach_header.sizeofcmds(%d) > 1024", headway);
} }
rawmseg = (Mach_segment_command *) New(char, mhdri.sizeofcmds); rawmseg = (Mach_segment_command *) New(char, mhdri.sizeofcmds);
@@ -1578,8 +1540,24 @@ int PackMachBase<T>::canUnpack()
Mach_command const *ptr = (Mach_command const *)rawmseg; Mach_command const *ptr = (Mach_command const *)rawmseg;
for (unsigned j= 0; j < ncmds; for (unsigned j= 0; j < ncmds;
ptr = (Mach_command const *)(ptr->cmdsize + (char const *)ptr), ++j) { ptr = (Mach_command const *)(ptr->cmdsize + (char const *)ptr), ++j) {
Mach_segment_command const *const segptr = (Mach_segment_command const *)ptr; if ((unsigned)headway < ptr->cmdsize) {
infoWarning("bad Mach_command[%u]{@0x%lx,+0x%x}: file_size=0x%lx cmdsize=0x%lx",
j, (unsigned long) (sizeof(mhdri) + ((char const *)ptr - (char const *)rawmseg)), headway,
(unsigned long) file_size, (unsigned long)ptr->cmdsize);
throwCantUnpack("file corrupted");
}
if (lc_seg == ptr->cmd) { if (lc_seg == ptr->cmd) {
Mach_segment_command const *const segptr = (Mach_segment_command const *)ptr;
if ((unsigned long)file_size < segptr->filesize
|| (unsigned long)file_size < segptr->fileoff
|| (unsigned long)file_size < (segptr->filesize + segptr->fileoff)) {
infoWarning("bad Mach_segment_command[%u]{@0x%lx,+0x%x}: file_size=0x%lx cmdsize=0x%lx"
" filesize=0x%lx fileoff=0x%lx",
j, (unsigned long) (sizeof(mhdri) + ((char const *)ptr - (char const *)rawmseg)), headway,
(unsigned long) file_size, (unsigned long)ptr->cmdsize,
(unsigned long)segptr->filesize, (unsigned long)segptr->fileoff);
throwCantUnpack("file corrupted");
}
++nseg; ++nseg;
if (!strcmp("__XHDR", segptr->segname)) { if (!strcmp("__XHDR", segptr->segname)) {
// PackHeader precedes __LINKEDIT (pre-Sierra MacOS 10.12) // PackHeader precedes __LINKEDIT (pre-Sierra MacOS 10.12)
@@ -1595,6 +1573,9 @@ int PackMachBase<T>::canUnpack()
} }
if (!strcmp("__LINKEDIT", segptr->segname)) { if (!strcmp("__LINKEDIT", segptr->segname)) {
offLINK = segptr->fileoff; offLINK = segptr->fileoff;
if (segptr->filesize == blankLINK) {
style = 395;
}
if (offLINK < (off_t) pos_next) { if (offLINK < (off_t) pos_next) {
offLINK = pos_next; offLINK = pos_next;
} }
@@ -1611,7 +1592,7 @@ int PackMachBase<T>::canUnpack()
rip = entryVMA = threadc_getPC(ptr); rip = entryVMA = threadc_getPC(ptr);
} }
} }
if (3==nseg) { // __PAGEZERO, __TEXT, __LINKEDIT; no __XHDR, no UPX_DATA if (3==nseg && 395 != style) { // __PAGEZERO, __TEXT, __LINKEDIT; no __XHDR, no UPX_DATA
style = 392; style = 392;
} }
if (391==style && 0==offLINK && 2==ncmds) { // pre-3.91 ? if (391==style && 0==offLINK && 2==ncmds) { // pre-3.91 ?
@@ -1626,11 +1607,19 @@ int PackMachBase<T>::canUnpack()
if (391 == style) { // PackHeader precedes __LINKEDIT if (391 == style) { // PackHeader precedes __LINKEDIT
fi->seek(offLINK - bufsize, SEEK_SET); fi->seek(offLINK - bufsize, SEEK_SET);
} else } else
if (392 == style) { // PackHeader follows loader at __LINKEDIT if (392 == style) {
if ((off_t)bufsize > (fi->st_size() - offLINK)) { if (MH_DYLIB == my_filetype) {
bufsize = fi->st_size() - offLINK; fi->seek(fi->st_size() - bufsize, SEEK_SET);
} }
fi->seek(offLINK, SEEK_SET); else { // PackHeader follows loader at __LINKEDIT
if ((off_t)bufsize > (fi->st_size() - offLINK)) {
bufsize = fi->st_size() - offLINK;
}
fi->seek(offLINK, SEEK_SET);
}
} else
if (395 == style) {
fi->seek(offLINK - bufsize - sizeof(PackHeader), SEEK_SET);
} }
MemBuffer buf(bufsize); MemBuffer buf(bufsize);
@@ -1726,24 +1715,64 @@ int PackMachBase<T>::canUnpack()
} }
} }
} }
overlay_offset = 0;
} }
} }
overlay_offset = 0; // impossible value
int l = ph.buf_offset + ph.getPackHeaderSize(); int l = ph.buf_offset + ph.getPackHeaderSize();
if (l < 0 || (unsigned)(l + 4) > bufsize) if (0 <= l && (unsigned)(l + sizeof(TE32)) <=bufsize) {
overlay_offset = get_te32(buf + i + l);
}
if ( overlay_offset < sz_mach_headers
|| (off_t)overlay_offset >= file_size) {
infoWarning("file corrupted");
MemBuffer buf2(umin(1<<14, file_size));
fi->seek(sz_mach_headers, SEEK_SET);
fi->readx(buf2, buf2.getSize());
unsigned const *p = (unsigned const *)&buf2[0];
unsigned const *const e_buf2 = (unsigned const *)&buf2[buf2.getSize() - 4*sizeof(*p)];
for (; p <= e_buf2; ++p)
if ( 0==p[0] // p_info.p_progid
&& 0!=p[1] // p_info.p_filesize
&& p[2]==p[1] // p_info.p_blocksize == p_info.p_filesize
&& (unsigned)file_size < get_te32(&p[1]) // compression was worthwhile
&& sz_mach_headers==get_te32(&p[3]) // b_info.sz_unc
) {
overlay_offset = ((char const *)p - (char const *)&buf2[0]) + sz_mach_headers;
if (!(3&overlay_offset // not word aligned
|| overlay_offset < sz_mach_headers
|| (off_t)overlay_offset >= file_size)) {
infoWarning("attempting recovery, overlay_offset = %#x", overlay_offset);
return true;
}
}
throwCantUnpack("file corrupted"); throwCantUnpack("file corrupted");
overlay_offset = get_te32(buf + i + l); }
if ((off_t)overlay_offset >= file_size)
throwCantUnpack("file corrupted");
return true; return true;
} }
#define WANT_MACH_SEGMENT_ENUM #define WANT_MACH_SEGMENT_ENUM
#define WANT_MACH_SECTION_ENUM #define WANT_MACH_SECTION_ENUM
#include "p_mach_enum.h" #include "p_mach_enum.h"
template <class T>
upx_uint64_t PackMachBase<T>::get_mod_init_func(Mach_segment_command const *segptr)
{
for (Mach_section_command const *secptr = (Mach_section_command const *)(1+ segptr);
ptr_udiff(secptr, segptr) < segptr->cmdsize;
++secptr
) {
if (sizeof(Addr) == secptr->size
&& !strcmp("__mod_init_func", secptr->sectname)) {
o__mod_init_func = secptr->offset;
fi->seek(o__mod_init_func, SEEK_SET);
Addr tmp;
fi->readx(&tmp, sizeof(Addr));
return tmp;
}
}
return 0;
}
template <class T> template <class T>
bool PackMachBase<T>::canPack() bool PackMachBase<T>::canPack()
{ {
@@ -1788,17 +1817,7 @@ bool PackMachBase<T>::canPack()
if (lc_seg == segptr->cmd) { if (lc_seg == segptr->cmd) {
msegcmd[j] = *segptr; msegcmd[j] = *segptr;
if (!strcmp("__DATA", segptr->segname)) { if (!strcmp("__DATA", segptr->segname)) {
for (Mach_section_command const *secptr = (Mach_section_command const *)(1+ segptr); prev_mod_init_func = get_mod_init_func(segptr);
ptr_udiff(secptr, segptr) < segptr->cmdsize;
++secptr
) {
if (sizeof(Addr) == secptr->size
&& !strcmp("__mod_init_func", secptr->sectname)) {
o__mod_init_func = secptr->offset;
fi->seek(o__mod_init_func, SEEK_SET);
fi->readx(&prev_mod_init_func, sizeof(Addr));
}
}
} }
} }
else { else {
@@ -1829,7 +1848,7 @@ bool PackMachBase<T>::canPack()
return false; return false;
} }
// Put LC_SEGMENT together at the beginning, ascending by .vmaddr. // Put LC_SEGMENT together at the beginning
qsort(msegcmd, ncmds, sizeof(*msegcmd), compare_segment_command); qsort(msegcmd, ncmds, sizeof(*msegcmd), compare_segment_command);
if (lc_seg==msegcmd[0].cmd && 0==msegcmd[0].vmaddr if (lc_seg==msegcmd[0].cmd && 0==msegcmd[0].vmaddr
@@ -1838,22 +1857,22 @@ bool PackMachBase<T>::canPack()
} }
// Check alignment of non-null LC_SEGMENT. // Check alignment of non-null LC_SEGMENT.
vma_max = 0;
for (unsigned j= 0; j < ncmds; ++j) { for (unsigned j= 0; j < ncmds; ++j) {
if (lc_seg==msegcmd[j].cmd) { if (lc_seg==msegcmd[j].cmd) {
if (msegcmd[j].vmsize==0) ++n_segment;
break; // was sorted last
if (~PAGE_MASK & (msegcmd[j].fileoff | msegcmd[j].vmaddr)) { if (~PAGE_MASK & (msegcmd[j].fileoff | msegcmd[j].vmaddr)) {
return false; return false;
} }
upx_uint64_t t = msegcmd[j].vmsize + msegcmd[j].vmaddr;
// We used to check that LC_SEGMENTS were contiguous, if (vma_max < t) {
// but apparently that is not needed anymore, vma_max = t;
// and Google compilers generate strange layouts. }
// Segments need not be contigous {esp. "rust")
++n_segment;
sz_segment = msegcmd[j].filesize + msegcmd[j].fileoff - msegcmd[0].fileoff; sz_segment = msegcmd[j].filesize + msegcmd[j].fileoff - msegcmd[0].fileoff;
} }
} }
vma_max = PAGE_MASK & (~PAGE_MASK + vma_max);
// info: currently the header is 36 (32+4) bytes before EOF // info: currently the header is 36 (32+4) bytes before EOF
unsigned char buf[256]; unsigned char buf[256];
+4 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -780,6 +780,7 @@ public:
virtual bool canPack(); virtual bool canPack();
virtual int canUnpack(); virtual int canUnpack();
virtual upx_uint64_t get_mod_init_func(Mach_segment_command const *segptr);
virtual unsigned find_SEGMENT_gap(unsigned const k, unsigned pos_eof); virtual unsigned find_SEGMENT_gap(unsigned const k, unsigned pos_eof);
protected: protected:
@@ -822,6 +823,7 @@ protected:
unsigned o__mod_init_func; // file offset to __DATA.__mod_init_func Mach_section_command unsigned o__mod_init_func; // file offset to __DATA.__mod_init_func Mach_section_command
upx_uint64_t prev_mod_init_func; upx_uint64_t prev_mod_init_func;
upx_uint64_t pagezero_vmsize; upx_uint64_t pagezero_vmsize;
upx_uint64_t vma_max; // max over (.vmsize + .vmaddr)
Mach_header mhdri; Mach_header mhdri;
Mach_header mhdro; Mach_header mhdro;
+1 -1
View File
@@ -2,7 +2,7 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 2007-2018 John F. Reiser Copyright (C) 2007-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2002-2018 Jens Medoch Copyright (C) 2002-2020 Jens Medoch
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+3 -3
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2002-2018 Jens Medoch Copyright (C) 2002-2020 Jens Medoch
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+4 -4
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser Copyright (C) 2000-2020 John F. Reiser
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -63,7 +63,7 @@ bool PackUnix::canPack()
if (exetype == 0) if (exetype == 0)
return false; return false;
#if defined(__unix__) #if defined(__unix__) && !defined(__MSYS2__)
// must be executable by owner // must be executable by owner
if ((fi->st.st_mode & S_IXUSR) == 0) if ((fi->st.st_mode & S_IXUSR) == 0)
throwCantPack("file not executable; try 'chmod +x'"); throwCantPack("file not executable; try 'chmod +x'");
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+9 -6
View File
@@ -2,9 +2,9 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 2004-2018 John Reiser Copyright (C) 2004-2020 John Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
@@ -111,9 +111,11 @@ typename T::Shdr const *PackVmlinuxBase<T>::getElfSections()
int j; int j;
for (p = shdri, j= ehdri.e_shnum; --j>=0; ++p) { for (p = shdri, j= ehdri.e_shnum; --j>=0; ++p) {
if (Shdr::SHT_STRTAB==p->sh_type if (Shdr::SHT_STRTAB==p->sh_type
&& (p->sh_size + p->sh_offset) <= (unsigned long)file_size && p->sh_offset < (unsigned long)file_size
&& p->sh_name < p->sh_size && p->sh_size <= ((unsigned long)file_size - p->sh_offset)
&& (10+ p->sh_name) <= p->sh_size // 1+ strlen(".shstrtab") && p->sh_name < (unsigned long)file_size
&& 10 <= ((unsigned long)file_size - p->sh_name)
// 10 == (1+ strlen(".shstrtab"))
) { ) {
delete [] shstrtab; delete [] shstrtab;
shstrtab = new char[1+ p->sh_size]; shstrtab = new char[1+ p->sh_size];
@@ -577,6 +579,7 @@ int PackVmlinuxBase<T>::canUnpack()
Shdr *p; Shdr *p;
for (p= shdri, j= ehdri.e_shnum; --j>=0; ++p) { for (p= shdri, j= ehdri.e_shnum; --j>=0; ++p) {
if ((unsigned)file_size < (p->sh_size + p->sh_offset) if ((unsigned)file_size < (p->sh_size + p->sh_offset)
|| (5+ p->sh_name) < p->sh_name // wrap: ignore malformed
|| shstrsec->sh_size < (5+ p->sh_name) ) { || shstrsec->sh_size < (5+ p->sh_name) ) {
continue; continue;
} }
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them
+2 -2
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2020 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar Copyright (C) 1996-2020 Laszlo Molnar
All Rights Reserved. All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them UPX and the UCL library are free software; you can redistribute them

Some files were not shown because too many files have changed in this diff Show More