Merge branch 'devel' of https://github.com/upx/upx into devel

This commit is contained in:
John Reiser 2018-01-21 10:30:42 -08:00
commit e4b23f7a47
390 changed files with 1010 additions and 993 deletions

View File

@ -14,10 +14,8 @@ environment:
- { 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-x64, CL_VERSION: 19.00, VS_VERSION: 2015 }
- { C: msvc-15.0-x86, CL_VERSION: 19.10, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 }
- { C: msvc-15.0-x64, CL_VERSION: 19.10, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 }
# - { C: gcc-4.9-m32, T: SKIP }
# - { C: gcc-4.9-m64, T: SKIP }
- { C: msvc-14.1-x86, CL_VERSION: 19.12, 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 }
UPX_AUTOMATIC_BUILDS_SSL_KEY:
secure: PZMpVeqnEYe39kK+Zu2/fnmZ6/HG6Lvls0hh9GMVU9vCWsr8xaU7kIbHBS01puUkb4bEWPILKYvSEDuhOhguDjd/P4QdXWipvV/F2GaVax0=
UPX_AUTOMATIC_BUILDS_SSL_IV:
@ -58,17 +56,11 @@ install:
- if "%C%"=="msvc-12.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 )
- if "%C%"=="msvc-14.0-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 )
- if "%C%"=="msvc-14.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 )
- if "%C%"=="msvc-15.0-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 )
- if "%C%"=="msvc-15.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\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-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 )
build_script:
- cd c:\projects\upx
- if "%C%"=="gcc-4.9-m32" set PATH=c:\cygwin\bin;%PATH%
- if "%C%"=="gcc-4.9-m32" bash -x ./.github/travis_build.sh
- if "%C%"=="gcc-4.9-m32" exit
- if "%C%"=="gcc-4.9-m64" set PATH=c:\cygwin\bin;%PATH%
- if "%C%"=="gcc-4.9-m64" bash -x ./.github/travis_build.sh
- if "%C%"=="gcc-4.9-m64" exit
# setup directories following the VPATH build in travis_build.sh
- where cl & where link
- set BDIR=c:\projects\build\%C%\%B%
@ -89,7 +81,7 @@ build_script:
- set s=c:\projects\upx\src
- cat .GITREV.txt
- set /p GITREV=<.GITREV.txt
- cl -MT -EHsc -J -O2 -W4 -WX -DUPX_VERSION_GITREV="""%GITREV%""" %DEFS% -DWITH_LZMA=0x443 -DUCL_NO_ASM -I%s%\lzma-sdk -Ic:\projects\deps\ucl-1.03\include -Ic:\projects\deps\zlib-1.2.8 -Feupx.exe %s%\*.cpp %BDIR%\ucl-1.03\ucl.lib %BDIR%\zlib-1.2.8\zlib.lib
- cl -MT -EHsc -J -O2 -W4 -WX -DUPX_VERSION_GITREV="""%GITREV%""" %DEFS% -DUCL_NO_ASM -I%s%\lzma-sdk -Ic:\projects\deps\ucl-1.03\include -Ic:\projects\deps\zlib-1.2.8 -Feupx.exe %s%\*.cpp %BDIR%\ucl-1.03\ucl.lib %BDIR%\zlib-1.2.8\zlib.lib
test_script:
- set UPX=--no-color --no-progress

View File

@ -137,13 +137,13 @@ if [[ -z $BM_CROSS ]]; then
case $BM_C in
clang | clang-m?? | clang-3.4-m?? | clang-[6789][0-9][0-9]-m??)
CC="clang"; CXX="clang++" ;; # standard system compiler
clang-[3].[0-9]-m??)
clang-[345].[0-9]-m??)
v=${BM_C:6:3}; 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-[56]-m?? | gcc-[56]-mx32)
gcc-[567]-m?? | gcc-[567]-mx32)
v=${BM_C:4:1}; CC="gcc-$v"; CXX="g++-$v" ;;
esac
fi

View File

