Compare commits
260 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a3637ff5a | |||
| 2923c0968e | |||
| 98cfe99d65 | |||
| bdd97fe0b2 | |||
| 6b500bc83b | |||
| 92a12a2ec1 | |||
| 04d79040f9 | |||
| 3201ddc680 | |||
| 2f06de54c5 | |||
| 6489ec9bba | |||
| 1a5ba22fe7 | |||
| 8f9713ed53 | |||
| 90eb68b3b9 | |||
| 95fcbcb4f2 | |||
| b97688d119 | |||
| 5ea3627cab | |||
| d9288213ec | |||
| 614c86fb7d | |||
| 9f651ee40f | |||
| 774c8c3fd4 | |||
| b711d2f750 | |||
| 8a793d5942 | |||
| 99f52c60ed | |||
| 2c2e108301 | |||
| 563165e6ae | |||
| f1a31b4793 | |||
| 5e9b6bd69d | |||
| 9b990c4eae | |||
| 7a625a449a | |||
| c2b62359d5 | |||
| 6722e8972e | |||
| fefe7a3452 | |||
| 90a1322929 | |||
| d698eb69e2 | |||
| 0ef00e9b82 | |||
| 95cedb6640 | |||
| d736da4208 | |||
| be83788666 | |||
| 5a28a51abc | |||
| 8a84df752c | |||
| 85f53b210d | |||
| 5d13c6cd01 | |||
| 98a0d381e9 | |||
| e1d20fd0b5 | |||
| d1035ecd8f | |||
| 0e651facdd | |||
| 9fdddfc332 | |||
| 7d2913709c | |||
| 3623199e8d | |||
| e4b23f7a47 | |||
| f056ecdcd5 | |||
| 857a03a074 | |||
| a34deee4f5 | |||
| fc9c8ae482 | |||
| 08c63f06eb | |||
| bbff510ef1 | |||
| f747435952 | |||
| e6edad8f46 | |||
| 05e44b9644 | |||
| 16bb7ab841 | |||
| 9248f02557 | |||
| 9485a56af1 | |||
| 021c8db58a | |||
| 8ab180edf8 | |||
| ab35b685d4 | |||
| 86745721ee | |||
| c34fe09a79 | |||
| 1fa9ff2c05 | |||
| e8ef0cf63f | |||
| 8c84efb8fb | |||
| f3a7620ae8 | |||
| c7969ed5a5 | |||
| 900926c0ed | |||
| df94f4288a | |||
| 969efe687d | |||
| ee3f1292d0 | |||
| cacb239040 | |||
| 28d1789783 | |||
| 633eb98e34 | |||
| 4854c03096 | |||
| e853119c77 | |||
| 161a58bafb | |||
| f5fd94e815 | |||
| edde6210f1 | |||
| 507e19945e | |||
| 4a35bf32ea | |||
| e04bf9e4bc | |||
| c384d224c0 | |||
| 35427f998e | |||
| 1174da2bc3 | |||
| 11e8a47030 | |||
| 8c4e9bcf0d | |||
| 9dfd624901 | |||
| 79e65503a9 | |||
| 59f18b9d9f | |||
| fb3699fb89 | |||
| 9d2d59b5d2 | |||
| aefb2fa3c3 | |||
| e8aa80f904 | |||
| 990988f920 | |||
| 576d9a4e7e | |||
| 1d462ee424 | |||
| c9b09555c4 | |||
| 860b5bf967 | |||
| 5063480a38 | |||
| 3400ae9dbe | |||
| 3385264eb2 | |||
| 34646f1c6a | |||
| 50aa63a5a0 | |||
| 64557bee43 | |||
| 7c21c4513e | |||
| c6d6378005 | |||
| 4f6979967d | |||
| e633c51b50 | |||
| 143f0accef | |||
| b413f3da26 | |||
| 6eafa552bb | |||
| 7a0514d9b4 | |||
| 7e7565299e | |||
| ed34a089c6 | |||
| d14a2c5282 | |||
| f014406b65 | |||
| 58771ecca6 | |||
| 5d9dcb634b | |||
| 19c2c1edcf | |||
| 0430e7931e | |||
| bb8e607442 | |||
| e61ada944d | |||
| 46730315e3 | |||
| 4869142034 | |||
| 8e42e17bbf | |||
| 38c8b84a26 | |||
| c652626a37 | |||
| 06f6e47ebf | |||
| 403b180b1d | |||
| ee008acfbd | |||
| d149092ac0 | |||
| eafa136c69 | |||
| 402c885987 | |||
| 5e7e0508b9 | |||
| ff1d5fb794 | |||
| ad3f63b5c4 | |||
| a3e51e6dee | |||
| c1b9c79f54 | |||
| e0bc040b0a | |||
| 85eb4c7537 | |||
| 1f929d47d0 | |||
| 608662d73b | |||
| 7841d23e77 | |||
| b72dda4ada | |||
| c59c8a1ea2 | |||
| 1522293be0 | |||
| b37bc99330 | |||
| 7f905724b1 | |||
| 2bf5bb1625 | |||
| 08d3376740 | |||
| 7bace76176 | |||
| ef336dbcc6 | |||
| ca7217e717 | |||
| 3931cb7871 | |||
| 9e8de4abe5 | |||
| 26be845563 | |||
| 2f11a629fa | |||
| a295437e11 | |||
| 04597fb804 | |||
| f2f002409b | |||
| 509de877ca | |||
| 63aea4a7dc | |||
| 6470c748db | |||
| 25a6429e6a | |||
| 4fa1c2a97e | |||
| 9ad39d77cc | |||
| 92527126a8 | |||
| 02b4a4c974 | |||
| ede570be21 | |||
| 08627e9df5 | |||
| 6d9f3adc86 | |||
| 96433b4e39 | |||
| f4947cc2ae | |||
| 7b554d4f72 | |||
| 5b54544438 | |||
| ef78d23494 | |||
| ef8a7f330d | |||
| b72e0f3060 | |||
| 2a0bab938b | |||
| cd637629c4 | |||
| b9adfd801d | |||
| 69355514c9 | |||
| 33dc947c21 | |||
| 6de021d8d8 | |||
| 9be86621bf | |||
| a7a0876298 | |||
| 31b42345c3 | |||
| 1b172e729e | |||
| 3bf387a2d4 | |||
| 9f20bbb046 | |||
| 82af555974 | |||
| 50638b5213 | |||
| 650df95b72 | |||
| b2115a4162 | |||
| d67bf16a08 | |||
| a4c9b64224 | |||
| 8f572e5fe6 | |||
| e58873044b | |||
| 8ada92a69f | |||
| 3c8ed5c000 | |||
| c127d5b64a | |||
| 2d3bd0809a | |||
| eef955a9dd | |||
| e59ce39dc6 | |||
| 62815f5c3c | |||
| f496010273 | |||
| 143c4e3322 | |||
| e7f1e99a5e | |||
| 140a031515 | |||
| b7c91941b8 | |||
| 33f0b6da67 | |||
| ee18fe9bba | |||
| a51330cf07 | |||
| a67aed2744 | |||
| d979e19315 | |||
| 4c74d16795 | |||
| 6e541a432f | |||
| d8f47e248a | |||
| d1a869496b | |||
| f42a37555d | |||
| d9e019bd87 | |||
| ce194fa5d8 | |||
| b5bdf57636 | |||
| a3a81ce7c6 | |||
| 61f347401c | |||
| d985a4c250 | |||
| 8eabb9b02f | |||
| 8a195a0b35 | |||
| 955206aaf0 | |||
| 082dd7d5ee | |||
| 90714cf624 | |||
| 6e2a41cb26 | |||
| fe4a8f33b1 | |||
| 391f511094 | |||
| 9df4b6ea24 | |||
| c4a921283a | |||
| 4e05f087f9 | |||
| 40b506d2e0 | |||
| 263f384810 | |||
| d80c145a18 | |||
| 7a681bd20d | |||
| ed31fb184b | |||
| 360b94dd6c | |||
| 8524e73f59 | |||
| a4e47625ac | |||
| 7c16872a6e | |||
| 8bca8629be | |||
| 85fdd579d6 | |||
| e88d2ff88c | |||
| bdf08baebd | |||
| 3dcdd25177 | |||
| 491e8640b2 | |||
| b23b7ef85e | |||
| b167374f13 |
+6
-14
@@ -14,10 +14,8 @@ 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-15.0-x86, CL_VERSION: 19.10, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 }
|
- { C: msvc-14.1-x86, CL_VERSION: 19.12, 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: msvc-14.1-x64, CL_VERSION: 19.12, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 }
|
||||||
# - { C: gcc-4.9-m32, T: SKIP }
|
|
||||||
# - { C: gcc-4.9-m64, T: SKIP }
|
|
||||||
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:
|
||||||
@@ -25,7 +23,7 @@ environment:
|
|||||||
|
|
||||||
init:
|
init:
|
||||||
- git config --global core.autocrlf input
|
- git config --global core.autocrlf input
|
||||||
- where bash & where cat & where chmod & where cmp & where cp & where curl & where date & where file & where git & where gzip & where mkdir & where mv & where openssl & where readlink & where rm & where rmdir & where sed & where sha256sum & where sort & where ssh & where ssh-add & where ssh-agent & where ssh-keyscan & where tar
|
- where bash & where cat & where chmod & where cmp & where cp & where curl & where date & where file & where git & where gzip & where mkdir & where mv & where openssl & where readlink & where rm & where rmdir & where sed & where sha256sum & where sort & where ssh & where ssh-add & where ssh-agent & where ssh-keyscan & where tar & where touch
|
||||||
# - bash --version & git --version & sed --version & tar --version
|
# - bash --version & git --version & sed --version & tar --version
|
||||||
- git --version & bash --version
|
- git --version & bash --version
|
||||||
# - dir "c:\Program Files\Git\usr\bin"
|
# - dir "c:\Program Files\Git\usr\bin"
|
||||||
@@ -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-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-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-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-14.1-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-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 )
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cd c:\projects\upx
|
- 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
|
# setup directories following the VPATH build in travis_build.sh
|
||||||
- where cl & where link
|
- where cl & where link
|
||||||
- set BDIR=c:\projects\build\%C%\%B%
|
- set BDIR=c:\projects\build\%C%\%B%
|
||||||
@@ -89,7 +81,7 @@ build_script:
|
|||||||
- set s=c:\projects\upx\src
|
- set s=c:\projects\upx\src
|
||||||
- cat .GITREV.txt
|
- cat .GITREV.txt
|
||||||
- set /p GITREV=<.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:
|
test_script:
|
||||||
- set UPX=--no-color --no-progress
|
- set UPX=--no-color --no-progress
|
||||||
|
|||||||
+3
-1
@@ -1,7 +1,9 @@
|
|||||||
#
|
#
|
||||||
# see http://editorconfig.org/
|
# see https://editorconfig.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ if [[ $BM_X =~ (^|\+)rebuild-stubs($|\+) ]]; then
|
|||||||
extra_subdirs+=( src/stub/src/arch/m68k/m68020 )
|
extra_subdirs+=( src/stub/src/arch/m68k/m68020 )
|
||||||
extra_subdirs+=( src/stub/src/arch/mips/r3000 )
|
extra_subdirs+=( src/stub/src/arch/mips/r3000 )
|
||||||
extra_subdirs+=( src/stub/src/arch/powerpc/32 )
|
extra_subdirs+=( src/stub/src/arch/powerpc/32 )
|
||||||
|
extra_subdirs+=( src/stub/src/arch/powerpc/64 )
|
||||||
extra_subdirs+=( src/stub/src/arch/powerpc/64le )
|
extra_subdirs+=( src/stub/src/arch/powerpc/64le )
|
||||||
make -C src/stub maintainer-clean
|
make -C src/stub maintainer-clean
|
||||||
for d in ${extra_subdirs[@]}; do
|
for d in ${extra_subdirs[@]}; do
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ source "$argv0dir/travis_init.sh" || exit 1
|
|||||||
set -x # debug
|
set -x # debug
|
||||||
|
|
||||||
if [[ $BM_X == rebuild-stubs ]]; then exit 0; fi
|
if [[ $BM_X == rebuild-stubs ]]; then exit 0; fi
|
||||||
# save space
|
# save space and do not deploy debug builds
|
||||||
if [[ $BM_B =~ (^|\+)coverage($|\+) ]]; then exit 0; fi
|
if [[ $BM_B =~ (^|\+)coverage($|\+) ]]; then exit 0; fi
|
||||||
if [[ $BM_B =~ (^|\+)debug($|\+) ]]; then exit 0; fi
|
if [[ $BM_B =~ (^|\+)debug($|\+) ]]; then exit 0; fi
|
||||||
if [[ $BM_B =~ (^|\+)sanitize($|\+) ]]; then exit 0; fi
|
if [[ $BM_B =~ (^|\+)sanitize($|\+) ]]; then exit 0; fi
|
||||||
@@ -99,6 +99,7 @@ else
|
|||||||
[[ $cpu == amd64 ]] && os=win64
|
[[ $cpu == amd64 ]] && os=win64
|
||||||
fi
|
fi
|
||||||
d=$cpu-$os
|
d=$cpu-$os
|
||||||
|
unset cpu os
|
||||||
fi
|
fi
|
||||||
d=$d-$BM_C-$BM_B
|
d=$d-$BM_C-$BM_B
|
||||||
|
|
||||||
@@ -115,6 +116,7 @@ for exeext in .exe .out; do
|
|||||||
cp -p -i $f $d/upx-git-${rev:0:12}$exeext
|
cp -p -i $f $d/upx-git-${rev:0:12}$exeext
|
||||||
sha256sum -b $d/upx-git-${rev:0:12}$exeext
|
sha256sum -b $d/upx-git-${rev:0:12}$exeext
|
||||||
fi
|
fi
|
||||||
|
unset f
|
||||||
done
|
done
|
||||||
|
|
||||||
# /***********************************************************************
|
# /***********************************************************************
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ declare +x UPX_AUTOMATIC_BUILDS_SSL_KEY UPX_AUTOMATIC_BUILDS_SSL_IV
|
|||||||
# compatibility wrappers
|
# compatibility wrappers
|
||||||
if [[ $TRAVIS_OS_NAME == osx ]]; then
|
if [[ $TRAVIS_OS_NAME == osx ]]; then
|
||||||
# use GNU coreutils ("brew install coreutils")
|
# use GNU coreutils ("brew install coreutils")
|
||||||
|
chmod() {
|
||||||
|
gchmod "$@"
|
||||||
|
}
|
||||||
date() {
|
date() {
|
||||||
gdate "$@"
|
gdate "$@"
|
||||||
}
|
}
|
||||||
@@ -132,15 +135,15 @@ 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
|
case $BM_C in
|
||||||
clang | clang-m?? | clang-3.4-m?? | clang-[678][0-9][0-9]-m??)
|
clang | clang-m?? | clang-3.4-m?? | clang-[6789][0-9][0-9]-m??)
|
||||||
CC="clang"; CXX="clang++" ;; # standard system compiler
|
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" ;;
|
v=${BM_C:6:3}; CC="clang-$v"; CXX="clang++-$v"; SCAN_BUILD="scan-build-$v" ;;
|
||||||
gcc | gcc-m?? | gcc-mx32)
|
gcc | gcc-m?? | gcc-mx32)
|
||||||
CC="gcc"; CXX="g++" ;; # standard system compiler
|
CC="gcc"; CXX="g++" ;; # standard system compiler
|
||||||
gcc-[34].[0-9]-m?? | gcc-[34].[0-9]-mx32)
|
gcc-[34].[0-9]-m?? | gcc-[34].[0-9]-mx32)
|
||||||
v=${BM_C:4:3}; CC="gcc-$v"; CXX="g++-$v" ;;
|
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" ;;
|
v=${BM_C:4:1}; CC="gcc-$v"; CXX="g++-$v" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -149,81 +149,81 @@ c3f44b4d00a87384c03a6f9e7aec809c1addfe3e271244d38a474f296603088c *mipsel-linux.e
|
|||||||
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
|
b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.elf/upx-3.91
|
||||||
"
|
"
|
||||||
expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\
|
expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\
|
||||||
c82d400d99a78f21b594ad9900208ee89b3df5b67723c06dbb374dc3f42ca934 *amd64-linux.elf/upx-3.91
|
7301bb93535f91bb789b44da75c2f365cc2d0fa99a4d597f49de8716d96dbcf6 *amd64-linux.elf/upx-3.91
|
||||||
5b9ec916beae0eadc665235158a9ae5bce1309823a344503268a88e32e77824a *arm-wince.pe/upx-3.91.exe
|
17a9aef8087ca2b3f5fc4e3a41d7c4d721bf3ad222030ac2068ed00eb85a9deb *arm-wince.pe/upx-3.91.exe
|
||||||
a099aedddbaa960247209e08ed922b43f4bbd6559ad646a6ff801384e2f661eb *armeb-linux.elf/upx-3.91
|
3ddbde0d00ff6ea9ce163d889e6f418146b35238d05005b98b76adb555bcf644 *armeb-linux.elf/upx-3.91
|
||||||
960dc15876221832510142816605b9ef568c0de3050ca0a79f3553643c5d5e0f *i386-dos32.djgpp2.coff/upx-3.91.exe
|
f680566e3daae0526c5f6965c23219d7946c4d4117eeaa277bd9e68e907418c6 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||||
43ec77282bbe73eb5d6f5471e9593127928bcfc2ebaedd93dd86969b12c9c61d *i386-linux.elf/upx-3.91
|
14394ce9806dc7a3622addfb625d1731e021600e0489dc7c8ea7f30c54d1fd37 *i386-linux.elf/upx-3.91
|
||||||
ca6925a15c1ab8931f0a8fe9ef87f5893403d6e46098f4cd1a5f6f6f0fbdeb44 *i386-win32.pe/upx-3.91.exe
|
d3cfb5347758ee54e54cfc92ae502a3e19702cd4fec115d74f84f8a5ab7a9bc2 *i386-win32.pe/upx-3.91.exe
|
||||||
14ff2a4e215a25ed7442b004bca3d82094f7c01784fc4876eb50d365441f35c3 *m68k-atari.tos/upx-3.91.ttp
|
d0e68eed8f001f3074351acbc7133bd41f67f8e3b7e5f82d5df1911481123378 *m68k-atari.tos/upx-3.91.ttp
|
||||||
4163afbb2475b669e131265c0f7ea179c35f19ccce66732feee08fe20c33775e *mipsel-linux.elf/upx-3.91
|
58db1b12b5462dbb05c08d7952cacd7c7090a6b3cbfbf9b431e6390f246cbb95 *mipsel-linux.elf/upx-3.91
|
||||||
00c9d16157a734e1b386e5fe01dbae76c7f8ab7d6035dfa6975d656b43ef4e67 *powerpc-linux.elf/upx-3.91
|
4fd2e2fc33563e95453f9b4a52c153f248937a548cbfe746bb0d71f19ae5ad03 *powerpc-linux.elf/upx-3.91
|
||||||
"
|
"
|
||||||
expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\
|
expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\
|
||||||
27b530885ccb425cf14963feea677c4177cce5324821c277823b3262a7a6ced4 *amd64-linux.elf/upx-3.91
|
e537c1a28bea559cbe43cd23723443e2617316a40a6632927f6d94589f800efe *amd64-linux.elf/upx-3.91
|
||||||
22216286b1bf3066d9022b921f37beff6712b5f3fc8c092f2dc1477638d9f8cc *arm-wince.pe/upx-3.91.exe
|
33a13fa63379b9eae6878cd2bfb0b41963795a27bc5a026de0b50b4a43131b12 *arm-wince.pe/upx-3.91.exe
|
||||||
90e2960d01214b3e2f62f76effa2360fed655e72392acfa8096d1d9a729ade21 *armeb-linux.elf/upx-3.91
|
3c6f9ab67e21c72073f66c558765d8f07f192ba63d3ffb2ce40ebc9178ccd5ef *armeb-linux.elf/upx-3.91
|
||||||
b6e98d36bd916fa63ec799e47dd7cac3674154370a9680492d84f1853bf14c3e *i386-dos32.djgpp2.coff/upx-3.91.exe
|
28bc9ee28b73b11a32fb2e4d3ad99ff06d61cf5b9f104052db89f6f6f0557ca9 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||||
483e4a7eba0b88302658fcaacb7ee1de32fb514dac5dccb010a55a5202918c0c *i386-linux.elf/upx-3.91
|
8201f15f7ef5e54cddb18474a5ed2d48e2fc7726d6014c457ad3cd82c01e1072 *i386-linux.elf/upx-3.91
|
||||||
d2692b3e4a278559456e299164714c4bb8ebbcf230ab12521619e2e94580597d *i386-win32.pe/upx-3.91.exe
|
5bebadb8455b052580b1f22a949c3eb5a441c8b6ba9c6b50506cb703fc3f65ce *i386-win32.pe/upx-3.91.exe
|
||||||
cd1ae0f2781787bf7c61f3600cc889313e6027615d78e562d624d717671e55c3 *m68k-atari.tos/upx-3.91.ttp
|
e4d3a430f93b41a3aa67492e6c06d74a1fcd4e06b272de2c681252d91b7a953a *m68k-atari.tos/upx-3.91.ttp
|
||||||
26b30c10ba8980fa6fc564b79eb2931e07bb7b2f89f07a0656c28be71185a3ea *mipsel-linux.elf/upx-3.91
|
1bd8be4eb09dc39b4b0d447ef4eebac29c51d56380be79b46461962dea81b8fb *mipsel-linux.elf/upx-3.91
|
||||||
bbce9449d105e4ac7e9a04d56b286cbba3b34c1bf8ee928e9e97a4943ae3c5ac *powerpc-linux.elf/upx-3.91
|
c1928cd500450f1f09f2c0265980c329cd0e083095abb3a48f1999a7dd551309 *powerpc-linux.elf/upx-3.91
|
||||||
"
|
"
|
||||||
expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\
|
expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\
|
||||||
81a528ed6f678bdbb1c18a9ee69b7d04169466e756a71baa98c7651ad1c40bec *amd64-linux.elf/upx-3.91
|
3fadda0299775195558de2ac25a673ab65467bd147ab8aaf57b7af1542f1d5de *amd64-linux.elf/upx-3.91
|
||||||
08c55815175ce0d34fca3b368336dd346a2354dbe4f046210c82f6961350a50f *arm-wince.pe/upx-3.91.exe
|
99f7d8d7faf57c78053158c6a6915dab8c5cfdcc73112cee9607bcec55837ae8 *arm-wince.pe/upx-3.91.exe
|
||||||
6dae3b18770e6af45e074b092c1f2f3632bef1996ce71af0f6e252caf34555a1 *armeb-linux.elf/upx-3.91
|
8f06e11a0c60fd83db607089b7ad985a48a26ee09bd533e55072f9fe2ba39f2f *armeb-linux.elf/upx-3.91
|
||||||
45f50d69e685f7ea752f76c05554d4c2ce023c0218465a4f8919138a76ae6c71 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
542c368392f2d584145cc51d51b9dbc5dc61754597bb1cb7673821a2a4650816 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||||
f1db16f6be23b0bd96226e7e57f8b41ddfb93ede5ca0750ae680bbd615523083 *i386-linux.elf/upx-3.91
|
edf61800e09e0ef963b27fded0e032839f4b0cb907a84e43d19ed31bd536440f *i386-linux.elf/upx-3.91
|
||||||
eb7c2f74979c11b35193a0a9d428596bda46420d9363666fe1b967f5cd1610c6 *i386-win32.pe/upx-3.91.exe
|
ef5e25c79d356e9ed0736f34dc5ee7a8f4c66d0c330b8d16672fac7d829b5a7c *i386-win32.pe/upx-3.91.exe
|
||||||
cefb13395220fb2e931d0fb32e27663c4a27035f9e79131bbabc44fa54e6336e *m68k-atari.tos/upx-3.91.ttp
|
2c85e506d670aef707789e5d8a97901ddbb42f50a205a207f575f79b901c2cd7 *m68k-atari.tos/upx-3.91.ttp
|
||||||
602be188fca1dd63593a2ace68ea221d720fd2ddf9df85c1ab019feda69f1cad *mipsel-linux.elf/upx-3.91
|
93014cd6edd07fafcae133b449837f550f92eeab86ceebd8e7ed5337ab65bdc2 *mipsel-linux.elf/upx-3.91
|
||||||
2f299fdbc37bf6675559c5b1245aecf56de268bc074bd558bd7d9f84f7be5eae *powerpc-linux.elf/upx-3.91
|
761f0d45b61e020fd8931cd5192677d06b34fec64a534d99be9fe0346eb56d2b *powerpc-linux.elf/upx-3.91
|
||||||
"
|
"
|
||||||
expected_sha256sums__t140_compress_lzma_2_no_filter="\
|
expected_sha256sums__t140_compress_lzma_2_no_filter="\
|
||||||
12d2ec20370655396711fc794db41745c21f51c998b766e6aa96283feb00eb48 *amd64-linux.elf/upx-3.91
|
4abe4fff006e53ee147573d74a0f7feba9ebc62b8233e19ac331c5350391bd66 *amd64-linux.elf/upx-3.91
|
||||||
9759deb5aa8fb004c4b23bbe174042e45869aedeea1a1dd1b729be0e736814da *arm-wince.pe/upx-3.91.exe
|
df8ad2d951368ddfb64b8c405f4b4727a2cf5f1c823ecd6e1d298eb21cad0afc *arm-wince.pe/upx-3.91.exe
|
||||||
9b25bcc69fcdbdf4b4adc54e5c6508749c918179644ff9fa34b437bc7e42eca5 *armeb-linux.elf/upx-3.91
|
cd109f76ff00030f564a883da5a57784d9626e85c2c54e6de1f0f2cfda709325 *armeb-linux.elf/upx-3.91
|
||||||
a2a800d2ba5cfc1b6bb2b48c91adccb5d3c3b6c0b5c548affccac9244197a312 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
deeae51e0a4c25e6f5afd741361eea445c198fba247b583663b010778699419a *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||||
1865bc9b76579e33df4038f3d0abf848993b0c865b687f4b4bd482099416ef80 *i386-linux.elf/upx-3.91
|
591d02bbb604aab55ed653411ea5888d3e93c5e078f3fc79f73d54b12bc83b22 *i386-linux.elf/upx-3.91
|
||||||
80aba41aad8268085e853ec872f885981838a625c14095d21ba70cb7abe045a5 *i386-win32.pe/upx-3.91.exe
|
171bde9f27a5571b524e9d7cdba6cefa142bb8a0b114c4d5294944ee5781e0bb *i386-win32.pe/upx-3.91.exe
|
||||||
bbed61e42fa7b330b5cde66e4614329f41e21facff1f3667edc03495219c29f9 *m68k-atari.tos/upx-3.91.ttp
|
54ca62d5f15ce87708867f7b349584799779711bca015a3ebac69f5cf077b905 *m68k-atari.tos/upx-3.91.ttp
|
||||||
57b47244a3a0d01725cbdc9af8572cbe20e2d173857015ad4d32245b52577dc2 *mipsel-linux.elf/upx-3.91
|
bc9c9ce0ce7ce32e3f77fca39ffdd7809731e93f978fb201ea49b53a980c5d4e *mipsel-linux.elf/upx-3.91
|
||||||
6b02b01fa48910a104b523b265503131e4259ef83765464d002614e1a4eba38f *powerpc-linux.elf/upx-3.91
|
4357697b615fb40d041ad5a2217a4722aa9066d2100ba2c73212262f581f820f *powerpc-linux.elf/upx-3.91
|
||||||
"
|
"
|
||||||
expected_sha256sums__t150_compress_ucl_2_all_filters="\
|
expected_sha256sums__t150_compress_ucl_2_all_filters="\
|
||||||
3e0df832830a4a0cca77da16868a2655f85b2b36f783123b6f067f5586460704 *amd64-linux.elf/upx-3.91
|
15dd4ad982953a1f7b7c74e7cb34e777fc7db11201280cd5af19ac547c8b9a0f *amd64-linux.elf/upx-3.91
|
||||||
c7b0f611e9941be58b700219e7a5d34cdbdbf972b6184b13dec5e98fe84de808 *arm-wince.pe/upx-3.91.exe
|
a8cd8c9abb50ab45f30bd2f01bcb4d2e934806440ef206d7da44097aced7085b *arm-wince.pe/upx-3.91.exe
|
||||||
ef7c6febc18d5ecf7d846f38d75f398a92b5b21eb5d35b1eac4935d0e6de92ac *armeb-linux.elf/upx-3.91
|
c7af209eb44204a6e4ccbed18e1b3f6eaac5df01c1106426d375d1cd65cd01fd *armeb-linux.elf/upx-3.91
|
||||||
425c9128285f49b41f9b736f48794f5bebba6981250f669e5a342016b89f2170 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
ea265e1f78c23beb632187bfebcb4ae15ce688f10e87db69952ab54724666042 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||||
d6cb6d50dfda98ff8efbab2d2c8751adfb67df58652313c630d45db1b89e921e *i386-linux.elf/upx-3.91
|
530a267e8fdae0f4b746df62d3f2d406c6bcb08a58058448b867e372dd4a6cc6 *i386-linux.elf/upx-3.91
|
||||||
5565f8196d971feec261dc663ca7ec329fd82b1b18ad49593b865edbaa15765d *i386-win32.pe/upx-3.91.exe
|
7c3d7398f63eb9e235992d2d8fd6de9e355f6f21621c45032a6ae6c9009067e6 *i386-win32.pe/upx-3.91.exe
|
||||||
78f24d77855034d467568f05c22cb5e3abd167c90a4d89f4e2059c3e6faa3e2b *m68k-atari.tos/upx-3.91.ttp
|
bf11d38e3a2cd2c585fdb2173368287e3d82edd5727ea3508c21752b2e7c5a53 *m68k-atari.tos/upx-3.91.ttp
|
||||||
23d6856df8f31b9176e0f4709135ce81656ed94539bf909e873b787ce89821cd *mipsel-linux.elf/upx-3.91
|
271adf2c52ed777c00a17a19283478e226d76181b1dfb72d6c3aead3923fbad4 *mipsel-linux.elf/upx-3.91
|
||||||
8dbf63b21d3ced1cceec71e507d3086de2612b8ce8ba35ee2d75acd06435baf1 *powerpc-linux.elf/upx-3.91
|
a0152edb1476dc0f713bcd55a7462de200e92e7d057ff4a9af92c7af6abbc3bc *powerpc-linux.elf/upx-3.91
|
||||||
"
|
"
|
||||||
expected_sha256sums__t160_compress_all_methods_1_no_filter="\
|
expected_sha256sums__t160_compress_all_methods_1_no_filter="\
|
||||||
27a248133cd386332daa14ec25367b4f1ff5595df213a2d72c341bbb7f264033 *amd64-linux.elf/upx-3.91
|
16d2a30dd00dfd38d3aba417a087a7341314fa8f5769f8c87565728f2f2bf06a *amd64-linux.elf/upx-3.91
|
||||||
6b2333719a4fe6c8d2067f682d57cf6fc5fd928bffad4e61aaffcc31287772a7 *arm-wince.pe/upx-3.91.exe
|
560335ec9f89f2cb8b2a2cff51b4d3dee215c68ecfc0a182fab4a838fafee166 *arm-wince.pe/upx-3.91.exe
|
||||||
d094f3a0e80e579aa6afeac239aacb3d8210580acdb095c9fc5511d77da7aeaa *armeb-linux.elf/upx-3.91
|
b3b0a0c277e947cfc19048e142e71c902cfe6d77931b2a1caeba63b9449aa8c7 *armeb-linux.elf/upx-3.91
|
||||||
d09af3652aa601650f9cd0f125d54e50dfe57b45b9871567140e62a04d032407 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
d5f89d57c0d74923e557410e1b5ec135e3853985965bfe9fd38283851896b4c9 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||||
110bb3344a27b2677085e130956371df43ca6c231c01070480bb3a9e519fed30 *i386-linux.elf/upx-3.91
|
e6586de002ae8ccda77d9088e37412c1069626e807d81722c1cd810a8a7367e6 *i386-linux.elf/upx-3.91
|
||||||
c3c8b428f7e57a528db89f1365b4f3fda60f0dc03eadb30775ecdbadaa19f0aa *i386-win32.pe/upx-3.91.exe
|
4c73a38e81fe12f36dc37e514f8580c12bdf5d8cb92e9a07b7070db291a2f7eb *i386-win32.pe/upx-3.91.exe
|
||||||
53c77efbccf41072c4c206343ba3c838be04c47eab415d18c08f086d481612db *m68k-atari.tos/upx-3.91.ttp
|
53d9857238472bf4e2822134e8d63c11d6ed32f83615bb7491ba4441ff55c6c2 *m68k-atari.tos/upx-3.91.ttp
|
||||||
616cefa819c0e516c554faac20e6aaf9350a2aacf0041a2641d5809c0da220df *mipsel-linux.elf/upx-3.91
|
6b11b762f1dbf07e3135a2ccfbf558d44f4743e23e73ce7c143396b26ae49c4d *mipsel-linux.elf/upx-3.91
|
||||||
04ad8f4a60de80bbba7953489d3ef4b74b89a3961ae764acee00bd6df814ed9a *powerpc-linux.elf/upx-3.91
|
96bcf3f5f0f5168d5cdfc01dee5d35e77e0eb8401ae6623ab559254cc99ffbdc *powerpc-linux.elf/upx-3.91
|
||||||
"
|
"
|
||||||
expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\
|
expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\
|
||||||
c8f0808d9cd81ece5f04c33388e6c5a056e2ceeb03308a1aa390ea6afc22d6ba *amd64-linux.elf/upx-3.91
|
3ded78e90066b688f820a35fe10270c2d3c00bc4c09d02f811b14a959003cd6b *amd64-linux.elf/upx-3.91
|
||||||
685b7e419b8b0fe3cabdf338a5cad17da55edc608c1bb91c13580b5988d38908 *arm-wince.pe/upx-3.91.exe
|
6f70c268d4686a50db2843efc58ef547048d8ed0d758bad0c95a50b3ce155a1f *arm-wince.pe/upx-3.91.exe
|
||||||
7344cf818e8a668c7364f47779742bf41b451ebb7db85abc917c463a5f9c9d9a *armeb-linux.elf/upx-3.91
|
20acc14939776fcd2e643cea83075d84a764fb12942ce52fa0e72dc313df026b *armeb-linux.elf/upx-3.91
|
||||||
fd0652470c19ebb4a2d1a49e02e71acf9fadab78e513bb4f75d1dc26a0caa7a3 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
45ae9d42b5c6f1eec0ebc75e656c767efe796719b00922ba9e8095ffa5373450 *i386-dos32.djgpp2.coff/upx-3.91.exe
|
||||||
3b9dd7de613541f567b2573063399473deeaa015a1c3679fe0fb339d80724e0d *i386-linux.elf/upx-3.91
|
a6f13ec927d6a44fddd1af92190a530ff59282134080cd9881fef47b34e262f2 *i386-linux.elf/upx-3.91
|
||||||
5b334db8debd2d59470cad25c7b45e38f6195cdafe92dc8281e4edc9c51385ef *i386-win32.pe/upx-3.91.exe
|
14b192b5419ca0ec2b3f238dc6ed9c17596e82ff2674a299d4b0a76d118a73de *i386-win32.pe/upx-3.91.exe
|
||||||
db1c6a70d990cb9a8e02db9b28054267658ce371b8a50e909efdd04cd3670279 *m68k-atari.tos/upx-3.91.ttp
|
0c341752253e2c530f3dfefc1b4b3619f931f7e23f032a7feffeb192a6a3c373 *m68k-atari.tos/upx-3.91.ttp
|
||||||
19b801ace68ca0ff034dd557d3ef0a8340d8f17d7b97f120727f67ce098a7d7a *mipsel-linux.elf/upx-3.91
|
24887c6e98651b663cf04720bf7467501fa260a86ae8f83507669cce05d4b8bf *mipsel-linux.elf/upx-3.91
|
||||||
a0b3ba40848df9b3a8aac31bc20671992be179ec2d702337bd1addd15513c2e4 *powerpc-linux.elf/upx-3.91
|
22947eb320540740b012aa53e85b99b038d5c4bf0ebcd28ea76c1c4f9018878f *powerpc-linux.elf/upx-3.91
|
||||||
"
|
"
|
||||||
########## end .sha256sums.recreate
|
########## end .sha256sums.recreate
|
||||||
|
|
||||||
|
|||||||
+71
-38
@@ -2,11 +2,13 @@
|
|||||||
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
dist: precise
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
notifications: { email: { on_success: never, on_failure: change } }
|
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
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-precise-3.5
|
- llvm-toolchain-precise-3.5
|
||||||
- llvm-toolchain-precise-3.6
|
- llvm-toolchain-precise-3.6
|
||||||
@@ -14,6 +16,11 @@ notifications: { email: { on_success: never, on_failure: change } }
|
|||||||
- llvm-toolchain-precise-3.8
|
- llvm-toolchain-precise-3.8
|
||||||
- llvm-toolchain-precise-3.9
|
- 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:
|
env:
|
||||||
global:
|
global:
|
||||||
- CROSS= C= B= T= X=
|
- CROSS= C= B= T= X=
|
||||||
@@ -24,7 +31,6 @@ matrix:
|
|||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
sudo: required
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: X=rebuild-stubs
|
env: X=rebuild-stubs
|
||||||
@@ -32,19 +38,19 @@ matrix:
|
|||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.4-m32
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.4-m64
|
env: C=gcc-4.4-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-4.4" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-4.4" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.5-m32
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.5-m64
|
env: C=gcc-4.5-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-4.5" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-4.5" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.6-m32
|
env: C=gcc-4.6-m32
|
||||||
@@ -55,21 +61,20 @@ matrix:
|
|||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.7-m32
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.7-m64
|
env: C=gcc-4.7-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-4.7" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-4.7" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.8-m32
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.8-m64
|
env: C=gcc-4.8-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-4.8" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-4.8" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
sudo: required
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.8-mx32
|
env: C=gcc-4.8-mx32
|
||||||
@@ -77,47 +82,57 @@ matrix:
|
|||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.9-m32
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-4.9-m64
|
env: C=gcc-4.9-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-4.9" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-4.9" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-5-m32
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-5-m64
|
env: C=gcc-5-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-5" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-5" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-6-m32
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-6-m64
|
env: C=gcc-6-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-6-m32 B=debug
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-6-m64 B=debug
|
env: C=gcc-6-m64 B=debug
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-6-m64 B=debug+sanitize
|
env: C=gcc-6-m64 B=debug+sanitize
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-6-m64 B=sanitize
|
env: C=gcc-6-m64 B=sanitize
|
||||||
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
|
addons: { apt: { sources: *PS, packages: [ "g++-6" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: C=gcc-6-m64 B=valgrind T=valgrind
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.4-m32
|
env: C=clang-3.4-m32
|
||||||
@@ -128,66 +143,76 @@ matrix:
|
|||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.5-m32
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.5-m64
|
env: C=clang-3.5-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "clang-3.5" ] } }
|
addons: { apt: { sources: *PS, packages: [ "clang-3.5" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.6-m32
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.6-m64
|
env: C=clang-3.6-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "clang-3.6" ] } }
|
addons: { apt: { sources: *PS, packages: [ "clang-3.6" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.7-m32
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.7-m64
|
env: C=clang-3.7-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "clang-3.7" ] } }
|
addons: { apt: { sources: *PS, packages: [ "clang-3.7" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.8-m32
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.8-m64
|
env: C=clang-3.8-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
|
addons: { apt: { sources: *PS, packages: [ "clang-3.8" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.9-m32
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.9-m64
|
env: C=clang-3.9-m64
|
||||||
addons: { apt: { sources: *S, packages: [ "clang-3.9" ] } }
|
addons: { apt: { sources: *PS, packages: [ "clang-3.9" ] } }
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.9-m64 B=debug+sanitize
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.9-m64 B=sanitize
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.9-m64 B=debug+scan-build
|
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
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: C=clang-3.9-m64 B=scan-build
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: CROSS=arm-linux-gnueabi C=gcc-4.6 T=SKIP
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: CROSS=arm-linux-gnueabihf C=gcc-4.6 T=SKIP
|
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
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
@@ -223,6 +248,14 @@ matrix:
|
|||||||
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
|
||||||
|
compiler: clang
|
||||||
|
env: C=clang-900-m32
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9.2
|
||||||
|
compiler: clang
|
||||||
|
env: C=clang-900-m64
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- uname -a; pwd; id; umask
|
- uname -a; pwd; id; umask
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
The Ultimate Packer for eXecutables
|
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
|
https://upx.github.io
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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-2017 Markus Franz Xaver Johannes Oberhumer
|
# Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
|
||||||
#
|
#
|
||||||
|
|
||||||
MAKEFLAGS += -rR
|
MAKEFLAGS += -rR
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
User visible changes for UPX
|
User visible changes for UPX
|
||||||
==================================================================
|
==================================================================
|
||||||
|
|
||||||
|
Changes in 3.95 (26 Aug 2018):
|
||||||
|
* 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
|
||||||
|
* Better compatibility with varying layout of address space on Linux
|
||||||
|
* Support for 4 PT_LOAD layout in ELF generated by binutils-2.31
|
||||||
|
* bug fixes, particularly better diagnosis of malformed input
|
||||||
|
* bug fixes - see https://github.com/upx/upx/milestone/4
|
||||||
|
|
||||||
Changes in 3.94 (12 May 2017):
|
Changes in 3.94 (12 May 2017):
|
||||||
* Add support for arm64-linux (aka "aarch64").
|
* Add support for arm64-linux (aka "aarch64").
|
||||||
* Add support for --lzma compression on 64-bit PowerPC (Thierry Fauck).
|
* Add support for --lzma compression on 64-bit PowerPC (Thierry Fauck).
|
||||||
@@ -10,12 +18,11 @@ Changes in 3.94 (12 May 2017):
|
|||||||
* bug fixes - see https://github.com/upx/upx/milestone/3
|
* bug fixes - see https://github.com/upx/upx/milestone/3
|
||||||
|
|
||||||
Changes in 3.93 (29 Jan 2017):
|
Changes in 3.93 (29 Jan 2017):
|
||||||
* UPX has moved to GitHub - the new home page is https://upx.github.io
|
|
||||||
* Fixed some win32/pe and win64/pe regressions introduced in 3.92
|
* Fixed some win32/pe and win64/pe regressions introduced in 3.92
|
||||||
* bug fixes - see https://github.com/upx/upx/milestone/1
|
* bug fixes - see https://github.com/upx/upx/milestone/2
|
||||||
|
|
||||||
Changes in 3.92 (11 Dec 2016):
|
Changes in 3.92 (11 Dec 2016):
|
||||||
* UPX has moved to GitHub - the new home page is https://upx.github.io
|
* INFO: UPX has moved to GitHub - the new home page is https://upx.github.io
|
||||||
* IMPORTANT: all PE formats: internal changes: reunited the diverged source
|
* IMPORTANT: all PE formats: internal changes: reunited the diverged source
|
||||||
files - please report all regressions into the bug tracker and try UPX 3.91
|
files - please report all regressions into the bug tracker and try UPX 3.91
|
||||||
in case of problems.
|
in case of problems.
|
||||||
@@ -111,7 +118,7 @@ Changes in 2.93 beta (08 Mar 2007):
|
|||||||
you have to explicitly use '--lzma' even for '--ultra-brute' here
|
you have to explicitly use '--lzma' even for '--ultra-brute' here
|
||||||
because runtime decompression is about 30 times slower than NRV -
|
because runtime decompression is about 30 times slower than NRV -
|
||||||
which is really noticeable on old machines.
|
which is really noticeable on old machines.
|
||||||
* dos/exe: fixed a rarely occuring bug in relocation handling
|
* dos/exe: fixed a rarely occurring bug in relocation handling
|
||||||
* win32/pe & arm/pe: better icon compression handling
|
* win32/pe & arm/pe: better icon compression handling
|
||||||
|
|
||||||
Changes in 2.92 beta (23 Jan 2007):
|
Changes in 2.92 beta (23 Jan 2007):
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
The Ultimate Packer for eXecutables
|
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
|
https://upx.github.io
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
The Ultimate Packer for eXecutables
|
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
|
https://upx.github.io
|
||||||
|
|
||||||
|
|
||||||
@@ -103,9 +103,9 @@ THE FUTURE
|
|||||||
COPYRIGHT
|
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
|
||||||
|
|
||||||
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
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
The Ultimate Packer for eXecutables
|
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
|
https://upx.github.io
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ Prerequisites
|
|||||||
|
|
||||||
- first of all you need to build the UCL compression library
|
- first of all you need to build the UCL compression library
|
||||||
http://www.oberhumer.com/opensource/ucl/
|
http://www.oberhumer.com/opensource/ucl/
|
||||||
|
Use "CC=gcc -std=gnu89" especially with gcc-6.3 and gcc-7.1.
|
||||||
|
To build for native aarch64 (64-bit ARM) the files config.guess
|
||||||
|
and config.sub must be updated according to the recipe at
|
||||||
|
https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html
|
||||||
|
|
||||||
|
|
||||||
Tools needed to build/modify the UPX sources
|
Tools needed to build/modify the UPX sources
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
The Ultimate Packer for eXecutables
|
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
|
https://upx.github.io
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -50,22 +50,28 @@ mostlyclean clean distclean maintainer-clean:
|
|||||||
|
|
||||||
%.1 : %.pod
|
%.1 : %.pod
|
||||||
pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@
|
pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@
|
||||||
|
test -s $@
|
||||||
|
|
||||||
%.doc : %.pod
|
%.doc : %.pod
|
||||||
pod2text < $< | $(RTRIM) > $@
|
pod2text < $< | $(RTRIM) > $@
|
||||||
|
test -s $@
|
||||||
|
|
||||||
%.html : %.pod
|
%.html : %.pod
|
||||||
pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@
|
pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@
|
||||||
@rm -f pod2htm*
|
@rm -f pod2htm*
|
||||||
|
test -s $@
|
||||||
|
|
||||||
%.man : %.1
|
%.man : %.1
|
||||||
nroff -man $< | $(RTRIM) > $@
|
nroff -man $< | $(RTRIM) > $@
|
||||||
|
test -s $@
|
||||||
|
|
||||||
%.ps : %.1
|
%.ps : %.1
|
||||||
groff -man $< | $(RTRIM) > $@
|
groff -man $< | $(RTRIM) > $@
|
||||||
|
test -s $@
|
||||||
|
|
||||||
%.tex : %.pod
|
%.tex : %.pod
|
||||||
pod2latex $<
|
pod2latex $<
|
||||||
|
test -s $@
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
Decompressing ELF Directly to Memory on Linux/x86
|
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:
|
References:
|
||||||
<elf.h> definitions for the ELF file format
|
<elf.h> definitions for the ELF file format
|
||||||
|
|||||||
+6
-6
@@ -13,8 +13,8 @@ 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-2017 Markus Oberhumer, Laszlo Molnar & John Reiser
|
Copyright (c) 1996-2018 Markus Oberhumer, Laszlo Molnar & John Reiser
|
||||||
http://upx.sourceforge.net
|
https://upx.github.io
|
||||||
|
|
||||||
|
|
||||||
B<UPX> is a portable, extendable, high-performance executable packer for
|
B<UPX> is a portable, extendable, high-performance executable packer for
|
||||||
@@ -934,13 +934,13 @@ Please report all bugs immediately to the authors.
|
|||||||
|
|
||||||
=head1 COPYRIGHT
|
=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
|
This program may be used freely, and you are welcome to
|
||||||
redistribute it under certain conditions.
|
redistribute it under certain conditions.
|
||||||
|
|||||||
+3
-3
@@ -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-2017 Markus Franz Xaver Johannes Oberhumer
|
# Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
|
||||||
#
|
#
|
||||||
|
|
||||||
# build configuration options for this Makefile
|
# build configuration options for this Makefile
|
||||||
@@ -163,11 +163,11 @@ endif
|
|||||||
|
|
||||||
# automatically format some C++ source code files
|
# automatically format some C++ source code files
|
||||||
ifeq ($(shell uname),Linux)
|
ifeq ($(shell uname),Linux)
|
||||||
CLANG_FORMAT_FILES += linker.cpp linker.h packhead.cpp packmast.cpp
|
CLANG_FORMAT_FILES += linker.cpp linker.h packhead.cpp packmast.cpp packmast.h
|
||||||
CLANG_FORMAT_FILES += s_djgpp2.cpp s_object.cpp s_vcsa.cpp s_win32.cpp screen.h
|
CLANG_FORMAT_FILES += s_djgpp2.cpp s_object.cpp s_vcsa.cpp s_win32.cpp screen.h
|
||||||
CLANG_FORMAT_FILES += snprintf.cpp
|
CLANG_FORMAT_FILES += snprintf.cpp
|
||||||
CLANG_FORMAT_FILES += stdcxx.cpp stdcxx.h
|
CLANG_FORMAT_FILES += stdcxx.cpp stdcxx.h
|
||||||
CLANG_FORMAT_FILES += ui.cpp ui.h util.h
|
CLANG_FORMAT_FILES += ui.cpp ui.h util.cpp util.h work.cpp
|
||||||
clang-format:
|
clang-format:
|
||||||
$(top_srcdir)/src/stub/scripts/upx-clang-format -i $(addprefix $(top_srcdir)/src/,$(CLANG_FORMAT_FILES))
|
$(top_srcdir)/src/stub/scripts/upx-clang-format -i $(addprefix $(top_srcdir)/src/,$(CLANG_FORMAT_FILES))
|
||||||
.PHONY: clang-format
|
.PHONY: clang-format
|
||||||
|
|||||||
+2
-2
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
|
||||||
|
|||||||
+13
-9
@@ -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-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
|
||||||
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
|
||||||
@@ -43,8 +43,6 @@
|
|||||||
|
|
||||||
void lzma_compress_config_t::reset()
|
void lzma_compress_config_t::reset()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof(*this));
|
|
||||||
|
|
||||||
pos_bits.reset();
|
pos_bits.reset();
|
||||||
lit_pos_bits.reset();
|
lit_pos_bits.reset();
|
||||||
lit_context_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->num_fast_bytes = 64; // 5 .. 273
|
||||||
res->match_finder_cycles = 0;
|
res->match_finder_cycles = 0;
|
||||||
// UPX overrides
|
// UPX overrides
|
||||||
res->pos_bits = lzma_compress_config_t::pos_bits_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_c;
|
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_c;
|
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_c;
|
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_c;
|
res->num_fast_bytes = lzma_compress_config_t::num_fast_bytes_t::default_value;
|
||||||
// method overrides
|
// method overrides
|
||||||
if (method >= 0x100) {
|
if (method >= 0x100) {
|
||||||
res->pos_bits = (method >> 16) & 15;
|
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));
|
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);
|
//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;
|
return 0;
|
||||||
|
|||||||
@@ -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-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
|
||||||
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,8 +2,8 @@
|
|||||||
|
|
||||||
This file is part of the UPX executable compressor.
|
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
|
||||||
Copyright (C) 1996-2017 Laszlo Molnar
|
Copyright (C) 1996-2018 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
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
void zlib_compress_config_t::reset()
|
void zlib_compress_config_t::reset()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof(*this));
|
mem_clear(this, sizeof(*this));
|
||||||
|
|
||||||
mem_level.reset();
|
mem_level.reset();
|
||||||
window_bits.reset();
|
window_bits.reset();
|
||||||
|
|||||||
+21
-14
@@ -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-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
|
||||||
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
|
||||||
@@ -416,6 +416,10 @@ private:
|
|||||||
#define UPX_F_LINUX_ELF32_MIPSEB 137
|
#define UPX_F_LINUX_ELF32_MIPSEB 137
|
||||||
#define UPX_F_DYLIB_PPC32 138
|
#define UPX_F_DYLIB_PPC32 138
|
||||||
|
|
||||||
|
#define UPX_F_MACH_PPC64 139
|
||||||
|
#define UPX_F_LINUX_ELFPPC64 140
|
||||||
|
#define UPX_F_VMLINUX_PPC64 141
|
||||||
|
#define UPX_F_DYLIB_PPC64 142
|
||||||
|
|
||||||
// compression methods
|
// compression methods
|
||||||
#define M_ALL (-1)
|
#define M_ALL (-1)
|
||||||
@@ -476,24 +480,27 @@ struct upx_callback_t
|
|||||||
// compression - config_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
|
struct OptVar
|
||||||
{
|
{
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
static const T default_value_c = default_value;
|
static const T default_value = default_value_;
|
||||||
static const T min_value_c = min_value;
|
static const T min_value = min_value_;
|
||||||
static const T max_value_c = max_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"
|
// info: this generates annoying warnings "unsigned >= 0 is always true"
|
||||||
//assert(v >= min_value_c);
|
//assert(v >= min_value);
|
||||||
assert(v == min_value_c || v >= min_value_c + 1);
|
assert(v == min_value || v >= min_value + 1);
|
||||||
assert(v <= max_value_c);
|
assert(v <= max_value);
|
||||||
|
}
|
||||||
|
void assertValue() const {
|
||||||
|
assertValue(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
OptVar() : v(default_value), is_set(0) { }
|
OptVar() : v(default_value), is_set(0) { }
|
||||||
OptVar& operator= (const T other) {
|
OptVar& operator= (const T &other) {
|
||||||
v = other; is_set += 1;
|
v = other; is_set = 1;
|
||||||
assertValue();
|
assertValue();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -509,10 +516,10 @@ struct OptVar
|
|||||||
// optional assignments
|
// optional assignments
|
||||||
template <class T, T a, T b, T c>
|
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) {
|
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>
|
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; }
|
if (other.is_set) { v = other.v; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
|
||||||
@@ -129,7 +129,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
// application execptions
|
// application exceptions
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
class OverlayException : public Exception
|
class OverlayException : public Exception
|
||||||
|
|||||||
+4
-2
@@ -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-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
|
||||||
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
|
||||||
@@ -140,6 +140,7 @@ int FileBase::read(void *buf, int len)
|
|||||||
{
|
{
|
||||||
if (!isOpen() || len < 0)
|
if (!isOpen() || len < 0)
|
||||||
throwIOException("bad read");
|
throwIOException("bad read");
|
||||||
|
mem_size_assert(1, len); // sanity check
|
||||||
errno = 0;
|
errno = 0;
|
||||||
long l = acc_safe_hread(_fd, buf, len);
|
long l = acc_safe_hread(_fd, buf, len);
|
||||||
if (errno)
|
if (errno)
|
||||||
@@ -161,6 +162,7 @@ void FileBase::write(const void *buf, int len)
|
|||||||
{
|
{
|
||||||
if (!isOpen() || len < 0)
|
if (!isOpen() || len < 0)
|
||||||
throwIOException("bad write");
|
throwIOException("bad write");
|
||||||
|
mem_size_assert(1, len); // sanity check
|
||||||
errno = 0;
|
errno = 0;
|
||||||
long l = acc_safe_hwrite(_fd, buf, len);
|
long l = acc_safe_hwrite(_fd, buf, len);
|
||||||
if (l != len)
|
if (l != len)
|
||||||
|
|||||||
+2
-2
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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) 2004-2017 John F. Reiser
|
Copyright (C) 2004-2018 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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
|
||||||
|
|||||||
+7
-16
@@ -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-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
|
||||||
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
|
||||||
@@ -262,15 +262,6 @@ void show_help(int verbose)
|
|||||||
con_fprintf(f,
|
con_fprintf(f,
|
||||||
" --8086 make compressed sys work on any 8086\n"
|
" --8086 make compressed sys work on any 8086\n"
|
||||||
"\n");
|
"\n");
|
||||||
#if 0
|
|
||||||
fg = con_fg(f,FG_YELLOW);
|
|
||||||
con_fprintf(f,"Options for linux/386\n");
|
|
||||||
fg = con_fg(f,fg);
|
|
||||||
con_fprintf(f,
|
|
||||||
" --script use /usr/local/lib/upx/upx[bd] as decompressor\n"
|
|
||||||
" --script=/path/upxX use path/upxX as decompressor\n"
|
|
||||||
"\n");
|
|
||||||
#endif
|
|
||||||
fg = con_fg(f,FG_YELLOW);
|
fg = con_fg(f,FG_YELLOW);
|
||||||
con_fprintf(f,"Options for ps1/exe:\n");
|
con_fprintf(f,"Options for ps1/exe:\n");
|
||||||
fg = con_fg(f,fg);
|
fg = con_fg(f,fg);
|
||||||
@@ -370,7 +361,7 @@ void show_license(void)
|
|||||||
);
|
);
|
||||||
int fg = con_fg(f,FG_CYAN);
|
int fg = con_fg(f,FG_CYAN);
|
||||||
con_fprintf(f,
|
con_fprintf(f,
|
||||||
" http://upx.sourceforge.net\n"
|
" https://upx.github.io\n"
|
||||||
" http://www.oberhumer.com/opensource/upx/\n"
|
" http://www.oberhumer.com/opensource/upx/\n"
|
||||||
);
|
);
|
||||||
(void)con_fg(f,FG_ORANGE);
|
(void)con_fg(f,FG_ORANGE);
|
||||||
@@ -421,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-2017 Markus Franz Xaver Johannes Oberhumer\n");
|
fprintf(fp, "Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer\n");
|
||||||
fprintf(fp, "Copyright (C) 1996-2017 Laszlo Molnar\n");
|
fprintf(fp, "Copyright (C) 1996-2018 Laszlo Molnar\n");
|
||||||
fprintf(fp, "Copyright (C) 2000-2017 John F. Reiser\n");
|
fprintf(fp, "Copyright (C) 2000-2018 John F. Reiser\n");
|
||||||
fprintf(fp, "Copyright (C) 2002-2017 Jens Medoch\n");
|
fprintf(fp, "Copyright (C) 2002-2018 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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
|
||||||
@@ -112,7 +112,7 @@ protected:
|
|||||||
LE32 extra_heap_alloc;
|
LE32 extra_heap_alloc;
|
||||||
char reserved[12];
|
char reserved[12];
|
||||||
LE32 versioninfo;
|
LE32 versioninfo;
|
||||||
LE32 unkown;
|
LE32 unknown;
|
||||||
// 0xC0
|
// 0xC0
|
||||||
LE16 device_id;
|
LE16 device_id;
|
||||||
LE16 ddk_version;
|
LE16 ddk_version;
|
||||||
|
|||||||
+78
-38
@@ -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-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
|
||||||
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
|
||||||
@@ -592,38 +592,10 @@ void ElfLinkerAMD64::relocate1(const Relocation *rel, upx_byte *location, upx_ui
|
|||||||
super::relocate1(rel, location, value, type);
|
super::relocate1(rel, location, value, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElfLinkerARM64::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
|
||||||
const char *type) {
|
|
||||||
if (strncmp(type, "R_AARCH64_", 10))
|
|
||||||
return super::relocate1(rel, location, value, type);
|
|
||||||
type += 10;
|
|
||||||
|
|
||||||
if (!strncmp(type, "PREL", 4)) {
|
|
||||||
value -= rel->section->offset + rel->offset;
|
|
||||||
type += 4;
|
|
||||||
|
|
||||||
if (!strcmp(type, "16"))
|
|
||||||
set_le16(location, get_le16(location) + value);
|
|
||||||
else if (!strncmp(type, "32", 2)) // for "32" and "32S"
|
|
||||||
set_le32(location, get_le32(location) + value);
|
|
||||||
else if (!strcmp(type, "64"))
|
|
||||||
set_le64(location, get_le64(location) + value);
|
|
||||||
} else if (!strcmp(type, "ABS32")) {
|
|
||||||
set_le32(location, get_le32(location) + value);
|
|
||||||
} else if (!strcmp(type, "ABS64")) {
|
|
||||||
set_le64(location, get_le64(location) + value);
|
|
||||||
} else if (!strcmp(type, "CONDBR19")) {
|
|
||||||
value -= rel->section->offset + rel->offset;
|
|
||||||
upx_uint32_t const m19 = ~(~0u << 19);
|
|
||||||
upx_uint32_t w = get_le32(location);
|
|
||||||
set_le32(location, (w & ~(m19 << 5)) | ((((w >> 5) + (value >> 2)) & m19) << 5));
|
|
||||||
} else
|
|
||||||
super::relocate1(rel, location, value, type);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ElfLinkerArmBE::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
void ElfLinkerArmBE::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||||
const char *type) {
|
const char *type) {
|
||||||
if (strcmp(type, "R_ARM_PC24") == 0) {
|
if (!strcmp(type, "R_ARM_PC24") || !strcmp(type, "R_ARM_CALL") ||
|
||||||
|
!strcmp(type, "R_ARM_JUMP24")) {
|
||||||
value -= rel->section->offset + rel->offset;
|
value -= rel->section->offset + rel->offset;
|
||||||
set_be24(1 + location, get_be24(1 + location) + value / 4);
|
set_be24(1 + location, get_be24(1 + location) + value / 4);
|
||||||
} else if (strcmp(type, "R_ARM_ABS32") == 0) {
|
} else if (strcmp(type, "R_ARM_ABS32") == 0) {
|
||||||
@@ -647,7 +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,
|
void ElfLinkerArmLE::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||||
const char *type) {
|
const char *type) {
|
||||||
if (strcmp(type, "R_ARM_PC24") == 0) {
|
if (!strcmp(type, "R_ARM_PC24") || !strcmp(type, "R_ARM_CALL") ||
|
||||||
|
!strcmp(type, "R_ARM_JUMP24")) {
|
||||||
value -= rel->section->offset + rel->offset;
|
value -= rel->section->offset + rel->offset;
|
||||||
set_le24(location, get_le24(location) + value / 4);
|
set_le24(location, get_le24(location) + value / 4);
|
||||||
} else if (strcmp(type, "R_ARM_ABS32") == 0) {
|
} else if (strcmp(type, "R_ARM_ABS32") == 0) {
|
||||||
@@ -671,11 +644,40 @@ void ElfLinkerArmLE::relocate1(const Relocation *rel, upx_byte *location, upx_ui
|
|||||||
|
|
||||||
void ElfLinkerArm64LE::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
void ElfLinkerArm64LE::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||||
const char *type) {
|
const char *type) {
|
||||||
if (strcmp(type, "R_AARCH64_CALL26") == 0) {
|
if (strncmp(type, "R_AARCH64_", 10))
|
||||||
|
return super::relocate1(rel, location, value, type);
|
||||||
|
type += 10;
|
||||||
|
|
||||||
|
if (!strncmp(type, "PREL", 4)) {
|
||||||
value -= rel->section->offset + rel->offset;
|
value -= rel->section->offset + rel->offset;
|
||||||
set_le24(location, get_le24(location) + value / 4); // FIXME set_le26
|
type += 4;
|
||||||
} else if (strcmp(type, "R_AARCH64_ABS32") == 0) {
|
|
||||||
|
if (!strcmp(type, "16"))
|
||||||
|
set_le16(location, get_le16(location) + value);
|
||||||
|
else if (!strncmp(type, "32", 2)) // for "32" and "32S"
|
||||||
set_le32(location, get_le32(location) + value);
|
set_le32(location, get_le32(location) + value);
|
||||||
|
else if (!strcmp(type, "64"))
|
||||||
|
set_le64(location, get_le64(location) + value);
|
||||||
|
} else if (!strcmp(type, "ADR_PREL_LO21")) {
|
||||||
|
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));
|
||||||
|
} else if (!strcmp(type, "ABS32")) {
|
||||||
|
set_le32(location, get_le32(location) + value);
|
||||||
|
} else if (!strcmp(type, "ABS64")) {
|
||||||
|
set_le64(location, get_le64(location) + value);
|
||||||
|
} else if (!strcmp(type, "CONDBR19")) {
|
||||||
|
value -= rel->section->offset + rel->offset;
|
||||||
|
upx_uint32_t const m19 = ~(~0u << 19);
|
||||||
|
upx_uint32_t w = get_le32(location);
|
||||||
|
set_le32(location, (w & ~(m19 << 5)) | ((((w >> 5) + (value >> 2)) & m19) << 5));
|
||||||
|
} else if (!strcmp(type, "CALL26")) {
|
||||||
|
value -= rel->section->offset + rel->offset;
|
||||||
|
upx_uint32_t const m26 = ~(~0u << 26);
|
||||||
|
upx_uint32_t w = get_le32(location);
|
||||||
|
set_le32(location, (w & ~m26) | (m26 & (value >> 2)));
|
||||||
} else
|
} else
|
||||||
super::relocate1(rel, location, value, type);
|
super::relocate1(rel, location, value, type);
|
||||||
}
|
}
|
||||||
@@ -797,6 +799,14 @@ void ElfLinkerPpc32::relocate1(const Relocation *rel, upx_byte *location, upx_ui
|
|||||||
|
|
||||||
void ElfLinkerPpc64le::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
void ElfLinkerPpc64le::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||||
const char *type) {
|
const char *type) {
|
||||||
|
if (!strcmp(type, "R_PPC64_ADDR64")) {
|
||||||
|
set_le64(location, get_le64(location) + value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!strcmp(type, "R_PPC64_ADDR32")) {
|
||||||
|
set_le32(location, get_le32(location) + value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (strncmp(type, "R_PPC64_REL", 11))
|
if (strncmp(type, "R_PPC64_REL", 11))
|
||||||
return super::relocate1(rel, location, value, type);
|
return super::relocate1(rel, location, value, type);
|
||||||
type += 11;
|
type += 11;
|
||||||
@@ -816,11 +826,11 @@ void ElfLinkerPpc64le::relocate1(const Relocation *rel, upx_byte *location, upx_
|
|||||||
internal_error("target out of range (%d) in reloc %s:%x\n", displ, rel->section->name,
|
internal_error("target out of range (%d) in reloc %s:%x\n", displ, rel->section->name,
|
||||||
rel->offset);
|
rel->offset);
|
||||||
*location += value;
|
*location += value;
|
||||||
} else if (strncmp(type, "14", 2) == 0) // for "32" and "32S"
|
} else if (strncmp(type, "14", 2) == 0) // for "14" and "14S"
|
||||||
set_le16(location, get_le16(location) + value);
|
set_le16(location, get_le16(location) + value);
|
||||||
else if (strcmp(type, "16") == 0)
|
else if (strcmp(type, "16") == 0)
|
||||||
set_le16(location, get_le16(location) + value);
|
set_le16(location, get_le16(location) + value);
|
||||||
else if (strncmp(type, "24", 2) == 0) // for "32" and "32S"
|
else if (strncmp(type, "24", 2) == 0) // for "24" and "24S"
|
||||||
set_le24(location, get_le24(location) + value);
|
set_le24(location, get_le24(location) + value);
|
||||||
else if (strncmp(type, "32", 2) == 0) // for "32" and "32S"
|
else if (strncmp(type, "32", 2) == 0) // for "32" and "32S"
|
||||||
set_le32(location, get_le32(location) + value);
|
set_le32(location, get_le32(location) + value);
|
||||||
@@ -830,6 +840,36 @@ void ElfLinkerPpc64le::relocate1(const Relocation *rel, upx_byte *location, upx_
|
|||||||
super::relocate1(rel, location, value, type);
|
super::relocate1(rel, location, value, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ElfLinkerPpc64::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||||
|
const char *type) {
|
||||||
|
if (!strcmp(type, "R_PPC64_ADDR32")) {
|
||||||
|
set_be32(location, get_be32(location) + value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!strcmp(type, "R_PPC64_ADDR64")) {
|
||||||
|
set_be64(location, get_be64(location) + value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (strncmp(type, "R_PPC64_REL", 11))
|
||||||
|
return super::relocate1(rel, location, value, type);
|
||||||
|
type += 11;
|
||||||
|
|
||||||
|
if (strncmp(type, "PC", 2) == 0) {
|
||||||
|
type += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We have "R_PPC64_REL" or "R_PPC64_RELPC" as a prefix.
|
||||||
|
/* value will hold relative displacement */
|
||||||
|
value -= rel->section->offset + rel->offset;
|
||||||
|
|
||||||
|
if (strncmp(type, "14", 2) == 0) // for "14" and "14S"
|
||||||
|
set_be16(2 + location, get_be16(2 + location) + value);
|
||||||
|
else if (strncmp(type, "24", 2) == 0) // for "24" and "24S"
|
||||||
|
set_be24(1 + location, get_be24(1 + location) + value);
|
||||||
|
else
|
||||||
|
super::relocate1(rel, location, value, type);
|
||||||
|
}
|
||||||
|
|
||||||
void ElfLinkerX86::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
void ElfLinkerX86::relocate1(const Relocation *rel, upx_byte *location, upx_uint64_t value,
|
||||||
const char *type) {
|
const char *type) {
|
||||||
if (strncmp(type, "R_386_", 6))
|
if (strncmp(type, "R_386_", 6))
|
||||||
|
|||||||
+13
-2
@@ -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-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
|
||||||
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
|
||||||
@@ -246,6 +246,17 @@ protected:
|
|||||||
const char *type);
|
const char *type);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ElfLinkerPpc64 : public ElfLinker {
|
||||||
|
typedef ElfLinker super;
|
||||||
|
|
||||||
|
public:
|
||||||
|
ElfLinkerPpc64() { bele = &N_BELE_RTP::be_policy; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void relocate1(const Relocation *, upx_byte *location, upx_uint64_t value,
|
||||||
|
const char *type);
|
||||||
|
};
|
||||||
|
|
||||||
class ElfLinkerX86 : public ElfLinker {
|
class ElfLinkerX86 : public ElfLinker {
|
||||||
typedef ElfLinker super;
|
typedef ElfLinker super;
|
||||||
|
|
||||||
|
|||||||
+7
-3
@@ -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-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
|
||||||
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
|
||||||
@@ -46,7 +46,7 @@ int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK;
|
|||||||
void options_t::reset()
|
void options_t::reset()
|
||||||
{
|
{
|
||||||
options_t *o = this;
|
options_t *o = this;
|
||||||
memset(o, 0, sizeof(*o));
|
mem_clear(o, sizeof(*o));
|
||||||
o->crp.reset();
|
o->crp.reset();
|
||||||
|
|
||||||
o->cmd = CMD_NONE;
|
o->cmd = CMD_NONE;
|
||||||
@@ -869,6 +869,9 @@ static int do_option(int optc, const char *arg)
|
|||||||
case 676:
|
case 676:
|
||||||
opt->o_unix.android_shlib = true;
|
opt->o_unix.android_shlib = true;
|
||||||
break;
|
break;
|
||||||
|
case 677:
|
||||||
|
opt->o_unix.force_pie = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case '\0':
|
case '\0':
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1020,6 +1023,7 @@ static const struct mfx_option longopts[] =
|
|||||||
{"unmap-all-pages", 0x10, 0, 674}, // linux /proc/self/exe vanishes
|
{"unmap-all-pages", 0x10, 0, 674}, // linux /proc/self/exe vanishes
|
||||||
{"preserve-build-id", 0, 0, 675},
|
{"preserve-build-id", 0, 0, 675},
|
||||||
{"android-shlib", 0, 0, 676},
|
{"android-shlib", 0, 0, 676},
|
||||||
|
{"force-pie", 0, 0, 677},
|
||||||
// watcom/le
|
// watcom/le
|
||||||
{"le", 0x10, 0, 620}, // produce LE output
|
{"le", 0x10, 0, 620}, // produce LE output
|
||||||
// win32/pe
|
// win32/pe
|
||||||
|
|||||||
+14
-2
@@ -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-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
|
||||||
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
|
||||||
@@ -73,6 +73,18 @@ MemBuffer::~MemBuffer()
|
|||||||
this->dealloc();
|
this->dealloc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// similar to BoundedPtr, except checks only at creation
|
||||||
|
unsigned char *MemBuffer::subref(char const *errfmt, unsigned skip, unsigned take)
|
||||||
|
{
|
||||||
|
if ((take + skip) < take // wrap-around
|
||||||
|
|| (take + skip) > b_size // overrun
|
||||||
|
) {
|
||||||
|
char buf[100]; snprintf(buf, sizeof(buf), errfmt, skip, take);
|
||||||
|
throwCantPack(buf);
|
||||||
|
}
|
||||||
|
return &b[skip];
|
||||||
|
}
|
||||||
|
|
||||||
void MemBuffer::dealloc()
|
void MemBuffer::dealloc()
|
||||||
{
|
{
|
||||||
if (b != NULL)
|
if (b != NULL)
|
||||||
|
|||||||
@@ -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-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
|
||||||
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
|
||||||
@@ -64,6 +64,11 @@ public:
|
|||||||
void clear(unsigned off, unsigned len) { fill(off, len, 0); }
|
void clear(unsigned off, unsigned len) { fill(off, len, 0); }
|
||||||
void clear() { fill(0, b_size, 0); }
|
void clear() { fill(0, b_size, 0); }
|
||||||
|
|
||||||
|
// If the entire range [skip, take+skip) is inside the buffer,
|
||||||
|
// then return &b[skip]; else throwCantPack(sprintf(errfmt, skip, take)).
|
||||||
|
// This is similar to BoundedPtr, except only checks once.
|
||||||
|
unsigned char *subref(char const *errfmt, unsigned skip, unsigned take);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned char *b;
|
unsigned char *b;
|
||||||
unsigned b_size;
|
unsigned b_size;
|
||||||
|
|||||||
+1
-1
@@ -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-2017 Markus Franz Xaver Johannes Oberhumer
|
Copyright (C) 1996-2018 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
|
||||||
|
|||||||
+2
-2
@@ -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-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
|
||||||
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
-2
@@ -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-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
|
||||||
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
|
||||||
@@ -147,6 +147,7 @@ struct options_t {
|
|||||||
unsigned char osabi0; // replacement if 0==.e_ident[EI_OSABI]
|
unsigned char osabi0; // replacement if 0==.e_ident[EI_OSABI]
|
||||||
bool preserve_build_id; // copy the build-id to the compressed binary
|
bool preserve_build_id; // copy the build-id to the compressed binary
|
||||||
bool android_shlib; // keep some ElfXX_Shdr for dlopen()
|
bool android_shlib; // keep some ElfXX_Shdr for dlopen()
|
||||||
|
bool force_pie; // choose DF_1_PIE instead of is_shlib
|
||||||
} o_unix;
|
} o_unix;
|
||||||
struct {
|
struct {
|
||||||
bool le;
|
bool le;
|
||||||
|
|||||||
+2
-11
@@ -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-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
|
||||||
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
|
||||||
@@ -92,15 +92,6 @@ void PackArmPe::processImports2(unsigned myimport, unsigned iat_off) // pass 2
|
|||||||
{
|
{
|
||||||
PeFile::processImports2(myimport, iat_off);
|
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
|
// adjust import data
|
||||||
for (import_desc *im = (import_desc*) oimpdlls; im->dllname; im++)
|
for (import_desc *im = (import_desc*) oimpdlls; im->dllname; im++)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
|
||||||
|
|||||||
+44
-2
@@ -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-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
|
||||||
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
|
||||||
@@ -126,6 +126,8 @@
|
|||||||
SHT_GNU_LIBLIST = 0x6ffffff7 /* Prelink library list */
|
SHT_GNU_LIBLIST = 0x6ffffff7 /* Prelink library list */
|
||||||
|
|
||||||
, SHT_LOOS = 0x60000000 /* LOcal OS; SHT_ANDROID_REL{,A} is +1, +2 */
|
, SHT_LOOS = 0x60000000 /* LOcal OS; SHT_ANDROID_REL{,A} is +1, +2 */
|
||||||
|
, SHT_LOPROC = 0x70000000/* Start of processor-specific */
|
||||||
|
, SHT_ARM_ATTRIBUTES = (SHT_LOPROC + 3) /* ARM attributes section. */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { // sh_flags
|
enum { // sh_flags
|
||||||
@@ -146,6 +148,7 @@
|
|||||||
DT_NULL = 0, /* End flag */
|
DT_NULL = 0, /* End flag */
|
||||||
DT_NEEDED = 1, /* Name of needed library */
|
DT_NEEDED = 1, /* Name of needed library */
|
||||||
DT_PLTRELSZ = 2, /* Size in bytes of PLT relocs */
|
DT_PLTRELSZ = 2, /* Size in bytes of PLT relocs */
|
||||||
|
DT_PLTGOT = 3, /* Processor defined value */
|
||||||
DT_HASH = 4, /* Hash table of symbol names */
|
DT_HASH = 4, /* Hash table of symbol names */
|
||||||
DT_STRTAB = 5, /* String table */
|
DT_STRTAB = 5, /* String table */
|
||||||
DT_SYMTAB = 6, /* Symbol table */
|
DT_SYMTAB = 6, /* Symbol table */
|
||||||
@@ -153,18 +156,31 @@
|
|||||||
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_INIT = 12, /* Address of init function */
|
DT_INIT = 12, /* Address of init 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_RELENT = 19, /* Size of one Rel relocation */
|
DT_RELENT = 19, /* Size of one Rel relocation */
|
||||||
DT_STRSZ = 10, /* Sizeof string table */
|
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 */
|
||||||
|
DT_INIT_ARRAY = 25, /* Array with addresses of init fct */
|
||||||
|
DT_FINI_ARRAY = 26, /* Array with addresses of fini fct */
|
||||||
|
DT_INIT_ARRAYSZ= 27, /* size in bytes */
|
||||||
|
DT_FINI_ARRAYSZ= 28, /* size in bytes */
|
||||||
|
DT_PREINIT_ARRAY = 32, /* Array with addresses of preinit fct*/
|
||||||
|
DT_PREINIT_ARRAYSZ= 33, /* size in bytes */
|
||||||
DT_CHECKSUM = 0x6ffffdf8, /* Only for prelink? */
|
DT_CHECKSUM = 0x6ffffdf8, /* Only for prelink? */
|
||||||
DT_GNU_HASH = 0x6ffffef5, /* GNU-style hash table */
|
DT_GNU_HASH = 0x6ffffef5, /* GNU-style hash table */
|
||||||
DT_VERSYM = 0x6ffffff0, /* version[] for each symbol */
|
DT_VERSYM = 0x6ffffff0, /* version[] for each symbol */
|
||||||
|
DT_FLAGS_1 = 0x6ffffffb, /* DF_1_* */
|
||||||
DT_VERDEF = 0x6ffffffc, /* version definitions[] */
|
DT_VERDEF = 0x6ffffffc, /* version definitions[] */
|
||||||
DT_VERNEEDED= 0x6ffffffe /* version[] needed */
|
DT_VERNEEDED= 0x6ffffffe /* version[] needed */
|
||||||
};
|
};
|
||||||
|
enum { // DT_FLAGS_1
|
||||||
|
DF_1_NOW = 0x00000001, /* Set RTLD_NOW for this object. */
|
||||||
|
DF_1_PIE = 0x08000000 // Position-Independent Executable (main program)
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -201,6 +217,32 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WANT_REL_ENUM //{
|
||||||
|
#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,
|
||||||
|
R_ARM_RELATIVE = 23,
|
||||||
|
R_PPC_RELATIVE = 22,
|
||||||
|
R_PPC64_RELATIVE = R_PPC_RELATIVE,
|
||||||
|
R_X86_64_RELATIVE = 8,
|
||||||
|
|
||||||
|
R_386_JMP_SLOT = 7,
|
||||||
|
R_AARCH64_JUMP_SLOT = 1026,
|
||||||
|
R_ARM_JUMP_SLOT = 22,
|
||||||
|
R_PPC_JMP_SLOT = 21,
|
||||||
|
R_PPC64_JMP_SLOT = R_PPC_JMP_SLOT,
|
||||||
|
R_X86_64_JUMP_SLOT = 7
|
||||||
|
};
|
||||||
|
#endif //}
|
||||||
|
|
||||||
#ifdef WANT_NHDR_ENUM
|
#ifdef WANT_NHDR_ENUM
|
||||||
#undef WANT_NHDR_ENUM
|
#undef WANT_NHDR_ENUM
|
||||||
enum { // ELF PT_NOTE types
|
enum { // ELF PT_NOTE types
|
||||||
|
|||||||
+7
-3
@@ -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-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
|
||||||
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
|
||||||
@@ -281,9 +281,13 @@ int PackExe::readFileHeader()
|
|||||||
if (ih.ident != 'M' + 'Z'*256 && ih.ident != 'Z' + 'M'*256)
|
if (ih.ident != 'M' + 'Z'*256 && ih.ident != 'Z' + 'M'*256)
|
||||||
return 0;
|
return 0;
|
||||||
ih_exesize = ih.m512 + ih.p512*512 - (ih.m512 ? 512 : 0);
|
ih_exesize = ih.m512 + ih.p512*512 - (ih.m512 ? 512 : 0);
|
||||||
|
if (!ih_exesize) {
|
||||||
|
ih_exesize = file_size;
|
||||||
|
}
|
||||||
ih_imagesize = ih_exesize - ih.headsize16*16;
|
ih_imagesize = ih_exesize - ih.headsize16*16;
|
||||||
ih_overlay = file_size - ih_exesize;
|
ih_overlay = file_size - ih_exesize;
|
||||||
if (ih.m512+ih.p512*512u < sizeof (ih))
|
if (file_size < (int)sizeof(ih)
|
||||||
|
|| ((ih.m512 | ih.p512) && ih.m512+ih.p512*512u < sizeof (ih)))
|
||||||
throwCantPack("illegal exe header");
|
throwCantPack("illegal exe header");
|
||||||
if (file_size < (off_t)ih_exesize || ih_imagesize <= 0 || ih_imagesize > ih_exesize)
|
if (file_size < (off_t)ih_exesize || ih_imagesize <= 0 || ih_imagesize > ih_exesize)
|
||||||
throwCantPack("exe header corrupted");
|
throwCantPack("exe header corrupted");
|
||||||
|
|||||||
+2
-2
@@ -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-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
|
||||||
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
|
||||||
|
|||||||
+1610
-1239
File diff suppressed because it is too large
Load Diff
+71
-17
@@ -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-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
|
||||||
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
|
||||||
@@ -51,7 +51,7 @@ protected:
|
|||||||
|
|
||||||
virtual void pack1(OutputFile *, Filter &) = 0; // generate executable header
|
virtual void pack1(OutputFile *, Filter &) = 0; // generate executable header
|
||||||
virtual int pack2(OutputFile *, Filter &) = 0; // append compressed data
|
virtual int pack2(OutputFile *, Filter &) = 0; // append compressed data
|
||||||
virtual void pack3(OutputFile *, Filter &) = 0; // append loader
|
virtual off_t pack3(OutputFile *, Filter &) = 0; // append loader
|
||||||
//virtual void pack4(OutputFile *, Filter &) = 0; // append pack header
|
//virtual void pack4(OutputFile *, Filter &) = 0; // append pack header
|
||||||
|
|
||||||
virtual void generateElfHdr(
|
virtual void generateElfHdr(
|
||||||
@@ -68,6 +68,7 @@ protected:
|
|||||||
static unsigned gnu_hash(char const *) /*const*/;
|
static unsigned gnu_hash(char const *) /*const*/;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
static unsigned int const asl_delta = (1u<<12); // --android-shlib extra page
|
||||||
unsigned e_type;
|
unsigned e_type;
|
||||||
unsigned e_phnum; /* Program header table entry count */
|
unsigned e_phnum; /* Program header table entry count */
|
||||||
unsigned e_shnum;
|
unsigned e_shnum;
|
||||||
@@ -80,18 +81,24 @@ protected:
|
|||||||
unsigned sz_pack2a; // after pack2() of all PT_LOAD
|
unsigned sz_pack2a; // after pack2() of all PT_LOAD
|
||||||
unsigned lg2_page; // log2(PAGE_SIZE)
|
unsigned lg2_page; // log2(PAGE_SIZE)
|
||||||
unsigned page_size; // 1u<<lg2_page
|
unsigned page_size; // 1u<<lg2_page
|
||||||
bool is_big; // stub style: must use area above the brk
|
bool is_pie; // is Position-Independent-Executable (ET_DYN main program)
|
||||||
unsigned xct_off; // shared library: file offset of SHT_EXECINSTR
|
unsigned xct_off; // shared library: file offset of SHT_EXECINSTR
|
||||||
unsigned hatch_off; // file offset of escape hatch
|
unsigned hatch_off; // file offset of escape hatch
|
||||||
|
unsigned o_binfo; // offset to first b_info
|
||||||
upx_uint64_t load_va; // PT_LOAD[0].p_vaddr
|
upx_uint64_t load_va; // PT_LOAD[0].p_vaddr
|
||||||
upx_uint64_t xct_va; // minimum SHT_EXECINSTR virtual address
|
upx_uint64_t xct_va; // minimum SHT_EXECINSTR virtual address
|
||||||
upx_uint64_t jni_onload_va; // runtime &JNI_OnLoad
|
upx_uint64_t jni_onload_va; // runtime &JNI_OnLoad
|
||||||
|
upx_uint64_t user_init_va;
|
||||||
|
unsigned user_init_off; // within file_image
|
||||||
|
|
||||||
upx_uint16_t e_machine;
|
upx_uint16_t e_machine;
|
||||||
unsigned char ei_class;
|
unsigned char ei_class;
|
||||||
unsigned char ei_data;
|
unsigned char ei_data;
|
||||||
unsigned char ei_osabi;
|
unsigned char ei_osabi;
|
||||||
char const *osabi_note;
|
char const *osabi_note;
|
||||||
|
unsigned upx_dt_init; // DT_INIT, DT_PREINIT_ARRAY, DT_INIT_ARRAY
|
||||||
|
static unsigned const DT_NUM = 34; // elf.h
|
||||||
|
unsigned dt_table[DT_NUM]; // 1+ index in PT_DYNAMIC
|
||||||
|
|
||||||
unsigned char const *buildid_data;
|
unsigned char const *buildid_data;
|
||||||
int o_elf_shnum; // num output Shdrs
|
int o_elf_shnum; // num output Shdrs
|
||||||
@@ -117,15 +124,18 @@ protected:
|
|||||||
|
|
||||||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
||||||
virtual void pack3(OutputFile *, Filter &); // append loader
|
virtual off_t pack3(OutputFile *, Filter &); // append loader
|
||||||
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 unRel32(unsigned dt_rel, Elf32_Rel *rel0, unsigned relsz,
|
||||||
|
MemBuffer &membuf, unsigned const load_off, OutputFile *fo);
|
||||||
|
|
||||||
virtual void generateElfHdr(
|
virtual void generateElfHdr(
|
||||||
OutputFile *,
|
OutputFile *,
|
||||||
void const *proto,
|
void const *proto,
|
||||||
unsigned const brka
|
unsigned const brka
|
||||||
);
|
);
|
||||||
|
virtual void defineSymbols(Filter const *);
|
||||||
virtual void buildLinuxLoader(
|
virtual void buildLinuxLoader(
|
||||||
upx_byte const *const proto, // assembly-only sections
|
upx_byte const *const proto, // assembly-only sections
|
||||||
unsigned const szproto,
|
unsigned const szproto,
|
||||||
@@ -139,26 +149,33 @@ protected:
|
|||||||
virtual unsigned find_LOAD_gap(Elf32_Phdr const *const phdri, unsigned const k,
|
virtual unsigned find_LOAD_gap(Elf32_Phdr const *const phdri, unsigned const k,
|
||||||
unsigned const e_phnum);
|
unsigned const e_phnum);
|
||||||
virtual off_t getbase(const Elf32_Phdr *phdr, int e_phnum) const;
|
virtual off_t getbase(const Elf32_Phdr *phdr, int e_phnum) const;
|
||||||
|
bool calls_crt1(Elf32_Rel const *rel, int sz);
|
||||||
|
|
||||||
virtual Elf32_Sym const *elf_lookup(char const *) const;
|
virtual Elf32_Sym const *elf_lookup(char const *) const;
|
||||||
virtual unsigned elf_get_offset_from_address(unsigned) const;
|
virtual unsigned elf_get_offset_from_address(unsigned) const;
|
||||||
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_dynamic(Elf32_Phdr 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;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Elf32_Ehdr ehdri; // from input file
|
Elf32_Ehdr ehdri; // from input file
|
||||||
|
MemBuffer lowmem; // especially for shlib
|
||||||
Elf32_Phdr *phdri; // for input file
|
Elf32_Phdr *phdri; // for input file
|
||||||
Elf32_Shdr const *shdri; // from input file
|
Elf32_Shdr *shdri; // from input file
|
||||||
Elf32_Phdr const *gnu_stack; // propagate NX
|
Elf32_Phdr const *gnu_stack; // propagate NX
|
||||||
unsigned e_phoff;
|
unsigned e_phoff;
|
||||||
unsigned e_shoff;
|
unsigned e_shoff;
|
||||||
|
unsigned sz_dynseg; // PT_DYNAMIC.p_memsz
|
||||||
unsigned so_slide;
|
unsigned so_slide;
|
||||||
unsigned char *note_body; // concatenated contents of PT_NOTEs, if any
|
unsigned char *note_body; // concatenated contents of PT_NOTEs, if any
|
||||||
unsigned note_size; // total size of PT_NOTEs
|
unsigned note_size; // total size of PT_NOTEs
|
||||||
|
unsigned n_jmp_slot;
|
||||||
|
unsigned plt_off;
|
||||||
unsigned page_mask; // AND clears the offset-within-page
|
unsigned page_mask; // AND clears the offset-within-page
|
||||||
|
|
||||||
Elf32_Dyn const *dynseg; // from PT_DYNAMIC
|
Elf32_Dyn const *dynseg; // from PT_DYNAMIC
|
||||||
@@ -168,7 +185,7 @@ protected:
|
|||||||
Elf32_Sym const *jni_onload_sym;
|
Elf32_Sym const *jni_onload_sym;
|
||||||
char const *shstrtab; // via Elf32_Shdr
|
char const *shstrtab; // via Elf32_Shdr
|
||||||
|
|
||||||
Elf32_Shdr const *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;
|
||||||
|
|
||||||
@@ -235,18 +252,22 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void PackLinuxElf64help1(InputFile *f);
|
virtual void PackLinuxElf64help1(InputFile *f);
|
||||||
virtual int checkEhdr(Elf64_Ehdr const *ehdr) const;
|
virtual int checkEhdr(Elf64_Ehdr const *ehdr) const;
|
||||||
|
virtual bool canPack();
|
||||||
|
|
||||||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
||||||
virtual void pack3(OutputFile *, Filter &); // append loader
|
virtual off_t pack3(OutputFile *, Filter &); // append loader
|
||||||
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,
|
||||||
|
MemBuffer &membuf, upx_uint64_t const load_off, OutputFile *fo);
|
||||||
|
|
||||||
virtual void generateElfHdr(
|
virtual void generateElfHdr(
|
||||||
OutputFile *,
|
OutputFile *,
|
||||||
void const *proto,
|
void const *proto,
|
||||||
unsigned const brka
|
unsigned const brka
|
||||||
);
|
);
|
||||||
|
virtual void defineSymbols(Filter const *);
|
||||||
virtual void buildLinuxLoader(
|
virtual void buildLinuxLoader(
|
||||||
upx_byte const *const proto, // assembly-only sections
|
upx_byte const *const proto, // assembly-only sections
|
||||||
unsigned const szproto,
|
unsigned const szproto,
|
||||||
@@ -259,26 +280,33 @@ protected:
|
|||||||
virtual void updateLoader(OutputFile *fo);
|
virtual void updateLoader(OutputFile *fo);
|
||||||
virtual unsigned find_LOAD_gap(Elf64_Phdr const *const phdri, unsigned const k,
|
virtual unsigned find_LOAD_gap(Elf64_Phdr const *const phdri, unsigned const k,
|
||||||
unsigned const e_phnum);
|
unsigned const e_phnum);
|
||||||
|
bool calls_crt1(Elf64_Rela const *rela, int sz);
|
||||||
|
|
||||||
virtual Elf64_Sym const *elf_lookup(char const *) const;
|
virtual Elf64_Sym const *elf_lookup(char const *) const;
|
||||||
virtual upx_uint64_t elf_get_offset_from_address(upx_uint64_t) const;
|
virtual upx_uint64_t elf_get_offset_from_address(upx_uint64_t) const;
|
||||||
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_dynamic(Elf64_Phdr 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;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Elf64_Ehdr ehdri; // from input file
|
Elf64_Ehdr ehdri; // from input file
|
||||||
|
MemBuffer lowmem; // especially for shlib
|
||||||
Elf64_Phdr *phdri; // for input file
|
Elf64_Phdr *phdri; // for input file
|
||||||
Elf64_Shdr const *shdri; // from input file
|
Elf64_Shdr *shdri; // from input file
|
||||||
Elf64_Phdr const *gnu_stack; // propagate NX
|
Elf64_Phdr const *gnu_stack; // propagate NX
|
||||||
upx_uint64_t e_phoff;
|
upx_uint64_t e_phoff;
|
||||||
upx_uint64_t e_shoff;
|
upx_uint64_t e_shoff;
|
||||||
unsigned so_slide;
|
upx_uint64_t sz_dynseg; // PT_DYNAMIC.p_memsz
|
||||||
|
upx_uint64_t so_slide;
|
||||||
unsigned char *note_body; // concatenated contents of PT_NOTEs, if any
|
unsigned char *note_body; // concatenated contents of PT_NOTEs, if any
|
||||||
unsigned note_size; // total size of PT_NOTEs
|
unsigned note_size; // total size of PT_NOTEs
|
||||||
|
unsigned n_jmp_slot;
|
||||||
|
upx_uint64_t plt_off;
|
||||||
upx_uint64_t page_mask; // AND clears the offset-within-page
|
upx_uint64_t page_mask; // AND clears the offset-within-page
|
||||||
|
|
||||||
Elf64_Dyn const *dynseg; // from PT_DYNAMIC
|
Elf64_Dyn const *dynseg; // from PT_DYNAMIC
|
||||||
@@ -288,7 +316,7 @@ protected:
|
|||||||
Elf64_Sym const *jni_onload_sym;
|
Elf64_Sym const *jni_onload_sym;
|
||||||
char const *shstrtab; // via Elf64_Shdr
|
char const *shstrtab; // via Elf64_Shdr
|
||||||
|
|
||||||
Elf64_Shdr const *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;
|
||||||
|
|
||||||
@@ -368,6 +396,18 @@ protected:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PackLinuxElf64Be : public PackLinuxElf64
|
||||||
|
{
|
||||||
|
typedef PackLinuxElf64 super;
|
||||||
|
protected:
|
||||||
|
PackLinuxElf64Be(InputFile *f) : super(f) {
|
||||||
|
lg2_page=16;
|
||||||
|
page_size=1u<<lg2_page;
|
||||||
|
bele = &N_BELE_RTP::be_policy;
|
||||||
|
PackLinuxElf64help1(f);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
// linux/elf64amd
|
// linux/elf64amd
|
||||||
@@ -383,10 +423,8 @@ public:
|
|||||||
virtual const char *getName() const { return "linux/amd64"; }
|
virtual const char *getName() const { return "linux/amd64"; }
|
||||||
virtual const char *getFullName(const options_t *) const { return "amd64-linux.elf"; }
|
virtual const char *getFullName(const options_t *) const { return "amd64-linux.elf"; }
|
||||||
virtual const int *getFilters() const;
|
virtual const int *getFilters() const;
|
||||||
virtual bool canPack();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
//virtual void pack3(OutputFile *, Filter &); // append loader
|
|
||||||
virtual void buildLoader(const Filter *);
|
virtual void buildLoader(const Filter *);
|
||||||
virtual Linker* newLinker() const;
|
virtual Linker* newLinker() const;
|
||||||
virtual void defineSymbols(Filter const *);
|
virtual void defineSymbols(Filter const *);
|
||||||
@@ -402,10 +440,8 @@ public:
|
|||||||
virtual const char *getName() const { return "linux/arm64"; }
|
virtual const char *getName() const { return "linux/arm64"; }
|
||||||
virtual const char *getFullName(const options_t *) const { return "arm64-linux.elf"; }
|
virtual const char *getFullName(const options_t *) const { return "arm64-linux.elf"; }
|
||||||
virtual const int *getFilters() const;
|
virtual const int *getFilters() const;
|
||||||
virtual bool canPack();
|
|
||||||
protected:
|
protected:
|
||||||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
//virtual void pack3(OutputFile *, Filter &); // append loader
|
|
||||||
virtual void buildLoader(const Filter *);
|
virtual void buildLoader(const Filter *);
|
||||||
virtual Linker* newLinker() const;
|
virtual Linker* newLinker() const;
|
||||||
virtual void defineSymbols(Filter const *);
|
virtual void defineSymbols(Filter const *);
|
||||||
@@ -449,7 +485,25 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
unsigned lg2_page; // log2(PAGE_SIZE)
|
unsigned lg2_page; // log2(PAGE_SIZE)
|
||||||
unsigned page_size; // 1u<<lg2_page
|
unsigned page_size; // 1u<<lg2_page
|
||||||
virtual bool canPack();
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
|
virtual void buildLoader(const Filter *);
|
||||||
|
virtual Linker* newLinker() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class PackLinuxElf64ppc : public PackLinuxElf64Be
|
||||||
|
{
|
||||||
|
typedef PackLinuxElf64Be super;
|
||||||
|
public:
|
||||||
|
PackLinuxElf64ppc(InputFile *f);
|
||||||
|
virtual ~PackLinuxElf64ppc();
|
||||||
|
virtual int getFormat() const { return UPX_F_LINUX_ELFPPC64; }
|
||||||
|
virtual const char *getName() const { return "linux/ppc64"; }
|
||||||
|
virtual const char *getFullName(const options_t *) const { return "powerpc64-linux.elf"; }
|
||||||
|
virtual const int *getFilters() const;
|
||||||
|
protected:
|
||||||
|
unsigned lg2_page; // log2(PAGE_SIZE)
|
||||||
|
unsigned page_size; // 1u<<lg2_page
|
||||||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
virtual void buildLoader(const Filter *);
|
virtual void buildLoader(const Filter *);
|
||||||
virtual Linker* newLinker() const;
|
virtual Linker* newLinker() const;
|
||||||
|
|||||||
+3
-3
@@ -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-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) 2001-2017 John F. Reiser
|
Copyright (C) 2001-2018 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
@@ -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-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
|
||||||
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
-5
@@ -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-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
|
||||||
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
|
||||||
@@ -82,7 +82,7 @@ void PackLinuxElf32x86interp::pack1(OutputFile *fo, Filter &)
|
|||||||
assert(ehdri.e_phoff == sizeof(Elf32_Ehdr)); // checked by canPack()
|
assert(ehdri.e_phoff == sizeof(Elf32_Ehdr)); // checked by canPack()
|
||||||
sz_phdrs = ehdri.e_phnum * ehdri.e_phentsize;
|
sz_phdrs = ehdri.e_phnum * ehdri.e_phentsize;
|
||||||
|
|
||||||
phdri = new Elf32_Phdr[(unsigned)ehdri.e_phnum];
|
phdri = New(Elf32_Phdr, ehdri.e_phnum);
|
||||||
fi->seek(ehdri.e_phoff, SEEK_SET);
|
fi->seek(ehdri.e_phoff, SEEK_SET);
|
||||||
fi->readx(phdri, sz_phdrs);
|
fi->readx(phdri, sz_phdrs);
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ int PackLinuxElf32x86interp::pack2(OutputFile *fo, Filter &ft)
|
|||||||
#undef PAGE_MASK
|
#undef PAGE_MASK
|
||||||
#define PAGE_MASK (~0u<<12)
|
#define PAGE_MASK (~0u<<12)
|
||||||
|
|
||||||
void PackLinuxElf32x86interp::pack3(OutputFile *fo, Filter &/*ft*/)
|
off_t PackLinuxElf32x86interp::pack3(OutputFile *fo, Filter &/*ft*/)
|
||||||
{
|
{
|
||||||
unsigned base = getbase(phdri, ehdri.e_phnum);
|
unsigned base = getbase(phdri, ehdri.e_phnum);
|
||||||
unsigned sz = PAGE_MASK & (~PAGE_MASK + elfout.phdr[0].p_filesz);
|
unsigned sz = PAGE_MASK & (~PAGE_MASK + elfout.phdr[0].p_filesz);
|
||||||
@@ -191,6 +191,7 @@ void PackLinuxElf32x86interp::pack3(OutputFile *fo, Filter &/*ft*/)
|
|||||||
else {
|
else {
|
||||||
updateLoader(fo);
|
updateLoader(fo);
|
||||||
}
|
}
|
||||||
|
return fo->getBytesWritten();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -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-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
|
||||||
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
|
||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
||||||
virtual void pack3(OutputFile *, Filter &); // build loader
|
virtual off_t pack3(OutputFile *, Filter &); // build loader
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-6
@@ -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-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
|
||||||
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
|
||||||
@@ -161,11 +161,10 @@ PackLinuxI386sh::pack1(OutputFile *fo, Filter &)
|
|||||||
generateElfHdr(fo, stub_i386_linux_elf_shell_fold, 0x08048000);
|
generateElfHdr(fo, stub_i386_linux_elf_shell_fold, 0x08048000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
off_t
|
||||||
PackLinuxI386sh::pack3(OutputFile *fo, Filter &ft)
|
PackLinuxI386sh::pack3(OutputFile *fo, Filter &ft)
|
||||||
{
|
{
|
||||||
super::pack3(fo,ft);
|
return elfout.phdr[0].p_filesz = super::pack3(fo,ft);
|
||||||
elfout.phdr[0].p_filesz = fo->getBytesWritten();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set ts=4 sw=4 et: */
|
/* vim:set ts=4 sw=4 et: */
|
||||||
|
|||||||
+4
-4
@@ -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-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
|
||||||
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
|
||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
virtual void buildLoader(const Filter *);
|
virtual void buildLoader(const Filter *);
|
||||||
|
|
||||||
virtual void pack1(OutputFile *fo, Filter &ft);
|
virtual void pack1(OutputFile *fo, Filter &ft);
|
||||||
virtual void pack3(OutputFile *fo, Filter &ft);
|
virtual off_t pack3(OutputFile *fo, Filter &ft);
|
||||||
|
|
||||||
virtual bool canPack();
|
virtual bool canPack();
|
||||||
// virtual void unpack(OutputFile *fo) { super::unpack(fo); }
|
// virtual void unpack(OutputFile *fo) { super::unpack(fo); }
|
||||||
|
|||||||
+400
-361
File diff suppressed because it is too large
Load Diff
+14
-49
@@ -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-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
|
||||||
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
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
#ifndef __UPX_P_MACHO_H
|
#ifndef __UPX_P_MACHO_H
|
||||||
#define __UPX_P_MACHO_H 1
|
#define __UPX_P_MACHO_H 1
|
||||||
|
|
||||||
|
#include "conf.h"
|
||||||
|
|
||||||
__packed_struct(Mach_fat_header)
|
__packed_struct(Mach_fat_header)
|
||||||
BE32 magic;
|
BE32 magic;
|
||||||
@@ -287,7 +288,9 @@ template <class TMachITypes>
|
|||||||
__packed_struct(Mach_linkedit_data_command)
|
__packed_struct(Mach_linkedit_data_command)
|
||||||
typedef typename TMachITypes::Word Word;
|
typedef typename TMachITypes::Word Word;
|
||||||
|
|
||||||
Word cmd;
|
Word cmd; // LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO,
|
||||||
|
// LC_FUNCTION_STARTS, LC_DATA_IN_CODE,
|
||||||
|
// LC_DYLIB_CODE_SIGN_DRS, LC_LINKER_OPTIMIZATION_HINT
|
||||||
Word cmdsize;
|
Word cmdsize;
|
||||||
Word dataoff; // file offset of data in __LINKEDIT segment
|
Word dataoff; // file offset of data in __LINKEDIT segment
|
||||||
Word datasize; // file size of data in __LINKEDIT segment
|
Word datasize; // file size of data in __LINKEDIT segment
|
||||||
@@ -333,6 +336,7 @@ __packed_struct(Mach_source_version_command)
|
|||||||
Word cmd; // LC_SOURCE_VERSION
|
Word cmd; // LC_SOURCE_VERSION
|
||||||
Word cmdsize; // 16
|
Word cmdsize; // 16
|
||||||
Word version;
|
Word version;
|
||||||
|
Word __pad; // to 0 mod 8
|
||||||
__packed_struct_end()
|
__packed_struct_end()
|
||||||
|
|
||||||
template <class TMachITypes>
|
template <class TMachITypes>
|
||||||
@@ -391,26 +395,6 @@ __packed_struct(Mach_load_dylib_command)
|
|||||||
Mach_dylib<TMachITypes> dylib;
|
Mach_dylib<TMachITypes> dylib;
|
||||||
__packed_struct_end()
|
__packed_struct_end()
|
||||||
|
|
||||||
template <class TMachITypes>
|
|
||||||
__packed_struct(Mach_function_starts_command)
|
|
||||||
typedef typename TMachITypes::Word Word;
|
|
||||||
|
|
||||||
Word cmd;
|
|
||||||
Word cmdsize;
|
|
||||||
Word dataoff;
|
|
||||||
Word datasize;
|
|
||||||
__packed_struct_end()
|
|
||||||
|
|
||||||
template <class TMachITypes>
|
|
||||||
__packed_struct(Mach_data_in_code_command)
|
|
||||||
typedef typename TMachITypes::Word Word;
|
|
||||||
|
|
||||||
Word cmd;
|
|
||||||
Word cmdsize;
|
|
||||||
Word dataoff;
|
|
||||||
Word datasize;
|
|
||||||
__packed_struct_end()
|
|
||||||
|
|
||||||
} // namespace N_Mach
|
} // namespace N_Mach
|
||||||
|
|
||||||
namespace N_Mach32 {
|
namespace N_Mach32 {
|
||||||
@@ -558,8 +542,6 @@ struct MachClass_32
|
|||||||
typedef N_Mach::Mach_twolevel_hints_command<MachITypes> Mach_twolevel_hints_command;
|
typedef N_Mach::Mach_twolevel_hints_command<MachITypes> Mach_twolevel_hints_command;
|
||||||
typedef N_Mach::Mach_linkedit_data_command<MachITypes> Mach_linkedit_data_command;
|
typedef N_Mach::Mach_linkedit_data_command<MachITypes> Mach_linkedit_data_command;
|
||||||
typedef N_Mach::Mach_uuid_command<MachITypes> Mach_uuid_command;
|
typedef N_Mach::Mach_uuid_command<MachITypes> Mach_uuid_command;
|
||||||
typedef N_Mach::Mach_data_in_code_command<MachITypes> Mach_data_in_code_command;
|
|
||||||
typedef N_Mach::Mach_function_starts_command<MachITypes> Mach_function_starts_command;
|
|
||||||
typedef N_Mach::Mach_load_dylib_command<MachITypes> Mach_load_dylib_command;
|
typedef N_Mach::Mach_load_dylib_command<MachITypes> Mach_load_dylib_command;
|
||||||
typedef N_Mach::Mach_dylib<MachITypes> Mach_dylib;
|
typedef N_Mach::Mach_dylib<MachITypes> Mach_dylib;
|
||||||
typedef N_Mach::Mach_load_dylinker_command<MachITypes> Mach_load_dylinker_command;
|
typedef N_Mach::Mach_load_dylinker_command<MachITypes> Mach_load_dylinker_command;
|
||||||
@@ -602,8 +584,6 @@ struct MachClass_64
|
|||||||
typedef N_Mach::Mach_twolevel_hints_command<MachITypes> Mach_twolevel_hints_command;
|
typedef N_Mach::Mach_twolevel_hints_command<MachITypes> Mach_twolevel_hints_command;
|
||||||
typedef N_Mach::Mach_linkedit_data_command<MachITypes> Mach_linkedit_data_command;
|
typedef N_Mach::Mach_linkedit_data_command<MachITypes> Mach_linkedit_data_command;
|
||||||
typedef N_Mach::Mach_uuid_command<MachITypes> Mach_uuid_command;
|
typedef N_Mach::Mach_uuid_command<MachITypes> Mach_uuid_command;
|
||||||
typedef N_Mach::Mach_data_in_code_command<MachITypes> Mach_data_in_code_command;
|
|
||||||
typedef N_Mach::Mach_function_starts_command<MachITypes> Mach_function_starts_command;
|
|
||||||
typedef N_Mach::Mach_load_dylib_command<MachITypes> Mach_load_dylib_command;
|
typedef N_Mach::Mach_load_dylib_command<MachITypes> Mach_load_dylib_command;
|
||||||
typedef N_Mach::Mach_dylib<MachITypes> Mach_dylib;
|
typedef N_Mach::Mach_dylib<MachITypes> Mach_dylib;
|
||||||
typedef N_Mach::Mach_load_dylinker_command<MachITypes> Mach_load_dylinker_command;
|
typedef N_Mach::Mach_load_dylinker_command<MachITypes> Mach_load_dylinker_command;
|
||||||
@@ -642,8 +622,6 @@ typedef MachClass_Host32::Mach_twolevel_hints_command Mach32_twolevel_hints_comm
|
|||||||
typedef MachClass_Host32::Mach_linkedit_data_command Mach32_linkedit_data_command;
|
typedef MachClass_Host32::Mach_linkedit_data_command Mach32_linkedit_data_command;
|
||||||
typedef MachClass_Host32::Mach_uuid_command Mach32_uuid_command;
|
typedef MachClass_Host32::Mach_uuid_command Mach32_uuid_command;
|
||||||
typedef MachClass_Host32::Mach_main_command Mach32_main_command;
|
typedef MachClass_Host32::Mach_main_command Mach32_main_command;
|
||||||
typedef MachClass_Host32::Mach_data_in_code_command Mach32_data_in_code_command;
|
|
||||||
typedef MachClass_Host32::Mach_function_starts_command Mach32_function_starts_command;
|
|
||||||
typedef MachClass_Host32::Mach_load_dylib_command Mach32_load_dylib_command;
|
typedef MachClass_Host32::Mach_load_dylib_command Mach32_load_dylib_command;
|
||||||
typedef MachClass_Host32::Mach_dylib Mach32_dylib;
|
typedef MachClass_Host32::Mach_dylib Mach32_dylib;
|
||||||
typedef MachClass_Host32::Mach_load_dylinker_command Mach32_load_dylinker_command;
|
typedef MachClass_Host32::Mach_load_dylinker_command Mach32_load_dylinker_command;
|
||||||
@@ -661,8 +639,6 @@ typedef MachClass_Host64::Mach_twolevel_hints_command Mach64_twolevel_hints_comm
|
|||||||
typedef MachClass_Host64::Mach_linkedit_data_command Mach64_linkedit_data_command;
|
typedef MachClass_Host64::Mach_linkedit_data_command Mach64_linkedit_data_command;
|
||||||
typedef MachClass_Host64::Mach_uuid_command Mach64_uuid_command;
|
typedef MachClass_Host64::Mach_uuid_command Mach64_uuid_command;
|
||||||
typedef MachClass_Host64::Mach_main_command Mach64_main_command;
|
typedef MachClass_Host64::Mach_main_command Mach64_main_command;
|
||||||
typedef MachClass_Host64::Mach_data_in_code_command Mach64_data_in_code_command;
|
|
||||||
typedef MachClass_Host64::Mach_function_starts_command Mach64_function_starts_command;
|
|
||||||
typedef MachClass_Host64::Mach_load_dylib_command Mach64_load_dylib_command;
|
typedef MachClass_Host64::Mach_load_dylib_command Mach64_load_dylib_command;
|
||||||
typedef MachClass_Host64::Mach_dylib Mach64_dylib;
|
typedef MachClass_Host64::Mach_dylib Mach64_dylib;
|
||||||
typedef MachClass_Host64::Mach_load_dylinker_command Mach64_load_dylinker_command;
|
typedef MachClass_Host64::Mach_load_dylinker_command Mach64_load_dylinker_command;
|
||||||
@@ -680,8 +656,6 @@ typedef MachClass_BE32::Mach_twolevel_hints_command MachBE32_twolevel_hints_co
|
|||||||
typedef MachClass_BE32::Mach_linkedit_data_command MachBE32_linkedit_data_command;
|
typedef MachClass_BE32::Mach_linkedit_data_command MachBE32_linkedit_data_command;
|
||||||
typedef MachClass_BE32::Mach_uuid_command MachBE32_uuid_command;
|
typedef MachClass_BE32::Mach_uuid_command MachBE32_uuid_command;
|
||||||
typedef MachClass_BE32::Mach_main_command MachBE32_main_command;
|
typedef MachClass_BE32::Mach_main_command MachBE32_main_command;
|
||||||
typedef MachClass_BE32::Mach_data_in_code_command MachBE32_data_in_code_command;
|
|
||||||
typedef MachClass_BE32::Mach_function_starts_command MachBE32_function_starts_command;
|
|
||||||
typedef MachClass_BE32::Mach_load_dylib_command MachBE32_load_dylib_command;
|
typedef MachClass_BE32::Mach_load_dylib_command MachBE32_load_dylib_command;
|
||||||
typedef MachClass_BE32::Mach_dylib MachBE32_dylib;
|
typedef MachClass_BE32::Mach_dylib MachBE32_dylib;
|
||||||
typedef MachClass_BE32::Mach_load_dylinker_command MachBE32_load_dylinker_command;
|
typedef MachClass_BE32::Mach_load_dylinker_command MachBE32_load_dylinker_command;
|
||||||
@@ -699,8 +673,6 @@ typedef MachClass_BE64::Mach_twolevel_hints_command MachBE64_twolevel_hints_co
|
|||||||
typedef MachClass_BE64::Mach_linkedit_data_command MachBE64_linkedit_data_command;
|
typedef MachClass_BE64::Mach_linkedit_data_command MachBE64_linkedit_data_command;
|
||||||
typedef MachClass_BE64::Mach_uuid_command MachBE64_uuid_command;
|
typedef MachClass_BE64::Mach_uuid_command MachBE64_uuid_command;
|
||||||
typedef MachClass_BE64::Mach_main_command MachBE64_main_command;
|
typedef MachClass_BE64::Mach_main_command MachBE64_main_command;
|
||||||
typedef MachClass_BE64::Mach_data_in_code_command MachBE64_data_in_code_command;
|
|
||||||
typedef MachClass_BE64::Mach_function_starts_command MachBE64_function_starts_command;
|
|
||||||
typedef MachClass_BE64::Mach_load_dylib_command MachBE64_load_dylib_command;
|
typedef MachClass_BE64::Mach_load_dylib_command MachBE64_load_dylib_command;
|
||||||
typedef MachClass_BE64::Mach_dylib MachBE64_dylib;
|
typedef MachClass_BE64::Mach_dylib MachBE64_dylib;
|
||||||
typedef MachClass_BE64::Mach_load_dylinker_command MachBE64_load_dylinker_command;
|
typedef MachClass_BE64::Mach_load_dylinker_command MachBE64_load_dylinker_command;
|
||||||
@@ -718,8 +690,6 @@ typedef MachClass_LE32::Mach_twolevel_hints_command MachLE32_twolevel_hints_co
|
|||||||
typedef MachClass_LE32::Mach_linkedit_data_command MachLE32_linkedit_data_command;
|
typedef MachClass_LE32::Mach_linkedit_data_command MachLE32_linkedit_data_command;
|
||||||
typedef MachClass_LE32::Mach_uuid_command MachLE32_uuid_command;
|
typedef MachClass_LE32::Mach_uuid_command MachLE32_uuid_command;
|
||||||
typedef MachClass_LE32::Mach_main_command MachLE32_main_command;
|
typedef MachClass_LE32::Mach_main_command MachLE32_main_command;
|
||||||
typedef MachClass_LE32::Mach_data_in_code_command MachLE32_data_in_code_command;
|
|
||||||
typedef MachClass_LE32::Mach_function_starts_command MachLE32_function_starts_command;
|
|
||||||
typedef MachClass_LE32::Mach_load_dylib_command MachLE32_load_dylib_command;
|
typedef MachClass_LE32::Mach_load_dylib_command MachLE32_load_dylib_command;
|
||||||
typedef MachClass_LE32::Mach_dylib MachLE32_dylib;
|
typedef MachClass_LE32::Mach_dylib MachLE32_dylib;
|
||||||
typedef MachClass_LE32::Mach_load_dylinker_command MachLE32_load_dylinker_command;
|
typedef MachClass_LE32::Mach_load_dylinker_command MachLE32_load_dylinker_command;
|
||||||
@@ -737,8 +707,6 @@ typedef MachClass_LE64::Mach_twolevel_hints_command MachLE64_twolevel_hints_co
|
|||||||
typedef MachClass_LE64::Mach_linkedit_data_command MachLE64_linkedit_data_command;
|
typedef MachClass_LE64::Mach_linkedit_data_command MachLE64_linkedit_data_command;
|
||||||
typedef MachClass_LE64::Mach_uuid_command MachLE64_uuid_command;
|
typedef MachClass_LE64::Mach_uuid_command MachLE64_uuid_command;
|
||||||
typedef MachClass_LE64::Mach_main_command MachLE64_main_command;
|
typedef MachClass_LE64::Mach_main_command MachLE64_main_command;
|
||||||
typedef MachClass_LE64::Mach_data_in_code_command MachLE64_data_in_code_command;
|
|
||||||
typedef MachClass_LE64::Mach_function_starts_command MachLE64_function_starts_command;
|
|
||||||
typedef MachClass_LE64::Mach_load_dylib_command MachLE64_load_dylib_command;
|
typedef MachClass_LE64::Mach_load_dylib_command MachLE64_load_dylib_command;
|
||||||
typedef MachClass_LE64::Mach_dylib MachLE64_dylib;
|
typedef MachClass_LE64::Mach_dylib MachLE64_dylib;
|
||||||
typedef MachClass_LE64::Mach_load_dylinker_command MachLE64_load_dylinker_command;
|
typedef MachClass_LE64::Mach_load_dylinker_command MachLE64_load_dylinker_command;
|
||||||
@@ -781,8 +749,6 @@ protected:
|
|||||||
typedef typename MachClass::Mach_linkedit_data_command Mach_linkedit_data_command;
|
typedef typename MachClass::Mach_linkedit_data_command Mach_linkedit_data_command;
|
||||||
typedef typename MachClass::Mach_uuid_command Mach_uuid_command;
|
typedef typename MachClass::Mach_uuid_command Mach_uuid_command;
|
||||||
typedef typename MachClass::Mach_main_command Mach_main_command;
|
typedef typename MachClass::Mach_main_command Mach_main_command;
|
||||||
typedef typename MachClass::Mach_data_in_code_command Mach_data_in_code_command;
|
|
||||||
typedef typename MachClass::Mach_function_starts_command Mach_function_starts_command;
|
|
||||||
typedef typename MachClass::Mach_load_dylib_command Mach_load_dylib_command;
|
typedef typename MachClass::Mach_load_dylib_command Mach_load_dylib_command;
|
||||||
typedef typename MachClass::Mach_dylib Mach_dylib;
|
typedef typename MachClass::Mach_dylib Mach_dylib;
|
||||||
typedef typename MachClass::Mach_load_dylinker_command Mach_load_dylinker_command;
|
typedef typename MachClass::Mach_load_dylinker_command Mach_load_dylinker_command;
|
||||||
@@ -800,7 +766,7 @@ public:
|
|||||||
// called by the generic pack()
|
// called by the generic pack()
|
||||||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
||||||
virtual void pack3(OutputFile *, Filter &) /*= 0*/; // append loader
|
virtual off_t pack3(OutputFile *, Filter &) /*= 0*/; // append loader
|
||||||
virtual void pack4(OutputFile *, Filter &) /*= 0*/; // append PackHeader
|
virtual void pack4(OutputFile *, Filter &) /*= 0*/; // append PackHeader
|
||||||
|
|
||||||
virtual void pack4dylib(OutputFile *, Filter &, Addr init_address);
|
virtual void pack4dylib(OutputFile *, Filter &, Addr init_address);
|
||||||
@@ -853,8 +819,8 @@ protected:
|
|||||||
upx_byte const *stub_main;
|
upx_byte const *stub_main;
|
||||||
Mach_segment_command *rawmseg; // as input, with sections
|
Mach_segment_command *rawmseg; // as input, with sections
|
||||||
Mach_segment_command *msegcmd; // LC_SEGMENT first, without sections
|
Mach_segment_command *msegcmd; // LC_SEGMENT first, without sections
|
||||||
unsigned o_routines_cmd; // file offset to LC_ROUINTES
|
unsigned o__mod_init_func; // file offset to __DATA.__mod_init_func Mach_section_command
|
||||||
upx_uint64_t prev_init_address;
|
upx_uint64_t prev_mod_init_func;
|
||||||
upx_uint64_t pagezero_vmsize;
|
upx_uint64_t pagezero_vmsize;
|
||||||
Mach_header mhdri;
|
Mach_header mhdri;
|
||||||
|
|
||||||
@@ -1023,7 +989,7 @@ public:
|
|||||||
virtual const char *getName() const { return "dylib/ppc32"; }
|
virtual const char *getName() const { return "dylib/ppc32"; }
|
||||||
virtual const char *getFullName(const options_t *) const { return "powerpc-darwin.dylib"; }
|
virtual const char *getFullName(const options_t *) const { return "powerpc-darwin.dylib"; }
|
||||||
protected:
|
protected:
|
||||||
virtual void pack3(OutputFile *, Filter &); // append loader
|
virtual off_t pack3(OutputFile *, Filter &); // append loader
|
||||||
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1038,7 +1004,7 @@ public:
|
|||||||
virtual const char *getName() const { return "dylib/ppc64le"; }
|
virtual const char *getName() const { return "dylib/ppc64le"; }
|
||||||
virtual const char *getFullName(const options_t *) const { return "powerpc64le-darwin.dylib"; }
|
virtual const char *getFullName(const options_t *) const { return "powerpc64le-darwin.dylib"; }
|
||||||
protected:
|
protected:
|
||||||
virtual void pack3(OutputFile *, Filter &); // append loader
|
virtual off_t pack3(OutputFile *, Filter &); // append loader
|
||||||
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1105,7 +1071,7 @@ public:
|
|||||||
virtual const char *getName() const { return "dylib/i386"; }
|
virtual const char *getName() const { return "dylib/i386"; }
|
||||||
virtual const char *getFullName(const options_t *) const { return "i386-darwin.dylib"; }
|
virtual const char *getFullName(const options_t *) const { return "i386-darwin.dylib"; }
|
||||||
protected:
|
protected:
|
||||||
virtual void pack3(OutputFile *, Filter &); // append loader
|
virtual off_t pack3(OutputFile *, Filter &); // append loader
|
||||||
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1173,7 +1139,7 @@ public:
|
|||||||
virtual const char *getName() const { return "dylib/amd64"; }
|
virtual const char *getName() const { return "dylib/amd64"; }
|
||||||
virtual const char *getFullName(const options_t *) const { return "amd64-darwin.dylib"; }
|
virtual const char *getFullName(const options_t *) const { return "amd64-darwin.dylib"; }
|
||||||
protected:
|
protected:
|
||||||
virtual void pack3(OutputFile *, Filter &); // append loader
|
virtual off_t pack3(OutputFile *, Filter &); // append loader
|
||||||
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1241,7 +1207,6 @@ public:
|
|||||||
virtual const char *getName() const { return "macho/arm64"; }
|
virtual const char *getName() const { return "macho/arm64"; }
|
||||||
virtual const char *getFullName(const options_t *) const { return "arm64-darwin.macho"; }
|
virtual const char *getFullName(const options_t *) const { return "arm64-darwin.macho"; }
|
||||||
protected:
|
protected:
|
||||||
virtual const int *getCompressionMethods(int method, int level) const;
|
|
||||||
virtual const int *getFilters() const;
|
virtual const int *getFilters() const;
|
||||||
|
|
||||||
virtual void pack1_setup_threado(OutputFile *const fo);
|
virtual void pack1_setup_threado(OutputFile *const fo);
|
||||||
|
|||||||
+15
-4
@@ -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-2017 John F. Reiser
|
Copyright (C) 2007-2018 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
|
||||||
@@ -45,7 +45,8 @@
|
|||||||
enum { // cputype
|
enum { // cputype
|
||||||
CPU_TYPE_I386 = 7,
|
CPU_TYPE_I386 = 7,
|
||||||
CPU_TYPE_X86_64 = 0x01000007,
|
CPU_TYPE_X86_64 = 0x01000007,
|
||||||
CPU_TYPE_ARM = 12,
|
CPU_TYPE_ARM = 0x0000000c,
|
||||||
|
CPU_TYPE_ARM64 = 0x0100000c,
|
||||||
CPU_TYPE_POWERPC = 0x00000012,
|
CPU_TYPE_POWERPC = 0x00000012,
|
||||||
CPU_TYPE_POWERPC64 = 0x01000012,
|
CPU_TYPE_POWERPC64 = 0x01000012,
|
||||||
CPU_TYPE_POWERPC64LE = 0x01000021
|
CPU_TYPE_POWERPC64LE = 0x01000021
|
||||||
@@ -57,7 +58,9 @@
|
|||||||
};
|
};
|
||||||
enum { // filetype
|
enum { // filetype
|
||||||
MH_EXECUTE = 2,
|
MH_EXECUTE = 2,
|
||||||
MH_DYLIB = 6,
|
MH_PRELOAD = 5, /* preloaded executable */
|
||||||
|
MH_DYLIB = 6, /* dynamically bound shared library */
|
||||||
|
MH_DYLINKER= 7, /* /usr/bin/dyld */
|
||||||
MH_BUNDLE = 8 /* dynamically bound bundle file */
|
MH_BUNDLE = 8 /* dynamically bound bundle file */
|
||||||
};
|
};
|
||||||
enum { // flags
|
enum { // flags
|
||||||
@@ -83,23 +86,31 @@
|
|||||||
LC_LOAD_DYLINKER = 0xe,
|
LC_LOAD_DYLINKER = 0xe,
|
||||||
LC_ROUTINES = 0x11,
|
LC_ROUTINES = 0x11,
|
||||||
LC_TWOLEVEL_HINTS= 0x16,
|
LC_TWOLEVEL_HINTS= 0x16,
|
||||||
|
LC_LOAD_WEAK_DYLIB= (0x18 | LC_REQ_DYLD),
|
||||||
LC_SEGMENT_64 = 0x19,
|
LC_SEGMENT_64 = 0x19,
|
||||||
LC_ROUTINES_64 = 0x1a,
|
LC_ROUTINES_64 = 0x1a,
|
||||||
LC_UUID = 0x1b,
|
LC_UUID = 0x1b,
|
||||||
LC_RPATH = 0x1c,
|
LC_RPATH = 0x1c,
|
||||||
LC_CODE_SIGNATURE = 0x1d,
|
LC_CODE_SIGNATURE = 0x1d,
|
||||||
LC_SEGMENT_SPLIT_INFO = 0x1e,
|
LC_SEGMENT_SPLIT_INFO = 0x1e,
|
||||||
LC_REEXPORT_DYLIB = 0x1f,
|
LC_REEXPORT_DYLIB = (0x1f | LC_REQ_DYLD),
|
||||||
LC_LAZY_LOAD_DYLIB= 0x20,
|
LC_LAZY_LOAD_DYLIB= 0x20,
|
||||||
LC_ENCRYPTION_INFO= 0x21,
|
LC_ENCRYPTION_INFO= 0x21,
|
||||||
LC_DYLD_INFO = 0x22, // compressed dyld information (10.6.x)
|
LC_DYLD_INFO = 0x22, // compressed dyld information (10.6.x)
|
||||||
LC_DYLD_INFO_ONLY = (0x22|LC_REQ_DYLD),
|
LC_DYLD_INFO_ONLY = (0x22|LC_REQ_DYLD),
|
||||||
LC_VERSION_MIN_MACOSX= 0x24,
|
LC_VERSION_MIN_MACOSX= 0x24,
|
||||||
|
LC_VERSION_MIN_IPHONEOS= 0x25,
|
||||||
LC_FUNCTION_STARTS= 0x26,
|
LC_FUNCTION_STARTS= 0x26,
|
||||||
|
LC_DYLD_ENVIRONMENT= 0x27, // string as environment variable
|
||||||
LC_MAIN = (0x28|LC_REQ_DYLD),
|
LC_MAIN = (0x28|LC_REQ_DYLD),
|
||||||
LC_DATA_IN_CODE = 0x29,
|
LC_DATA_IN_CODE = 0x29,
|
||||||
LC_SOURCE_VERSION = 0x2a,
|
LC_SOURCE_VERSION = 0x2a,
|
||||||
|
LC_DYLIB_CODE_SIGN_DRS= 0x2B,
|
||||||
|
LC_ENCRYPTION_INFO_64= 0x2C,
|
||||||
|
LC_VERSION_MIN_TVOS= 0x2F,
|
||||||
|
LC_VERSION_MIN_WATCHOS= 0x30,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { // maxprot
|
enum { // maxprot
|
||||||
VM_PROT_READ = 1,
|
VM_PROT_READ = 1,
|
||||||
VM_PROT_WRITE = 2,
|
VM_PROT_WRITE = 2,
|
||||||
|
|||||||
+6
-6
@@ -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-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) 2002-2017 Jens Medoch
|
Copyright (C) 2002-2018 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
|
||||||
@@ -160,7 +160,7 @@ void PackPs1::putBkupHeader(const unsigned char *src, unsigned char *dst, unsign
|
|||||||
|
|
||||||
if (src && dst)
|
if (src && dst)
|
||||||
{
|
{
|
||||||
unsigned char *cpr_bh = new unsigned char[sz_cbh];
|
unsigned char *cpr_bh = New(unsigned char, sz_cbh);
|
||||||
|
|
||||||
memset(cpr_bh, 0, sizeof(bh));
|
memset(cpr_bh, 0, sizeof(bh));
|
||||||
ps1_exe_chb_t * p = (ps1_exe_chb_t * )cpr_bh;
|
ps1_exe_chb_t * p = (ps1_exe_chb_t * )cpr_bh;
|
||||||
@@ -189,7 +189,7 @@ bool PackPs1::getBkupHeader(unsigned char *p, unsigned char *dst)
|
|||||||
|
|
||||||
if (src && (src->id == '1' && src->len < SZ_IH_BKUP) && dst)
|
if (src && (src->id == '1' && src->len < SZ_IH_BKUP) && dst)
|
||||||
{
|
{
|
||||||
unsigned char *unc_bh = new unsigned char[MemBuffer::getSizeForUncompression(SZ_IH_BKUP)];
|
unsigned char *unc_bh = New(unsigned char, MemBuffer::getSizeForUncompression(SZ_IH_BKUP));
|
||||||
|
|
||||||
unsigned sz_bh = SZ_IH_BKUP;
|
unsigned sz_bh = SZ_IH_BKUP;
|
||||||
int r = upx_decompress((const unsigned char *)&src->ih_bkup, src->len,
|
int r = upx_decompress((const unsigned char *)&src->ih_bkup, src->len,
|
||||||
@@ -338,7 +338,7 @@ void PackPs1::buildLoader(const Filter *)
|
|||||||
if (M_IS_LZMA(ph.method) && buildPart2)
|
if (M_IS_LZMA(ph.method) && buildPart2)
|
||||||
{
|
{
|
||||||
sz_lcpr = MemBuffer::getSizeForCompression(sz_lunc);
|
sz_lcpr = MemBuffer::getSizeForCompression(sz_lunc);
|
||||||
unsigned char *cprLoader = new unsigned char[sz_lcpr];
|
unsigned char *cprLoader = New(unsigned char, sz_lcpr);
|
||||||
int r = upx_compress(getLoader(), sz_lunc, cprLoader, &sz_lcpr,
|
int r = upx_compress(getLoader(), sz_lunc, cprLoader, &sz_lcpr,
|
||||||
NULL, M_NRV2B_8, 10, NULL, NULL );
|
NULL, M_NRV2B_8, 10, NULL, NULL );
|
||||||
if (r != UPX_E_OK || sz_lcpr >= sz_lunc)
|
if (r != UPX_E_OK || sz_lcpr >= sz_lunc)
|
||||||
|
|||||||
+3
-3
@@ -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-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) 2002-2017 Jens Medoch
|
Copyright (C) 2002-2018 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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
|
||||||
|
|||||||
+10
-6
@@ -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-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
|
||||||
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
|
||||||
@@ -246,7 +246,7 @@ PackUnix::patchLoaderChecksum()
|
|||||||
set_te32(&lp->l_checksum, upx_adler32(ptr, lsize));
|
set_te32(&lp->l_checksum, upx_adler32(ptr, lsize));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PackUnix::pack3(OutputFile *fo, Filter &ft)
|
off_t PackUnix::pack3(OutputFile *fo, Filter &ft)
|
||||||
{
|
{
|
||||||
if (0==linker) {
|
if (0==linker) {
|
||||||
// If no filter, then linker is not constructed by side effect
|
// If no filter, then linker is not constructed by side effect
|
||||||
@@ -259,6 +259,7 @@ void PackUnix::pack3(OutputFile *fo, Filter &ft)
|
|||||||
updateLoader(fo);
|
updateLoader(fo);
|
||||||
patchLoaderChecksum();
|
patchLoaderChecksum();
|
||||||
fo->write(p, lsize);
|
fo->write(p, lsize);
|
||||||
|
return fo->getBytesWritten();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PackUnix::pack4(OutputFile *fo, Filter &)
|
void PackUnix::pack4(OutputFile *fo, Filter &)
|
||||||
@@ -557,7 +558,10 @@ int PackUnix::canUnpack()
|
|||||||
|
|
||||||
void PackUnix::unpack(OutputFile *fo)
|
void PackUnix::unpack(OutputFile *fo)
|
||||||
{
|
{
|
||||||
unsigned const szb_info = sizeof(b_info);
|
b_info bhdr;
|
||||||
|
unsigned const szb_info = (ph.version <= 11)
|
||||||
|
? sizeof(bhdr.sz_unc) + sizeof(bhdr.sz_cpr) // old style
|
||||||
|
: sizeof(bhdr);
|
||||||
|
|
||||||
unsigned c_adler = upx_adler32(NULL, 0);
|
unsigned c_adler = upx_adler32(NULL, 0);
|
||||||
unsigned u_adler = upx_adler32(NULL, 0);
|
unsigned u_adler = upx_adler32(NULL, 0);
|
||||||
@@ -590,7 +594,7 @@ void PackUnix::unpack(OutputFile *fo)
|
|||||||
// decompress blocks
|
// decompress blocks
|
||||||
unsigned total_in = 0;
|
unsigned total_in = 0;
|
||||||
unsigned total_out = 0;
|
unsigned total_out = 0;
|
||||||
b_info bhdr; memset(&bhdr, 0, sizeof(bhdr));
|
memset(&bhdr, 0, sizeof(bhdr));
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#define buf ibuf
|
#define buf ibuf
|
||||||
|
|||||||
+3
-3
@@ -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-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
|
||||||
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
|
||||||
@@ -55,7 +55,7 @@ protected:
|
|||||||
// called by the generic pack()
|
// called by the generic pack()
|
||||||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||||
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
virtual int pack2(OutputFile *, Filter &); // append compressed data
|
||||||
virtual void pack3(OutputFile *, Filter &); // append loader
|
virtual off_t pack3(OutputFile *, Filter &); // append loader
|
||||||
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
virtual void pack4(OutputFile *, Filter &); // append PackHeader
|
||||||
|
|
||||||
virtual void patchLoader() = 0;
|
virtual void patchLoader() = 0;
|
||||||
|
|||||||
+5
-4
@@ -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-2017 John Reiser
|
Copyright (C) 2004-2018 John Reiser
|
||||||
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
|
||||||
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,7 +111,8 @@ 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) file_size
|
&& (p->sh_size + p->sh_offset) <= (unsigned long)file_size
|
||||||
|
&& p->sh_name < p->sh_size
|
||||||
&& (10+ p->sh_name) <= p->sh_size // 1+ strlen(".shstrtab")
|
&& (10+ p->sh_name) <= p->sh_size // 1+ strlen(".shstrtab")
|
||||||
) {
|
) {
|
||||||
delete [] shstrtab;
|
delete [] shstrtab;
|
||||||
|
|||||||
+2
-2
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
@@ -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-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
|
||||||
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
Reference in New Issue
Block a user