@ -7,7 +7,8 @@ language: cpp
notifications: { email: { on_success: never, on_failure: change } }
.ubuntu_toolchain_sources: &S
# Ubuntu 12.04 LTS "Precise"
.ubuntu_precise_toolchain_sources: &PS
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
- llvm-toolchain-precise-3.6
@ -15,6 +16,11 @@ notifications: { email: { on_success: never, on_failure: change } }
- llvm-toolchain-precise-3.8
- llvm-toolchain-precise-3.9
# Ubuntu 14.04 LTS "Trusty"
.ubuntu_trusty_toolchain_sources: &TS
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
env:
global:
- CROSS= C= B= T= X=
@ -25,7 +31,6 @@ matrix:
fast_finish: true
include:
- os: linux
sudo: required
dist: trusty
compiler: gcc
env: X=rebuild-stubs
@ -33,19 +38,19 @@ matrix:
- os: linux
compiler: gcc
env: C=gcc-4.4-m32
addons: { apt: { sources: *S, packages: [ "g++-4.4-multilib", "zlib1g-dev:i386" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.4-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: gcc
env: C=gcc-4.4-m64
addons: { apt: { sources: *S, packages: [ "g++-4.4" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.4" ] } }
- os: linux
compiler: gcc
env: C=gcc-4.5-m32
addons: { apt: { sources: *S, packages: [ "g++-4.5-multilib", "zlib1g-dev:i386" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.5-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: gcc
env: C=gcc-4.5-m64
addons: { apt: { sources: *S, packages: [ "g++-4.5" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.5" ] } }
- os: linux
compiler: gcc
env: C=gcc-4.6-m32
@ -56,21 +61,20 @@ matrix:
- os: linux
compiler: gcc
env: C=gcc-4.7-m32
addons: { apt: { sources: *S, packages: [ "g++-4.7-multilib", "zlib1g-dev:i386" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.7-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: gcc
env: C=gcc-4.7-m64
addons: { apt: { sources: *S, packages: [ "g++-4.7" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.7" ] } }
- os: linux
compiler: gcc
env: C=gcc-4.8-m32
addons: { apt: { sources: *S, packages: [ "g++-4.8-multilib", "zlib1g-dev:i386" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.8-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: gcc
env: C=gcc-4.8-m64
addons: { apt: { sources: *S, packages: [ "g++-4.8" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.8" ] } }
- os: linux
sudo: required
dist: trusty
compiler: gcc
env: C=gcc-4.8-mx32
@ -78,47 +82,57 @@ matrix:
- os: linux
compiler: gcc
env: C=gcc-4.9-m32
addons: { apt: { sources: *S, packages: [ "g++-4.9-multilib", "zlib1g-dev:i386" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.9-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: gcc
env: C=gcc-4.9-m64
addons: { apt: { sources: *S, packages: [ "g++-4.9" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-4.9" ] } }
- os: linux
compiler: gcc
env: C=gcc-5-m32
addons: { apt: { sources: *S, packages: [ "g++-5-multilib", "zlib1g-dev:i386" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-5-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: gcc
env: C=gcc-5-m64
addons: { apt: { sources: *S, packages: [ "g++-5" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-5" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m32
addons: { apt: { sources: *S, packages: [ "g++-6-multilib", "zlib1g-dev:i386" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-6-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m32 B=debug
addons: { apt: { sources: *S, packages: [ "g++-6-multilib", "zlib1g-dev:i386" ] } }
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: *S, packages: [ "g++-6" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=debug+sanitize
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=sanitize
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=valgrind T=valgrind
addons: { apt: { sources: *S, packages: [ "g++-6", valgrind ] } }
addons: { apt: { sources: *PS, packages: [ "g++-6", valgrind ] } }
- os: linux
dist: trusty
compiler: gcc
env: C=gcc-7-m32
addons: { apt: { sources: *TS, packages: [ "g++-7-multilib", "zlib1g-dev:i386" ] } }
- os: linux
dist: trusty
compiler: gcc
env: C=gcc-7-m64
addons: { apt: { sources: *TS, packages: [ "g++-7" ] } }
- os: linux
compiler: clang
env: C=clang-3.4-m32
@ -129,59 +143,69 @@ matrix:
- os: linux
compiler: clang
env: C=clang-3.5-m32
addons: { apt: { sources: *S, 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
compiler: clang
env: C=clang-3.5-m64
addons: { apt: { sources: *S, packages: [ "clang-3.5" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.5" ] } }
- os: linux
compiler: clang
env: C=clang-3.6-m32
addons: { apt: { sources: *S, 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
compiler: clang
env: C=clang-3.6-m64
addons: { apt: { sources: *S, packages: [ "clang-3.6" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.6" ] } }
- os: linux
compiler: clang
env: C=clang-3.7-m32
addons: { apt: { sources: *S, 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
compiler: clang
env: C=clang-3.7-m64
addons: { apt: { sources: *S, packages: [ "clang-3.7" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.7" ] } }
- os: linux
compiler: clang
env: C=clang-3.8-m32
addons: { apt: { sources: *S, 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
compiler: clang
env: C=clang-3.8-m64
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.8" ] } }
- os: linux
compiler: clang
env: C=clang-3.9-m32
addons: { apt: { sources: *S, packages: [ "clang-3.9", "g++-6-multilib", "zlib1g-dev:i386" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.9", "g++-6-multilib", "zlib1g-dev:i386" ] } }
- os: linux
compiler: clang
env: C=clang-3.9-m64
addons: { apt: { sources: *S, packages: [ "clang-3.9" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } }
- os: linux
compiler: clang
env: C=clang-3.9-m64 B=debug+sanitize
addons: { apt: { sources: *S, packages: [ "clang-3.9" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } }
- os: linux
compiler: clang
env: C=clang-3.9-m64 B=sanitize
addons: { apt: { sources: *S, packages: [ "clang-3.9" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } }
- os: linux
compiler: clang
env: C=clang-3.9-m64 B=debug+scan-build
addons: { apt: { sources: *S, packages: [ "clang-3.9" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } }
- os: linux
compiler: clang
env: C=clang-3.9-m64 B=scan-build
addons: { apt: { sources: *S, packages: [ "clang-3.9" ] } }
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } }
- os: linux
dist: trusty
compiler: clang
env: C=clang-5.0-m32
addons: { apt: { sources: *TS, packages: [ "clang-5.0", "g++-7-multilib", "zlib1g-dev:i386" ] } }
- os: linux
dist: trusty
compiler: clang
env: C=clang-5.0-m64
addons: { apt: { sources: *TS, packages: [ "clang-5.0" ] } }
- os: linux
compiler: gcc
env: CROSS=arm-linux-gnueabi C=gcc-4.6 T=qemu
@ -225,11 +249,11 @@ matrix:
compiler: clang
env: C=clang-802-m64
- os: osx
osx_image: xcode9
osx_image: xcode9.2
compiler: clang
env: C=clang-900-m32
- os: osx
osx_image: xcode9
osx_image: xcode9.2
compiler: clang
env: C=clang-900-m64

2
BUGS
View File

@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables
Copyright (c) 1996-2017 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io

View File

@ -1,7 +1,7 @@
#
# UPX toplevel Makefile - needs GNU make 3.81 or better
#
# Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
#
MAKEFLAGS += -rR

View File

@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables
Copyright (c) 1996-2017 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io

8
README
View File

@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables
Copyright (c) 1996-2017 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io
@ -103,9 +103,9 @@ THE FUTURE
COPYRIGHT
=========
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
This program may be used freely, and you are welcome to
redistribute it under certain conditions.

View File

@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables
Copyright (c) 1996-2017 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io

2
THANKS
View File

@ -8,7 +8,7 @@
The Ultimate Packer for eXecutables
Copyright (c) 1996-2017 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io

View File

@ -1,5 +1,5 @@
Decompressing ELF Directly to Memory on Linux/x86
Copyright (C) 2000-2017 John F. Reiser jreiser@BitWagon.com
Copyright (C) 2000-2018 John F. Reiser jreiser@BitWagon.com
References:
<elf.h> definitions for the ELF file format

View File

@ -13,7 +13,7 @@ B<upx> S<[ I<command> ]> S<[ I<options> ]> I<filename>...
=head1 ABSTRACT
The Ultimate Packer for eXecutables
Copyright (c) 1996-2017 Markus Oberhumer, Laszlo Molnar & John Reiser
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser
https://upx.github.io
@ -934,13 +934,13 @@ Please report all bugs immediately to the authors.
=head1 COPYRIGHT
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 2000-2018 John F. Reiser
Copyright (C) 2002-2017 Jens Medoch
Copyright (C) 2002-2018 Jens Medoch
This program may be used freely, and you are welcome to
redistribute it under certain conditions.

View File

@ -1,7 +1,7 @@
#
# UPX Makefile - needs GNU make 3.81 or better
#
# Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
#
# build configuration options for this Makefile

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -43,8 +43,6 @@
void lzma_compress_config_t::reset()
{
memset(this, 0, sizeof(*this));
pos_bits.reset();
lit_pos_bits.reset();
lit_context_bits.reset();
@ -111,11 +109,11 @@ static int prepare(lzma_compress_result_t *res,
res->num_fast_bytes = 64; // 5 .. 273
res->match_finder_cycles = 0;
// UPX overrides
res->pos_bits = lzma_compress_config_t::pos_bits_t::default_value_c;
res->lit_pos_bits = lzma_compress_config_t::lit_pos_bits_t::default_value_c;
res->lit_context_bits = lzma_compress_config_t::lit_context_bits_t::default_value_c;
res->dict_size = lzma_compress_config_t::dict_size_t::default_value_c;
res->num_fast_bytes = lzma_compress_config_t::num_fast_bytes_t::default_value_c;
res->pos_bits = lzma_compress_config_t::pos_bits_t::default_value;
res->lit_pos_bits = lzma_compress_config_t::lit_pos_bits_t::default_value;
res->lit_context_bits = lzma_compress_config_t::lit_context_bits_t::default_value;
res->dict_size = lzma_compress_config_t::dict_size_t::default_value;
res->num_fast_bytes = lzma_compress_config_t::num_fast_bytes_t::default_value;
// method overrides
if (method >= 0x100) {
res->pos_bits = (method >> 16) & 15;
@ -201,6 +199,12 @@ static int prepare(lzma_compress_result_t *res,
}
}
lzma_compress_config_t::pos_bits_t::assertValue(res->pos_bits);
lzma_compress_config_t::lit_pos_bits_t::assertValue(res->lit_pos_bits);
lzma_compress_config_t::lit_context_bits_t::assertValue(res->lit_context_bits);
lzma_compress_config_t::dict_size_t::assertValue(res->dict_size);
lzma_compress_config_t::num_fast_bytes_t::assertValue(res->num_fast_bytes);
res->num_probs = 1846 + (768 << (res->lit_context_bits + res->lit_pos_bits));
//printf("\nlzma_compress config: %u %u %u %u %u\n", res->pos_bits, res->lit_pos_bits, res->lit_context_bits, res->dict_size, res->num_probs);
return 0;

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -33,7 +33,7 @@
void zlib_compress_config_t::reset()
{
memset(this, 0, sizeof(*this));
mem_clear(this, sizeof(*this));
mem_level.reset();
window_bits.reset();

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -480,24 +480,27 @@ struct upx_callback_t
// compression - config_t
**************************************************************************/
template <class T, T default_value, T min_value, T max_value>
template <class T, T default_value_, T min_value_, T max_value_>
struct OptVar
{
typedef T value_type;
static const T default_value_c = default_value;
static const T min_value_c = min_value;
static const T max_value_c = max_value;
static const T default_value = default_value_;
static const T min_value = min_value_;
static const T max_value = max_value_;
void assertValue() const {
static void assertValue(const T &v) {
// info: this generates annoying warnings "unsigned >= 0 is always true"
//assert(v >= min_value_c);
assert(v == min_value_c || v >= min_value_c + 1);
assert(v <= max_value_c);
//assert(v >= min_value);
assert(v == min_value || v >= min_value + 1);
assert(v <= max_value);
}
void assertValue() const {
assertValue(v);
}
OptVar() : v(default_value), is_set(0) { }
OptVar& operator= (const T other) {
v = other; is_set += 1;
OptVar& operator= (const T &other) {
v = other; is_set = 1;
assertValue();
return *this;
}
@ -513,10 +516,10 @@ struct OptVar
// optional assignments
template <class T, T a, T b, T c>
inline void oassign(OptVar<T,a,b,c> &self, const OptVar<T,a,b,c> &other) {
if (other.is_set) { self.v = other.v; self.is_set += 1; }
if (other.is_set) { self.v = other.v; self.is_set = 1; }
}
template <class T, T a, T b, T c>
inline void oassign(unsigned &v, const OptVar<T,a,b,c> &other) {
inline void oassign(T &v, const OptVar<T,a,b,c> &other) {
if (other.is_set) { v = other.v; }
}

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -140,6 +140,7 @@ int FileBase::read(void *buf, int len)
{
if (!isOpen() || len < 0)
throwIOException("bad read");
mem_size_assert(1, len); // sanity check
errno = 0;
long l = acc_safe_hread(_fd, buf, len);
if (errno)
@ -161,6 +162,7 @@ void FileBase::write(const void *buf, int len)
{
if (!isOpen() || len < 0)
throwIOException("bad write");
mem_size_assert(1, len); // sanity check
errno = 0;
long l = acc_safe_hwrite(_fd, buf, len);
if (l != len)

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2004-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2004-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
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])
fprintf(fp, "LZMA SDK version %s\n", v);
#endif
fprintf(fp, "Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer\n");
fprintf(fp, "Copyright (C) 1996-2017 Laszlo Molnar\n");
fprintf(fp, "Copyright (C) 2000-2017 John F. Reiser\n");
fprintf(fp, "Copyright (C) 2002-2017 Jens Medoch\n");
fprintf(fp, "Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer\n");
fprintf(fp, "Copyright (C) 1996-2018 Laszlo Molnar\n");
fprintf(fp, "Copyright (C) 2000-2018 John F. Reiser\n");
fprintf(fp, "Copyright (C) 2002-2018 Jens Medoch\n");
#if (WITH_ZLIB)
fprintf(fp, "Copyright (C) 1995" "-2005 Jean-loup Gailly and Mark Adler\n");
#endif

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -594,9 +594,8 @@ void ElfLinkerAMD64::relocate1(const Relocation *rel, upx_byte *location, upx_ui
void ElfLinkerArmBE::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
const char *type) {
if (!strcmp(type, "R_ARM_PC24")
|| !strcmp(type, "R_ARM_CALL")
|| !strcmp(type, "R_ARM_JUMP24")) {
if (!strcmp(type, "R_ARM_PC24") || !strcmp(type, "R_ARM_CALL") ||
!strcmp(type, "R_ARM_JUMP24")) {
value -= rel->section->offset + rel->offset;
set_be24(1 + location, get_be24(1 + location) + value / 4);
} else if (strcmp(type, "R_ARM_ABS32") == 0) {
@ -620,9 +619,8 @@ void ElfLinkerArmBE::relocate1(const Relocation *rel, upx_byte *location, upx_ui
void ElfLinkerArmLE::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
const char *type) {
if (!strcmp(type, "R_ARM_PC24")
|| !strcmp(type, "R_ARM_CALL")
|| !strcmp(type, "R_ARM_JUMP24")) {
if (!strcmp(type, "R_ARM_PC24") || !strcmp(type, "R_ARM_CALL") ||
!strcmp(type, "R_ARM_JUMP24")) {
value -= rel->section->offset + rel->offset;
set_le24(location, get_le24(location) + value / 4);
} else if (strcmp(type, "R_ARM_ABS32") == 0) {
@ -664,9 +662,8 @@ void ElfLinkerArm64LE::relocate1(const Relocation *rel, upx_byte *location, upx_
value -= rel->section->offset + rel->offset;
upx_uint32_t const m19 = ~(~0u << 19);
upx_uint32_t w = get_le32(location);
set_le32(location,
(w & ~((3u << 29) | ( m19 << 5)))
| ((3u & value) << 29) | ((m19 & (value >> 2)) << 5));
set_le32(location, (w & ~((3u << 29) | (m19 << 5))) | ((3u & value) << 29) |
((m19 & (value >> 2)) << 5));
} else if (!strcmp(type, "ABS32")) {
set_le32(location, get_le32(location) + value);
} else if (!strcmp(type, "ABS64")) {

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -46,7 +46,7 @@ int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK;
void options_t::reset()
{
options_t *o = this;
memset(o, 0, sizeof(*o));
mem_clear(o, sizeof(*o));
o->crp.reset();
o->cmd = CMD_NONE;

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -92,15 +92,6 @@ void PackArmPe::processImports2(unsigned myimport, unsigned iat_off) // pass 2
{
PeFile::processImports2(myimport, iat_off);
__packed_struct(import_desc)
LE32 oft; // orig first thunk
char _[8];
LE32 dllname;
LE32 iat; // import address table
__packed_struct_end()
COMPILE_TIME_ASSERT(sizeof(import_desc) == 20);
// adjust import data
for (import_desc *im = (import_desc*) oimpdlls; im->dllname; im++)
{

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -215,9 +215,14 @@
#ifdef WANT_REL_ENUM //{
static unsigned ELF32_R_TYPE(unsigned x) { return 0xff & x; }
static unsigned ELF64_R_TYPE(upx_uint64_t x) { return 0xffffffff & x; }
#undef WANT_REL_ENUM
static inline unsigned ELF32_R_TYPE(unsigned x) { return 0xff & x; }
static inline unsigned ELF64_R_TYPE(upx_uint64_t x) { return 0xffffffff & (unsigned)x; }
# undef R_PPC_RELATIVE
# undef R_PPC64_RELATIVE
# undef R_PPC_JMP_SLOT
# undef R_PPC64_JMP_SLOT
enum { // relocation types
R_386_RELATIVE = 8,
R_AARCH64_RELATIVE = 1027,

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -2507,7 +2507,6 @@ PackLinuxElf64::generateElfHdr(
#define WANT_REL_ENUM
#include "p_elf_enum.h"
#undef WANT_REL_ENUM
void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/)
{

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2001-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2001-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 2004-2017 John Reiser
Copyright (C) 2004-2018 John Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,7 +2,7 @@
This file is part of the UPX executable compressor.
Copyright (C) 2007-2017 John F. Reiser
Copyright (C) 2007-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2002-2017 Jens Medoch
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2002-2018 Jens Medoch
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2002-2017 Jens Medoch
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2002-2018 Jens Medoch
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2000-2017 John F. Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
Copyright (C) 2000-2018 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,9 +2,9 @@
This file is part of the UPX executable compressor.
Copyright (C) 2004-2017 John Reiser
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 2004-2018 John Reiser
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@ -47,7 +47,7 @@ Packer::Packer(InputFile *f) :
if (fi != NULL)
file_size = fi->st_size();
uip = new UiPacker(this);
memset(&ph, 0, sizeof(ph));
mem_clear(&ph, sizeof(ph));
}
@ -665,7 +665,7 @@ unsigned Packer::getRandomId() const
// this is called directly after the constructor from class PackMaster
void Packer::initPackHeader()
{
memset(&ph, 0, sizeof(ph));
mem_clear(&ph, sizeof(ph));
ph.version = getVersion();
ph.format = getFormat();
ph.method = M_NONE;

View File

@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2017 Laszlo Molnar
Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2018 Laszlo Molnar
All Rights Reserved.
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