Compare commits

...

38 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer fdec47a83d all: prepare for release 2022-11-16 23:15:38 +01:00
Markus F.X.J. Oberhumer 7ff913bbd2 src: remove non-working PackMachPPC32 from PackMaster 2022-11-16 22:24:39 +01:00
Markus F.X.J. Oberhumer 94775bef9f src: remove non-working PackMachPPC64 from PackMaster; see issue #626 2022-11-16 20:41:31 +01:00
Markus F.X.J. Oberhumer 3cf102334f src: add option '--force-overwrite' 2022-11-16 12:52:53 +01:00
Markus F.X.J. Oberhumer 627e733a30 src: minor compress_lzma.cpp cleanups 2022-11-15 11:59:22 +01:00
Markus F.X.J. Oberhumer d31b80da5b cmake: improve tests 2022-11-14 13:21:07 +01:00
Markus F.X.J. Oberhumer eb231b65f3 src: clang-format compress_*.cpp; minor cleanup 2022-11-14 11:35:13 +01:00
Markus F.X.J. Oberhumer 59e3b1f98d all: cosmetic cleanups in NEWS and doc/Makefile 2022-11-11 05:32:59 +01:00
Markus F.X.J. Oberhumer 8b174bb272 submodules: update for new version 2022-11-10 17:34:02 +01:00
John Reiser 4199a44bef armeb stub: b_method as arg5 is 32-bit unsigned
https://github.com/upx/upx/issues/618
	modified:   src/stub/src/arch/arm/v4a/lzma_d.S

	modified:   .github/travis_testsuite_1-expected_sha256sums.sh
        also src/stub/arm*-linux*.h, src/stub/tmp/*.bin.dump
2022-11-10 08:04:35 -08:00
Markus F.X.J. Oberhumer 777392c0fe src: add some compress doctest checks 2022-11-10 16:26:36 +01:00
Markus F.X.J. Oberhumer ede1fec5e7 submodules: update for new version 2022-11-10 16:25:33 +01:00
Markus F.X.J. Oberhumer 16de3e78a5 src: try to fix canUnpack() confusion - see packer.h 2022-11-10 06:00:53 +01:00
Markus F.X.J. Oberhumer d7508d8c09 src: pefile.cpp: replace "membuffer + x - y" with "membuffer + (x - y)"
This is needed because "membuffer + x" is now bounds-checked, and
the temporary addition would trigger an exception.
2022-11-10 00:40:41 +01:00
John Reiser 2a136c1c1d End users wish to avoid "double packing".
https://github.com/upx/upx/issues/622
	modified:   src/p_lx_elf.cpp
2022-11-09 15:39:16 -08:00
Markus F.X.J. Oberhumer 2578102be9 src: misc cleanups 2022-11-09 22:15:11 +01:00
Markus F.X.J. Oberhumer dadee7acfb doc: update NEWS to mention a user visible change 2022-11-09 21:47:28 +01:00
Markus F.X.J. Oberhumer 28f0bb4e11 src: fix pefile.cpp otls allocation not accounting for alignment. Closes #621. 2022-11-09 19:29:16 +01:00
Markus F.X.J. Oberhumer 824c8a8efb src: introduce raw_index_bytes() 2022-11-08 23:05:34 +01:00
John Reiser 37f27a1262 "gcc -Werror=format-security" is small-minded
... and does not perform constant propagation
	modified:   src/p_vmlinx.cpp
2022-11-08 13:36:28 -08:00
Markus F.X.J. Oberhumer 2b8a7a492a src/util: fix compilation when not using xspan 2022-11-08 20:38:52 +01:00
Markus F.X.J. Oberhumer db56bbb11b src/util: forward memset() in xspan_fwd.h 2022-11-08 20:34:44 +01:00
John Reiser 82d26f04a4 p_vmlinx was too eager
https://github.com/upx/upx/issues/622
	modified:   src/p_vmlinx.cpp
2022-11-08 10:30:48 -08:00
Markus F.X.J. Oberhumer 5045f7eb42 submodules: update for new versions 2022-11-08 17:33:56 +01:00
Markus F.X.J. Oberhumer 82a6ccac4d misc: add misc/cross-compile-upx-with-podman 2022-11-08 03:54:30 +01:00
Markus F.X.J. Oberhumer 2d74298001 make: update Makefiles 2022-11-08 03:52:43 +01:00
Markus F.X.J. Oberhumer ce21254ed2 all: misc cleanups 2022-11-06 08:35:00 +01:00
Markus F.X.J. Oberhumer 874250fe49 submodules: update for new versions 2022-11-06 08:34:06 +01:00
John Reiser c8a3acbba8 Static executable with 4 PT_LOAD has only ELF headers in first PT_LOAD
https://github.com/upx/upx/issues/615
2022-11-02 10:03:25 -07:00
Markus F.X.J. Oberhumer 81e11987a2 all: add UPX_VERSION_GIT_DESCRIBE 2022-11-02 10:35:40 +01:00
Markus F.X.J. Oberhumer 668cefec2f src: mention UPX_CONFIG_DISABLE_GITREV build config 2022-11-02 02:52:20 +01:00
Markus F.X.J. Oberhumer 212bc04257 cmake: run tests sequentially 2022-11-02 02:50:02 +01:00
Markus F.X.J. Oberhumer db401fd05e cmake: improve "make test" 2022-10-31 18:53:38 +01:00
Markus F.X.J. Oberhumer bebe72481c testsuite: update checksums 2022-10-29 19:16:57 +02:00
John Reiser 2b9e83256d SELinux execmod requires no PROT_EXEC when PROT_WRITE
modified:   src/stub/src/amd64-linux.elf-main.c

	modified:   src/stub/amd64-linux.elf-fold.h
	modified:   src/stub/arm64-linux.elf-fold.h
	modified:   src/stub/powerpc64-linux.elf-fold.h
	modified:   src/stub/powerpc64le-linux.elf-fold.h
	modified:   src/stub/tmp/amd64-linux.elf-fold.map
	modified:   src/stub/tmp/arm64-linux.elf-fold.map
	modified:   src/stub/tmp/powerpc64-linux.elf-fold.map
	modified:   src/stub/tmp/powerpc64le-linux.elf-fold.map
2022-10-28 13:04:17 -07:00
Markus F.X.J. Oberhumer 5763518cce misc: add misc/rebuild-stubs-with-podman to add upx-4.0.0 2022-10-28 20:03:30 +02:00
Markus F.X.J. Oberhumer 3e4c5bab72 testsuite: update checksums caused by version bump 2022-10-28 17:30:56 +02:00
Markus F.X.J. Oberhumer bce109ab54 all: post-release version bump 2022-10-28 17:10:52 +02:00
81 changed files with 9415 additions and 9116 deletions
+1
View File
@@ -16,6 +16,7 @@ StatementMacros: [
ACCCHK_ASSERT_IS_SIGNED_T, ACCCHK_ASSERT_IS_SIGNED_T,
ACCCHK_ASSERT_IS_UNSIGNED_T, ACCCHK_ASSERT_IS_UNSIGNED_T,
ACCCHK_ASSERT_SIGN_T, ACCCHK_ASSERT_SIGN_T,
ACC_BLOCK_BEGIN,
ACC_COMPILE_TIME_ASSERT, ACC_COMPILE_TIME_ASSERT,
ACC_COMPILE_TIME_ASSERT_HEADER, ACC_COMPILE_TIME_ASSERT_HEADER,
ACC_CXX_DISABLE_NEW_DELETE, ACC_CXX_DISABLE_NEW_DELETE,
+147 -147
View File
@@ -46,164 +46,164 @@ b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.
a0950546dc17fca9437219431d8ddb0249ce5b08e899e0c799a87ac982adee70 *powerpc64le-linux.elf/upx-3.95 a0950546dc17fca9437219431d8ddb0249ce5b08e899e0c799a87ac982adee70 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\ expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\
e697578691a81e9d4bae7d32ea1f2e83c48956d6910d0306761e484dc3c07e18 *amd64-linux.elf/upx-3.91 60cf1528ad264c8f4d766443fae02fd0a7bf46247c896c53a19bbd90b800e918 *amd64-linux.elf/upx-3.91
6b54df3465da21601619d973b618cf45f695e8511f8d9c88d65f8efc1e347512 *amd64-linux.elf/upx-3.95 a4aa078f2dbb381a6132b85ba53df5ac9ede069a43adc542aec25263ffb21ce0 *amd64-linux.elf/upx-3.95
939e9058b5abec32f27588474ad334d8d05a9a8515e75dc417d397c6de74d02a *amd64-win64.pe/upx-3.95.exe 4af65a302afd863073401a11c37246965d7b4ba101edb57d6e3547216ac3c8f7 *amd64-win64.pe/upx-3.95.exe
290cf727b3944db22fb1618d0e36d06659126d759a06fd0a5ffb397927d34f31 *arm-linux.elf/upx-3.95 fef37f59ada02f3d3555c2393fcd0fa12f644c4a57e98d0859fa4f919c243ce3 *arm-linux.elf/upx-3.95
4c488f100a589aace7e52a1f49982b618662ed2227e66a1e8c9699c9969ccedc *arm-wince.pe/upx-3.91.exe ee4878808c92fc90867775ed1fccb4da94097d8e493c771ed75dffab6da6b167 *arm-wince.pe/upx-3.91.exe
b5da1b05cfe70c4d8dc169d8e27bfd8d95f92cc2c7307f907a7bc561e3523dab *arm64-linux.elf/upx-3.95 911f5f56fa4f208d047eb00f9b5686993e7011d5bc17c90fab06b42b470583b0 *arm64-linux.elf/upx-3.95
56abe47901f0e4fb207c3c19d21334664229081391d6df7e5e5c81b97c57419e *armeb-linux.elf/upx-3.91 c0a2eb27fbd6507a047d2f08f668c07d54a277d16394e437105f2b27dde434c1 *armeb-linux.elf/upx-3.91
d0712d61d08a6e7161a9ff2dc933888199705fcf194c9a96350d75774c5a6a62 *armeb-linux.elf/upx-3.95 e149178f6ce710ee151c2b11b8d2d6d8e99d65c1c640147f3e7aa1df60f0b438 *armeb-linux.elf/upx-3.95
bb56e464921ad806bc72308f85d42ea1b4f6715983ecdb9415b1d525f5e3ec9c *i386-dos32.djgpp2.coff/upx-3.91.exe badd40b58323cf5825fbd6627fe27a1ee2f1e787ea59b28e7795aa3b2799b887 *i386-dos32.djgpp2.coff/upx-3.91.exe
7adf07236d7a36099122edeba72534944f7f0cab36f110169f3b5755f48bad76 *i386-dos32.djgpp2.coff/upx-3.95.exe 52b2d1bd52747bc14784dea187159c424ee58a02758fa4f7548cfb6dff80d699 *i386-dos32.djgpp2.coff/upx-3.95.exe
590b4b75ad6fc076440bf7afc9261ff1e5e3efeec84c5cd81243aec2b0b5274d *i386-linux.elf/upx-3.91 b4bbba7e71afc2986b6cb9f17a0e14929b68f83345045bf30dc2c5761b91bda8 *i386-linux.elf/upx-3.91
0dfda4fbe5bd260f1592649eb564bb28ee768413e1c7fe3a678d8d7b025edcea *i386-linux.elf/upx-3.95 faa00110c0a70a7fe455e61cdb97a9483cf6e578cb13033e8995d887543db69b *i386-linux.elf/upx-3.95
e3f98f4c2d0473b11fedd966e2fa184c0cf7e49a46fcbd5705387f9f2b191106 *i386-win32.pe/upx-3.91.exe 055135feb800114b4c2bdd9de28e845611f1390a1668ef3e20897d23d1fa8614 *i386-win32.pe/upx-3.91.exe
38c37ec2351783a48d4cce3f240bbf6a31331f9d9bd86f77cee468ff179cf58c *i386-win32.pe/upx-3.95.exe 59748c9f0eb3eef2b54a54dbf274459cb28b5e9b12ba69993a6250c869f5ea89 *i386-win32.pe/upx-3.95.exe
ac331450fd0609f0f47a5012156a13d06dcabdc8ba58d5a7810dee6f17fda123 *m68k-atari.tos/upx-3.91.ttp 84158c951fa65d6c53c9dcced158f8cd1b566e83f2109aeac7d6247338c48098 *m68k-atari.tos/upx-3.91.ttp
7483078331cbfc32f6150929c244f4cc0a34282f60332da37bcfdbe41c1014cb *mips-linux.elf/upx-3.95 7522c07537da37c370c0dd925fc1b93eb53e329219dd6e21259281a871767779 *mips-linux.elf/upx-3.95
23fe3c6320f3cebce8027ec5597c228b9f160407e1e0e8a810e2ae6be8dc0d43 *mipsel-linux.elf/upx-3.91 7b9258b0c97f733ca602d8f4ea08619ee430fd8802d046051f10ae68576c7756 *mipsel-linux.elf/upx-3.91
3279bdf38a14623c7a939df871f0efa5aafa4d4ed6a28c779a5d5213e6dfb7a1 *mipsel-linux.elf/upx-3.95 75c1c61ce3c53888525a9bf5b3e51b86f1fcbdc91151e6b4b19041b15dc1e5c8 *mipsel-linux.elf/upx-3.95
5fe46128190a2553c6219f6f998b31ff007a5692f44585bcec27566eb6bf6640 *powerpc-linux.elf/upx-3.91 782df126832daeba48f8c86f0ca12626e4257a57b0bdfaa7439f3607f3954b33 *powerpc-linux.elf/upx-3.91
c5ce8e7076d542a92205f98c8017fc9b6f97541a1e082ca2239c1138104001ef *powerpc-linux.elf/upx-3.95 743a676ec7aac4d51e0473911a67b711987d0ec0fda8668a6f0808edcb906343 *powerpc-linux.elf/upx-3.95
21268d593853c2e724037ca0e0c832b89414c3c41e2a0cc9c5038ab162be710b *powerpc64le-linux.elf/upx-3.95 b5dd587c58d013dcdf7551f8a2b8427cbd37f6e76c54e735baf68ee2a49fba9a *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\ expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\
b8e4d487f79a5c097244793f0535b2cfc4587449f9cbc9a7e19f5171a7a05f8c *amd64-linux.elf/upx-3.91 b8185a6b0ec81e5e0a3f741fe49c5635934f45a84e2154147100410496c9a880 *amd64-linux.elf/upx-3.91
ab4972d2fd8369c43337aa636060b881c65ca18942d46d7ea24392a771b07b30 *amd64-linux.elf/upx-3.95 8977f05b4b52c5ce1bdf32dee5c5d790640d79ea42ad83401826c261d9249866 *amd64-linux.elf/upx-3.95
f5380d57da37b4d5e1258f0d36e329a936c3976ac7f684baa20899c9cfc5f167 *amd64-win64.pe/upx-3.95.exe bcd8749ba0c502fa7b21bcec9e531f3b7a178cb8757407d6b682d4ff1952d2a0 *amd64-win64.pe/upx-3.95.exe
024b27a1edf93da0efc93190c4b6d2003d76e43a80065b24a1aa5bf0143feb06 *arm-linux.elf/upx-3.95 f32239666d98211182580a9badf1cab01197b51d8a3a358c26e3fa248a0ef776 *arm-linux.elf/upx-3.95
0c588526f42f3f0931731fb01e1e257780c9a87a1701b2c3f4a7605b6911f618 *arm-wince.pe/upx-3.91.exe 8261c22417294e3f0506d8f41154945e3f0b7d2a67e532af318d5795cd8f9c22 *arm-wince.pe/upx-3.91.exe
2c12d439d9a24c532b6c41decd9b01d2774d03e34692129ee17b8448e3436e3e *arm64-linux.elf/upx-3.95 6e60054ace6510309426893dcf683b4c6da88f3fbd97e7149e23bc4bf8c88003 *arm64-linux.elf/upx-3.95
eb7436b949fd646500bf42f14abe2ea6d466cbda5cbfff36a4e71693611d6c9f *armeb-linux.elf/upx-3.91 52496fee0654d4a46e778a01c3bc17f4f25f885291241f5237f0824f5b9a0cb3 *armeb-linux.elf/upx-3.91
3e0db5fc130ac5b08d9b4df0cdf0fb9a40fa299cd5e28b2550277845500fa729 *armeb-linux.elf/upx-3.95 48434abf0b96e57f421db5a9c45b04eebf105420a500656859d6fdbd3c5d99bf *armeb-linux.elf/upx-3.95
fb7d8645e851534e4050efac23aff3fc0557f217d4fe2bb3715f8771845f5759 *i386-dos32.djgpp2.coff/upx-3.91.exe 0d7c87e490dff9a41a9c3b317e2529f2d1b1926844a47c48b42ef8bd7d212a4d *i386-dos32.djgpp2.coff/upx-3.91.exe
12d2e9029826966caa38cf719757a055298c86d46e6bea7eef7a20a77a6902a9 *i386-dos32.djgpp2.coff/upx-3.95.exe 75f42a83bddfc1923e32a6725a153219b1a37ecf4fd30876599341fd77de321d *i386-dos32.djgpp2.coff/upx-3.95.exe
b10d190bb8c2aee25ed264051b1527649c5f6fa3f8dde46c7ddd9fb3caae8e94 *i386-linux.elf/upx-3.91 2c50b4a2649ea7d4c1ca7d5c541107b878942ab61ef850ce5bdbb7bc6da8d777 *i386-linux.elf/upx-3.91
b6c3402266a0d798ffbdf5ed3c6bbd80cc25999cddf178ce65c8e5917cb60cd9 *i386-linux.elf/upx-3.95 134dfa566532c1432be87a45d7d28333e79e7fbbe12b5c27fb02e24a550eb9c5 *i386-linux.elf/upx-3.95
1a353bff5e90a73664fb1366fcab3ddde11f9309a59cf0e58a9f6deb40170bff *i386-win32.pe/upx-3.91.exe 3d04162e902e0f311493955df2dd60fa018b60003d4394d638abda22fa88a7fb *i386-win32.pe/upx-3.91.exe
9fd5633d06eae78f683857fc90ebda7cad60395cc46751101190086f069e55c1 *i386-win32.pe/upx-3.95.exe 1972dca6a741124271a291565d001af92cfb379d11a7efa54680a3f96d5f02b4 *i386-win32.pe/upx-3.95.exe
2df5dd59cabcd7c09293982cc4638a608c424e515f8040aa70473d30fd7373db *m68k-atari.tos/upx-3.91.ttp 9751dfa351aa5076523c6bac013cf48b34267947fd1f057109fe141ead815d52 *m68k-atari.tos/upx-3.91.ttp
771ee01c165aa0dac865f946dd4207680a723ef822f2ceda27c6c442978cb898 *mips-linux.elf/upx-3.95 b80bc9585ccb586c3adc6c712110838366e61cefaf41a36a54e4eef8351d43c4 *mips-linux.elf/upx-3.95
f99b2e97c49e86cbe8141160de3b5196e78fe85776a159b745a78144c7fd29a9 *mipsel-linux.elf/upx-3.91 4b87450050446b03f2d88c79efe2cf87e403f82e9f1f47cb3e99a82b1678f91a *mipsel-linux.elf/upx-3.91
bad98328d8666b5f92b7210fa22920947fbfb38a86e788f1bcbb8ce1c8e64bcc *mipsel-linux.elf/upx-3.95 0fcf1b3c72d4af95562dec2e2588816199b2a5086d848548bd9648456c64200d *mipsel-linux.elf/upx-3.95
fc671351debd86f347f874e5a1cace099bbf388fd19f8ec2ac226ab22c84e46e *powerpc-linux.elf/upx-3.91 7fc8fa7a67899917fbeffade2e7bfb32c6a395e781274901230cfca51ce33516 *powerpc-linux.elf/upx-3.91
cb248465ee6fbf2aff427c9c015de65c547bab7ac3b84b5243980d707c3514ea *powerpc-linux.elf/upx-3.95 ce6d87922a0d203fba0ff90e263e80237379dbf8daf3ae83d7d0cd9eb19c3360 *powerpc-linux.elf/upx-3.95
49e84bc28d7d80d828cf9298101468730dc1badc6e2f710884e2afc34d669391 *powerpc64le-linux.elf/upx-3.95 204cf8575465fb406dfd0520cc6bc103988074676123c2255e36952ab8d5c82f *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\ expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\
037e9867bc52669e8f4869d64a41a8faaca3e57f6b226b79a894aa8854f0d73b *amd64-linux.elf/upx-3.91 8a7ec7f638e95156177a29a32c5a6a3cad2e3e970ca031bc28a55991428bab46 *amd64-linux.elf/upx-3.91
54b9d627cbb8bf19a8b7e299af33fcfbf45287ee41de1fc3b7806f45cc9f0c4f *amd64-linux.elf/upx-3.95 a1e9f15306809e6a65952d49163d50e11fc8dbe1094847e487c1509c5d642883 *amd64-linux.elf/upx-3.95
c76b656a4e5c9d3f691d186b488e89401246395e05a4c571d8384826ec1afd7a *amd64-win64.pe/upx-3.95.exe 6a557025f93fbf869be7cae692959f96f250a5675195c53f26c17ef0d95246e7 *amd64-win64.pe/upx-3.95.exe
1099f092f803371ae60fe45d1210ed000fa011026a6e3a339119d30e7b533a3d *arm-linux.elf/upx-3.95 b2a5d5cd936205a1d2c87019cfd1ead7d22268acc8be08963b358c807f7b0b2d *arm-linux.elf/upx-3.95
0fd539a9cf015e60f55cfe9a2cb735c39abcec4097a1d9dad14133817322f149 *arm-wince.pe/upx-3.91.exe 3be544b1ae2bdd70c764eb6f3424e83e49dc70991f21cd1bbb4aa892a706dfcd *arm-wince.pe/upx-3.91.exe
f74bcbafa912d4b60431744347562551efb3a4c738b33b54788702c9a04a2755 *arm64-linux.elf/upx-3.95 046e3639cff25a8d5d9c817aa314f0885667ccd71eaf17ebc87574dfdd1e0020 *arm64-linux.elf/upx-3.95
2159088afb2481c20bd3e46b22f135ea9a71fccf84cf8e3cd5288012bf499efb *armeb-linux.elf/upx-3.91 cc38f1ee23b97e107a2da9ec87358345b35e9bdb222791929b24f21838bffd03 *armeb-linux.elf/upx-3.91
a4e1fb939ffd0dd4fba8d96332406475220439ee368c4445b715d723c14257f7 *armeb-linux.elf/upx-3.95 1fa4a8c3eca8dfdc5464d1f020ea3eec75fedb037a3dd73a343655479464717b *armeb-linux.elf/upx-3.95
7832f40d5a2f4208c5a765a90758a75b8208ac5b4c01a78c276be2ff74d6be13 *i386-dos32.djgpp2.coff/upx-3.91.exe 1c777079d1b35fa3ee68cb4e36822091fdbf4ea4c7ed149da1c34424b082b39d *i386-dos32.djgpp2.coff/upx-3.91.exe
e6bde12bead66eff48502e7944fe44a557db3f236b6d0155be5b9bf891c6beff *i386-dos32.djgpp2.coff/upx-3.95.exe d65c3d9c8850802bb66d51b26fdd905beaf1b72b7ba8550ec11788b7136b0204 *i386-dos32.djgpp2.coff/upx-3.95.exe
8306fa054b3281547f545b2ec1c5a059f0f29414fdeb4a5572f07c25bc8deff2 *i386-linux.elf/upx-3.91 f2511747fac635a1d70b2364dfcdc91da517aec2c87d8d017557738e87d84061 *i386-linux.elf/upx-3.91
75f6be5e52b89ac19f822ba9ed598c050078d9ec5530dd73144b5f0748dfe6e7 *i386-linux.elf/upx-3.95 e74cdd10bf5f37249278634bf1055adaa0527bbe4735c4cdf7a54663b67db985 *i386-linux.elf/upx-3.95
61ea92bd711bcbf8c74e33054f320ab214dc1b2570e814a5d1f65001f7e1e507 *i386-win32.pe/upx-3.91.exe 4d21e45a321a78de433d96170a3e39daeee2ab18c646f2fca0ae1367b356ea63 *i386-win32.pe/upx-3.91.exe
ed5db8134d10a59b0dc1b973339823d20104ac3c1be0332fb55b1f2e220110c5 *i386-win32.pe/upx-3.95.exe 3e1a705b3c6859d7812e4d8b42fd6201563356614b7f0ec16718cddb8bec1e82 *i386-win32.pe/upx-3.95.exe
d381ff2c7115e3100daa567e49dbf36bd42ea7544039d8e7fb66ecc5009f88c0 *m68k-atari.tos/upx-3.91.ttp 9a812916dfa09e821f9b3233b98b6740d39751ed0dc63e8edfd8b59f262b4218 *m68k-atari.tos/upx-3.91.ttp
6aa24a6661d322f60805406b87a5be605a5aee52d33e798328b7d118dfba4862 *mips-linux.elf/upx-3.95 eea25f8bec855536168c1e9f1b960c807ce46f9758878fdff2d23065d8007d14 *mips-linux.elf/upx-3.95
04a1492fad74bc942216721a9e538638c9dc14f64272c5d90b54dc5a38c98b4d *mipsel-linux.elf/upx-3.91 e37c0ce8513131e4e1ebeaaa999d258be95bde655b60fc9c575b3648a0b07c14 *mipsel-linux.elf/upx-3.91
31f6814a6964c9d5e44f1cc842742036747e95df2bdc4f4dddc8f05d4d9eac1a *mipsel-linux.elf/upx-3.95 c46b272e068276601d8ebc3a7765f2e3cafd279b3f5aff6fb4af4d4869afd387 *mipsel-linux.elf/upx-3.95
5b1121a963ecec3e221e0b475f6cde7aad14d5cdd8cba43a4516dbdb92eb5a66 *powerpc-linux.elf/upx-3.91 390eba4b44e6e3e3e5b726ca7d087eee4a90af0c194d6cb7633da5e0e5d8dec5 *powerpc-linux.elf/upx-3.91
c4f35cda7fdf64d9195115a82c806f084e2dbce0f80a31b34a882138d6d159c1 *powerpc-linux.elf/upx-3.95 b21ed94586b7254c96fcd64034e73ce8cb8851c92bb27d4d5eb377cf16c56aa2 *powerpc-linux.elf/upx-3.95
ce70def8c58def3d548aa04f502c8279392eadcdb2c3d3cac8466cfcd3a6b7ab *powerpc64le-linux.elf/upx-3.95 52f53a9d7fa0b38ce1276101bb8be59d31f54a959ca0ae0a2708dd3083d0483c *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t140_compress_lzma_2_no_filter="\ expected_sha256sums__t140_compress_lzma_2_no_filter="\
38b58e0702763bd421f8940479a8545f39a2a8f27d90d2c276dc677d8a99846c *amd64-linux.elf/upx-3.91 804324e788c9cafe63899ec5a63d77e3a51cce3b0750b1c8b34998b67a748fe4 *amd64-linux.elf/upx-3.91
5b34c95e9d636903b85b79b299d28f2aa6bd8d3a3d1696acf308d8cf8bfe99d4 *amd64-linux.elf/upx-3.95 289966c134b6a8205ab24985ece406825e752f585cde562dd89e5dfd6b85d685 *amd64-linux.elf/upx-3.95
dd10984767f9fe67900b64d63699ccaf858b9072272eef5ca373a7701d5057bb *amd64-win64.pe/upx-3.95.exe 85334ab36776fbc83d7f9b323e398045709a84227cc060ec1b11416e47b7d670 *amd64-win64.pe/upx-3.95.exe
4aff8b057429fcdac4f4b3691278c87280e247879ef07ea0291a1c56f999750d *arm-linux.elf/upx-3.95 662c325309248481d6badea5e1f029199e016805e71493f293b4cc1ddaaf7312 *arm-linux.elf/upx-3.95
9e5ad415bb42155a3c527fd259ac7ca1534a14bec888cb1ee8a7cc8e2ca0019c *arm-wince.pe/upx-3.91.exe 6702553672b3c82c5202568995e147ff0add3d313cf947c11715e28619e0d8a4 *arm-wince.pe/upx-3.91.exe
65facbcdbf7f79d88fce4af18629f8489510134005b3e490eb42fa112603e18e *arm64-linux.elf/upx-3.95 18911ee9b594bd26afc0e8613cf7b2ea1c94a7802e34f7cc8f73219ce073b549 *arm64-linux.elf/upx-3.95
78d94d8209a443ae3c05f360c1086fe8bcad109e3a7d5267c571ad53ad38702e *armeb-linux.elf/upx-3.91 8406d036dbd9cdccaad665b6ef1a7c2dd19444e68cc22356862981f8bb887705 *armeb-linux.elf/upx-3.91
37242e5eb6ef64ed6dc862a791643d62cfc9c3b98a6f88556216a002101ef73f *armeb-linux.elf/upx-3.95 88309cf1e9ced304ae7075a1936fe5ca36252b02778122b7c68a945552e5d985 *armeb-linux.elf/upx-3.95
99209d2c5e6e7bf9edad472b181318f135a619f10d19ecde37158a80e186658b *i386-dos32.djgpp2.coff/upx-3.91.exe 97333fc14e57dfa8e1e5253d5e1fef192be15ab244c8f8fcb085df6df84a6af9 *i386-dos32.djgpp2.coff/upx-3.91.exe
f713b061cc6171d6fd467f6041618bf5c61179c406ccf6b79acb378e7fa1f3dd *i386-dos32.djgpp2.coff/upx-3.95.exe 35695a112da8561ce23421e143a175b208cbfb111147d0d1b66076204eccb786 *i386-dos32.djgpp2.coff/upx-3.95.exe
48b554af082672ed3c5dab9ef5d78f561215f23ab98eb49904766e2801b70799 *i386-linux.elf/upx-3.91 18573567330d45620d03eb4f429ef961237e699d4f3e6996b821a4b06b41cfaa *i386-linux.elf/upx-3.91
9c1f8e34110030920684ee1276033bcaaa3cd2917d4cc001dad6efd865e8f2e8 *i386-linux.elf/upx-3.95 e29d386a052212dec3c772afc82a082935c45f2082f534a703cac1a3df526624 *i386-linux.elf/upx-3.95
6d08ec9ab29b1d85bfcaebac1adeec1a5155c8b37a5c979e40f4e0fcae12cb45 *i386-win32.pe/upx-3.91.exe 41bdbc2c6a81afbd84bd76c0f86aefbe2910e9d134ad7f4d8546d75faf0bb9f2 *i386-win32.pe/upx-3.91.exe
1754e33c11034d09076c6a534532d5d9a13e967e4206221cc8a0c6d904bb6edc *i386-win32.pe/upx-3.95.exe 86d64438184889bed06efcb58acb4474ca0a5f9e6f68b13454dc0c3769994953 *i386-win32.pe/upx-3.95.exe
d044c35793adedbba31dee6adb4dbd1fcde183f2299d11b17e15aca83500217e *m68k-atari.tos/upx-3.91.ttp 3a5d8cc9d5614d78739b1b3eaf2f5fce1607fb27c9229da88580faedd48a1e32 *m68k-atari.tos/upx-3.91.ttp
f555a0e2444ec2d859609236c66f45b9984cbfcd9668d16dea5de0feb86a94ea *mips-linux.elf/upx-3.95 621d84c8fb8f51d97846d6db10b42cf761fffc33f5ed62a30a4c1ce12a7581ab *mips-linux.elf/upx-3.95
8a96d7674eb6754235d0e7cc2e72bae241a166e2d232e70ee97bd0382c5dba9f *mipsel-linux.elf/upx-3.91 9de8d51d185935276faa5aea301d6cb027acad0eb61061a0e9c21aacc931b045 *mipsel-linux.elf/upx-3.91
40ddb03c43e5740b634aa05a915fbe5ec2fb1f7076b7a3553d236498f4830964 *mipsel-linux.elf/upx-3.95 0f8fb6ae0e8a62cc1d349ced9beb18be5eaf82fd90960250eea8c184d0cc8140 *mipsel-linux.elf/upx-3.95
262cf98e2533c38008b2a2273f5ee3ccdfb753b854c8afb836be5f1b1af56710 *powerpc-linux.elf/upx-3.91 577584395dc5cc88a5302b69d5492a10da5eb2712bb22f4ad09b222af287f401 *powerpc-linux.elf/upx-3.91
20513f3e3f675b167ce74707f9b31c4e4885f5d7c3d8b050a4a7ea7221b1b6f2 *powerpc-linux.elf/upx-3.95 1287341561dde2168d79165e0ebb15bfd5e404b28f2defd5163e7b658bb1b9eb *powerpc-linux.elf/upx-3.95
b8aca35fce8a1ceea2c7ba4f11cfcbb3549ac0e93b955a0c390f6a7063e865e3 *powerpc64le-linux.elf/upx-3.95 132c287fa13771b9a251d02d007fb5606acc298afc8defb556eafe05c4a6eea5 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t150_compress_ucl_2_all_filters="\ expected_sha256sums__t150_compress_ucl_2_all_filters="\
5033deb9509be51229a7fb9fff629547797bfff7046e413a3450892ab459c58e *amd64-linux.elf/upx-3.91 c5bc7dc605b6d6fad71e796260d9b533a4a39ff2664bc1164d1e33a4f52bcd8d *amd64-linux.elf/upx-3.91
d92a21d5b25c4b367142859eb3f29d9754d54b151058475a81e5bda6e5093dcd *amd64-linux.elf/upx-3.95 543e5484080f84ca511d4d7a3ff86a6b06aeaefc17c5dd65dff859c1d15d5c1f *amd64-linux.elf/upx-3.95
870083b25a88a2ff5cb49dfa109e55fc082b11af39c352740bab65c551b40282 *amd64-win64.pe/upx-3.95.exe 16b7f3c5b0aa1854edecc1519b9b8b9fb8869f7b8b295aa6a42f684750f641b9 *amd64-win64.pe/upx-3.95.exe
152fbbeabd01c771d526a887ae6a8d92bc5a9dd92ad0779d9a40a036f4760309 *arm-linux.elf/upx-3.95 b4919e7441869d45b98454abd935cd5dbef06bb3a0382f852f3552e6f8ba9768 *arm-linux.elf/upx-3.95
f88d160e5a3e7e323623dc5f1f6edabd6ed0ac477beb168bf754047c04531097 *arm-wince.pe/upx-3.91.exe 32f7fd369c33f4c70fcb7e6ece14f3cb532845a2410af8fa9d6e23b380428a3a *arm-wince.pe/upx-3.91.exe
379a8eec659fd1a1bced32342b45e146333b3a257942d66f7a1062f9cba88f9c *arm64-linux.elf/upx-3.95 6a91fb2df9366591530bd4d4e240e7cb0316de19bc437b93adb00dec26fa9227 *arm64-linux.elf/upx-3.95
86f5d6d3f7b738e4e30157fb011720fbae61f52a6296e3dfeb445afeceb91e32 *armeb-linux.elf/upx-3.91 839dca66684e5fe8da1a81507c427b450d3af00014a06cf1e728091b412d4439 *armeb-linux.elf/upx-3.91
7cb7f1a18d00631decbbd73d56d4cb54a5402cb3784607406c258ce5af3f51ca *armeb-linux.elf/upx-3.95 98fc09fded3e4c4e377ad7b1cb109d0115ce34c215762ef85810841b2b1c6973 *armeb-linux.elf/upx-3.95
4b34e1f0553937c3fb6b98b4cad7beff510d5f0c9bbfd2fd2cc6986bc569d579 *i386-dos32.djgpp2.coff/upx-3.91.exe 765d81de304b2e60ee51da124677ba3d762da34df2f0e7989c8e967aa130754c *i386-dos32.djgpp2.coff/upx-3.91.exe
41332641b361c584763bfc149d3762bb4c337fe979af85f4b6cc03c3318ac9a9 *i386-dos32.djgpp2.coff/upx-3.95.exe 2d4429efc2161399e07e7bafd94b0e8631f8afdc2dc27f823b8983ad9cc74ffd *i386-dos32.djgpp2.coff/upx-3.95.exe
e3c7e93cddce54b2c044b23b2ce239e2373134212cd930ad700ab93178785941 *i386-linux.elf/upx-3.91 e9c041cdf4da72fabba9a402eaffe35a2ffd59caaa629580a6fdf61a3810ec01 *i386-linux.elf/upx-3.91
14827578a5bbcebcf02ab9754145a290cb06d0c2dc3d9c34da182c3a22071cb6 *i386-linux.elf/upx-3.95 a6905f887a7f9c28657b9afe62121b2c2e4372594654b75fe3f6c77c2fe608dc *i386-linux.elf/upx-3.95
f10fb96a4db81cde3f76f3499710c16accfb7c7b30bc3e5532ea3b0b5aa57d54 *i386-win32.pe/upx-3.91.exe f0e2972e405a0d72c09fca7e63a56bb5c3658af558253151234431a7f7be4df0 *i386-win32.pe/upx-3.91.exe
a83278c357fa81f565ee1f95edbfc0156318b9638a5934421ee9f2f1bae5479a *i386-win32.pe/upx-3.95.exe 1dd5519f77e84d824b97d480fcc3ce03c9302411af4bfedc720970f0da42511f *i386-win32.pe/upx-3.95.exe
f29d9bb67de28a5eddbd3153c616f8b840d019bed48dfc6cf99ffc0bc6146390 *m68k-atari.tos/upx-3.91.ttp eb475239ee1e22b9fde001334f2e4b9198e69e5cbf1dad4799e9689ee3f4b4a3 *m68k-atari.tos/upx-3.91.ttp
356630562c9b017d18e09373ca71e19e870ae10b25ffa7a0d6e3e5c1fb948d73 *mips-linux.elf/upx-3.95 c7b5aa7015d3aebfb26dbfc07cccaf27c95635eb3059bbe3b63ea4464d348ca0 *mips-linux.elf/upx-3.95
336a1795b3675a8ee76fff35f6c9ea9c7fc8f48dd53224a990f1191b1cbbab65 *mipsel-linux.elf/upx-3.91 1665df73de7d6295054a6586f36a3539d04970036ed589a13d15889bac0531dc *mipsel-linux.elf/upx-3.91
dbebbc932fc3caec6be1fe92d21eed379ed3bf7e55293c10c54dfba9c37229a9 *mipsel-linux.elf/upx-3.95 dd6725bcff72b27b292670eef5e165e5150916c11147a782b648e954cdfb0951 *mipsel-linux.elf/upx-3.95
adb8d16a5a635cdb3ca12346c5317ce16431cc8ecb9a54a856ee9c2586f7911a *powerpc-linux.elf/upx-3.91 68fe23ad35bb80fe99d3d83ca5856aabe5816fe415f70ac9e94a241283972088 *powerpc-linux.elf/upx-3.91
286c92ba6bb88c13c01fc932d1a742a2cc0d01b4c59731d72c7a91d0c7c6c9ef *powerpc-linux.elf/upx-3.95 bc2ae2af43c3e07b3877b0f9c569db3a11b4b5fe593bdd86702ff6e9e5bbf26a *powerpc-linux.elf/upx-3.95
9102d4d31572fc5b5244a6f7643e1d001cc3044836a25c6211f3117d4c2b1dac *powerpc64le-linux.elf/upx-3.95 9081f42953e76c5c2985dc5ed4eb6db8569ac9cac1935181031d06251c9e2b75 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t160_compress_all_methods_1_no_filter="\ expected_sha256sums__t160_compress_all_methods_1_no_filter="\
407f350965205d7ef3d860cd89ff1dbee74082a7a6777363deb64ac5676ef495 *amd64-linux.elf/upx-3.91 31ebcdb8bc47adecd530ed4856fd980d2d1f9634223633e881c0bada9df5833e *amd64-linux.elf/upx-3.91
8d391e5a14922113c7b72a16728f497553fc834b02971c0ffe65a1efe461f240 *amd64-linux.elf/upx-3.95 f68db730964b5616e18166679e5f145f284153c3fb60ca6c5221565b73496fed *amd64-linux.elf/upx-3.95
867627ab2c87ffe1d82d5f131c0b05f73fc73d1e0a0011e369adb543be3b0deb *amd64-win64.pe/upx-3.95.exe fb77031bf3378bf36f8e5578f613ef270469b45b3092115302cfa5f0263f3ea2 *amd64-win64.pe/upx-3.95.exe
f9f39f443c419ffaf2a5d95f00144d56de4ca66f21d919272345cf360c947694 *arm-linux.elf/upx-3.95 51056aab220ba9f8d8e1cba1493d1ffb06276b6528a6ea17f6a53592c0e2b918 *arm-linux.elf/upx-3.95
9394653a9f6ca77c82916f06d402af45639815edc1eb06ba01e67510927f9d34 *arm-wince.pe/upx-3.91.exe 1cd0e34cd590faaad5e315b0a6b2005b1af4cbc198804ee985407cabe9593d5f *arm-wince.pe/upx-3.91.exe
e22d64d16fe071c70e62e3c97701632a88a1568d8146e197df89f1bcc003041a *arm64-linux.elf/upx-3.95 80de1405d287740715346529a8d28110d79ad6ddac7d22e53b03f0b9e2b5b494 *arm64-linux.elf/upx-3.95
61a18df8b91461fb6ffd9fbfff3d24549abe5a64ca512a063a9c09f2d8dbbf64 *armeb-linux.elf/upx-3.91 8f6baca1ba513b7bcc0ddea296567955232deeee17033e4b556c742415aef820 *armeb-linux.elf/upx-3.91
6866f745d8bfd1f60d3f7fb68e39238f80371e4dec6f42ee08193db13eb2c04e *armeb-linux.elf/upx-3.95 39e0c345678d189a792e4abbfda523c5447eb272a66744cade79981c146e9539 *armeb-linux.elf/upx-3.95
d8a099f8e4fd380b70f0cf8ef56cbebf232ea0c127529593c15fc34af7df32e7 *i386-dos32.djgpp2.coff/upx-3.91.exe 98ef45954db27ffa8acbabb7a8abe8ecc61027e62dd0f7d94fb1af4c4a0fa8b8 *i386-dos32.djgpp2.coff/upx-3.91.exe
5b8d383bbd3594016b09f923f3e3d472649e3854abf9a4d695d67524d57debde *i386-dos32.djgpp2.coff/upx-3.95.exe b0b518e4e34c87812550eae4aa19717a571337bae3839d132188ccb20f6f7752 *i386-dos32.djgpp2.coff/upx-3.95.exe
7116ee5cce8865154ab815eaf717f39b82265c5f88320799d01bea2d92799a3c *i386-linux.elf/upx-3.91 5c4ca76139f3206c8f5902f2c5f02cd510df5275dbf857a6ad323316eea77ed4 *i386-linux.elf/upx-3.91
4f29bc1c53e9cd7047929b8ceb92cc9022cede80fd80afa1c23f48152789d4c7 *i386-linux.elf/upx-3.95 edf9302620e1c640dd7614305fbe8e897dbfa29805b674390448ee4d88f3f9ee *i386-linux.elf/upx-3.95
65e85f6944b98df0ac16d50af98f501f3f87b35c0432edc17244e768f0850a3a *i386-win32.pe/upx-3.91.exe 4b766a3851c2452be06e937a85e8bcd482d8c57e929552abe7276f550f57009a *i386-win32.pe/upx-3.91.exe
6414e7ed0bb0aedc4b027030f42d5d2e49f10cd9d98b9250015be88d708fa4eb *i386-win32.pe/upx-3.95.exe 71efdedb51745d68fa20b533dd5a19a21ec92a6a07fa9fcb8e052f474b513cc1 *i386-win32.pe/upx-3.95.exe
1dc02f7ab54cd23da1ba3efaa3e3ca275cc23bcdcb2f5131bc9c643c87076d0d *m68k-atari.tos/upx-3.91.ttp 0a1bbeeac1a56ac01fe6528e36822793b723bed1b578a922a7ad37a16549fec6 *m68k-atari.tos/upx-3.91.ttp
6b9269ee5709fd2a2bda88fa4d9198e4f163ee067cbd1faca12d17f906c5a2e0 *mips-linux.elf/upx-3.95 721a41418323ff67c2a90f61eab8c7f0ee45a5fa2a4a4d83d0240b487b045ea3 *mips-linux.elf/upx-3.95
4424522044277c9ecfd3869c3746d4ac760b272a58157a8a7b49c1bc8bed6bbd *mipsel-linux.elf/upx-3.91 38c129ba9a0d7f8909070532901aa70dc19d58890ca1dbbd3ec7419a401cc9f0 *mipsel-linux.elf/upx-3.91
673f459fd6024a433d6a86245b569557d523f4f33a2bd1a31ff5ca590a19c663 *mipsel-linux.elf/upx-3.95 1ec691975942533d9bb288948fc283cfe57e0e09853bd02149af63b9788b6be5 *mipsel-linux.elf/upx-3.95
1e6d47f288f6e9ccdfee98bd3700771dd9cad47115909ec9192f10d7a87440a9 *powerpc-linux.elf/upx-3.91 daee5df21ce65551309573a121db90255b6f034eac7988c4cb34bed6834086ce *powerpc-linux.elf/upx-3.91
203a33bb365a745a317a9292562cd80e0f82c7dbafb810fddb8a752d06159dcb *powerpc-linux.elf/upx-3.95 d27dffec68b530d2a8ffb5d440ec9ebe3772d45aaa699329dbb4b0a850cbbfff *powerpc-linux.elf/upx-3.95
6bea6492b66df759ed13748b53b3d5058a1d3b9debf0b209c8b450e76e5fd29e *powerpc64le-linux.elf/upx-3.95 b021e58ff550aa160c83c122e03b63c1baf28808a584a9aefac4268a77095bec *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\ expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\
257a9f44da07e6eb423e651a8323a2b79d38c5d599a4ec1de8f62a7c103eedf4 *amd64-linux.elf/upx-3.91 0ad79f9b86da588e67877e59921cc501ca515dc50d27c077f73ef3fb2c303ecb *amd64-linux.elf/upx-3.91
4adc3488e71c834f28a0d9955b3959d7db19ff375720c02c433aae63ec847b67 *amd64-linux.elf/upx-3.95 5e46d16f080ce4f7b7f317cd3c76b513a70fab1fafb10fbdb72c01d3006b2369 *amd64-linux.elf/upx-3.95
47165d0a33de56cdcf5788773f3630b698bbdc68b8f2a383b348d4264406536b *amd64-win64.pe/upx-3.95.exe 8610b878784b51dfcab58e33536e9812cc69951a8d22c3fad9d4c2583f6bb6ac *amd64-win64.pe/upx-3.95.exe
4038aad4341b884dbe34aac6055391a78af540f368370b5b61bb45c40905160a *arm-linux.elf/upx-3.95 cd02bf210f1d183bdc53f4442a36114b7385b165130b74bcce830703f8c7d9d7 *arm-linux.elf/upx-3.95
4f3f1dbdd225a72d37555d5f60a2eb8308b87ad1e641285f3f693e91cb430985 *arm-wince.pe/upx-3.91.exe d4a6895180ebaaecff91374a58101370db5a8817c1ad1f99876cec02aab6c561 *arm-wince.pe/upx-3.91.exe
3c7b8a6813a446b05d6ea1d5b81155ac216fd847a3b456d01a5cdbe30a6b686d *arm64-linux.elf/upx-3.95 1ea76b4fe1cb058d3e0fade6139fe3c5d2745eb3becf0eddf557194e500648e6 *arm64-linux.elf/upx-3.95
13c966e3377bac700e3e84d725dd8ff9ca949fb74d1ca7774a00af71112dfb7d *armeb-linux.elf/upx-3.91 4f7d97f65cecd626654d3fc34201da60899905b826d395fc6dee7bd6d742363c *armeb-linux.elf/upx-3.91
2d542d14c90a530cf812c713740a0f1b2d73a81b91ef7efbc037c8d3507a714c *armeb-linux.elf/upx-3.95 c5bbe69225f5d75e88ab176a91e148e9ed3733530d0ee9ed22a85aae201d7231 *armeb-linux.elf/upx-3.95
9ea810301eda67e45eee400500d1c88969cd63bda1224446c86eef8a75657748 *i386-dos32.djgpp2.coff/upx-3.91.exe 11130e38b33a063737685110740a16f95f30661480c0f8bf582e4b7fa751f5b7 *i386-dos32.djgpp2.coff/upx-3.91.exe
688efbc1826e6bd0ccceb0462325d5e384f38b7d05dfa3b7901fa18536b6ea68 *i386-dos32.djgpp2.coff/upx-3.95.exe 6f613b3b96147068eb8e1d577537cc8a16011600b79a80d3584c6c115de8b063 *i386-dos32.djgpp2.coff/upx-3.95.exe
294d5099c4794a2de49d264c0bd4bdf80c866041b7caac7f8420ed003ee18180 *i386-linux.elf/upx-3.91 a1529b3e26fe8d101dbcb12338de0b9fc31324614fa5020e0807e3fdad5e9ad4 *i386-linux.elf/upx-3.91
8c40b35f36c8850aa481de5ab13a5cb0fbc8fc9593977dd438c08d55dadfa9fc *i386-linux.elf/upx-3.95 d8e019fff654dcffc9c55bcf171dd932f166fb401dd5884cf69e7db253740a60 *i386-linux.elf/upx-3.95
b5d3bbd9c5f3d376be43c75a32374b022adfb6566feeef14d30420c819566082 *i386-win32.pe/upx-3.91.exe 264093035fbddf27a4e5c9d612ddc60fa7466c8b2254df56a28dded096afd438 *i386-win32.pe/upx-3.91.exe
aa9d18c47e60a814d383a6778cf26654a2bea6a097520e7177d3c546a1421159 *i386-win32.pe/upx-3.95.exe 159918923abe10dd3a63aaf5c1c5a6a048a4a97a278587ec9ba6f72aa12b8d45 *i386-win32.pe/upx-3.95.exe
4ea046a2c8be33ed14531e30ccbd3440b9569e68abd76932a8837abf4abba553 *m68k-atari.tos/upx-3.91.ttp 38262d29ae5c51b6dc18d6b992f041ee602b0b8c601003ef423e4f8693eb1ad0 *m68k-atari.tos/upx-3.91.ttp
eeb7ae0de5b423611989f948585a4fdb18926161927c8f99e137cb4ad5f464b0 *mips-linux.elf/upx-3.95 6c543e309067db3bbd45d219b0d7c9ebc0df9c5db851530877031edc8a8b62dc *mips-linux.elf/upx-3.95
5f4433586e45651bacd01bca156090f06fa48e95a78077cc93d1b6bc9965e8d5 *mipsel-linux.elf/upx-3.91 ba36e7b3566e666d3b381b8b52068a93525d411df7ef2ec8a8073c942c0a5d95 *mipsel-linux.elf/upx-3.91
d17b7488d441269f0427cf567fc6f5c43fbe32398860f0099d361b9d4672a2dc *mipsel-linux.elf/upx-3.95 ada7b5da780d7ee3c0e5339dcdebb1d2cf989f19b2b5728f10685563061291de *mipsel-linux.elf/upx-3.95
eca17f5f26c878c3f5ffee569ce5eb3af19127685ceb0bf7a419d13537e774a2 *powerpc-linux.elf/upx-3.91 efdd95af6a52c517ec00d0f16555ed3b1fe96ab3156219c58b62a1259585efd8 *powerpc-linux.elf/upx-3.91
2ea98117f051c4f05292e2c5b71e9a1252ab32fe2dbb03e4f1106c765913cc4f *powerpc-linux.elf/upx-3.95 adbb1cecaa29295f2c1433fc95d2a0c610b62a5d3fe153a59c6b908597771014 *powerpc-linux.elf/upx-3.95
fecfda8d1c58bfe2fe7a0d9d3806258129e449b25e5bf65418c364758c693e94 *powerpc64le-linux.elf/upx-3.95 6201d061df42316e2550e0848343b595708e75cebcc8cd03c272a5b0def610c1 *powerpc64le-linux.elf/upx-3.95
" "
########## end .sha256sums.recreate ########## end .sha256sums.recreate
+5 -3
View File
@@ -1,8 +1,8 @@
# see https://docs.github.com/en/actions/managing-issues-and-pull-requests/closing-inactive-issues # see https://docs.github.com/en/actions/managing-issues-and-pull-requests/closing-inactive-issues
# see https://github.com/actions/stale # see https://github.com/actions/stale
# Automatically closing issues is far from perfect, but then we only have # Automatically closing issues is far from perfect, but then we only
# limited resources and this approach favors issues that people # have limited resources and this approach favors issues that people
# actually care about. # actually care about.
# #
# also see: # also see:
@@ -25,7 +25,9 @@ jobs:
steps: steps:
- uses: actions/stale@v6 - uses: actions/stale@v6
with: with:
# operations-per-run: 300 operations-per-run: 300
exempt-all-milestones: true
exempt-issue-labels: 'blocker,enhancement'
days-before-stale: 60 days-before-stale: 60
days-before-close: 30 days-before-close: 30
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Please remove the stale label or add a comment or this issue will be closed in 30 days.' stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Please remove the stale label or add a comment or this issue will be closed in 30 days.'
+63 -25
View File
@@ -1,9 +1,11 @@
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
# config options # compilation config options
option(UPX_CONFIG_DISABLE_GITREV "Do not compile with default Git version info.") option(UPX_CONFIG_DISABLE_GITREV "Do not compile with default Git version info.")
option(UPX_CONFIG_DISABLE_SANITIZE "Do not compile with default sanitize options.") option(UPX_CONFIG_DISABLE_SANITIZE "Do not compile with default sanitize options.")
option(UPX_CONFIG_DISABLE_WERROR "Do not compile with default -Werror option.") option(UPX_CONFIG_DISABLE_WERROR "Do not compile with default -Werror option.")
# test config options
option(UPX_CONFIG_DISABLE_SELF_PACK_TEST "Do not test packing UPX with itself") # see below
#*********************************************************************** #***********************************************************************
# init # init
@@ -17,10 +19,13 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(",${CMAKE_SOURCE_DIR}," STREQUAL ",${CMAKE_BINARY_DIR},") if(",${CMAKE_SOURCE_DIR}," STREQUAL ",${CMAKE_BINARY_DIR},")
message(FATAL_ERROR "ERROR: In-source builds are not allowed, please use an extra build dir.") message(FATAL_ERROR "ERROR: In-source builds are not allowed, please use an extra build dir.")
endif() endif()
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# determine git revision # determine git revision
set(GITREV_SHORT "") set(GITREV_SHORT "")
set(GITREV_PLUS "") set(GITREV_PLUS "")
set(GIT_DESCRIBE "")
find_package(Git) find_package(Git)
if(GIT_FOUND AND NOT UPX_CONFIG_DISABLE_GITREV) if(GIT_FOUND AND NOT UPX_CONFIG_DISABLE_GITREV)
execute_process( execute_process(
@@ -39,17 +44,32 @@ if(GIT_FOUND AND NOT UPX_CONFIG_DISABLE_GITREV)
else() else()
set(GITREV_SHORT "") set(GITREV_SHORT "")
endif() endif()
execute_process(
RESULT_VARIABLE result
COMMAND "${GIT_EXECUTABLE}" describe --match "v*.*.*" --tags --dirty
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE GIT_DESCRIBE
)
if(GIT_DESCRIBE MATCHES "^v?([0-9]+\\.[0-9]+\\.[0-9]+)-([0-9]+)-g(.+)$")
set(GIT_DESCRIBE "${CMAKE_MATCH_1}-devel.${CMAKE_MATCH_2}+git-${CMAKE_MATCH_3}")
endif()
endif() endif()
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git") # extra check if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git") # extra check
set(GITREV_SHORT "") set(GITREV_SHORT "")
endif() endif()
if(GITREV_SHORT) if(GITREV_SHORT)
message(STATUS "UPX_VERSION_GITREV = \"${GITREV_SHORT}${GITREV_PLUS}\"") message(STATUS "UPX_VERSION_GITREV = \"${GITREV_SHORT}${GITREV_PLUS}\"")
if(GIT_DESCRIBE)
message(STATUS "UPX_VERSION_GIT_DESCRIBE = \"${GIT_DESCRIBE}\"")
endif()
elseif(UPX_CONFIG_DISABLE_GITREV)
message(STATUS "UPX_VERSION_GITREV: disabled")
else() else()
message(STATUS "UPX_VERSION_GITREV: not set") message(STATUS "UPX_VERSION_GITREV: not set")
endif() endif()
project(upx VERSION 4.0.0 LANGUAGES C CXX) project(upx VERSION 4.0.1 LANGUAGES C CXX)
# set default build type to "Release" # set default build type to "Release"
get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
@@ -83,6 +103,7 @@ set_property(TARGET upx_vendor_zlib PROPERTY C_STANDARD 11)
file(GLOB upx_SOURCES "src/*.cpp" "src/util/*.cpp") file(GLOB upx_SOURCES "src/*.cpp" "src/util/*.cpp")
list(SORT upx_SOURCES) list(SORT upx_SOURCES)
add_executable(upx ${upx_SOURCES}) add_executable(upx ${upx_SOURCES})
#target_compile_features(upx PRIVATE cxx_std_14)
set_property(TARGET upx PROPERTY CXX_STANDARD 14) set_property(TARGET upx PROPERTY CXX_STANDARD 14)
target_link_libraries(upx upx_vendor_ucl upx_vendor_zlib) target_link_libraries(upx upx_vendor_ucl upx_vendor_zlib)
@@ -118,8 +139,18 @@ else()
add_definitions(-fno-tree-vectorize) add_definitions(-fno-tree-vectorize)
endif() endif()
function(upx_sanitize_target t)
if(NOT UPX_CONFIG_DISABLE_SANITIZE AND NOT MSVC)
# default sanitizer for Debug builds
target_compile_options(${t} PRIVATE $<$<CONFIG:Debug>:-fsanitize=undefined -fsanitize-undefined-trap-on-error -fstack-protector-all>)
# default sanitizer for Release builds
target_compile_options(${t} PRIVATE $<$<CONFIG:Release>:-fstack-protector>)
endif()
endfunction()
set(t upx_vendor_ucl) set(t upx_vendor_ucl)
target_include_directories(${t} PRIVATE vendor/ucl/include vendor/ucl) target_include_directories(${t} PRIVATE vendor/ucl/include vendor/ucl)
upx_sanitize_target(${t})
if(MSVC) if(MSVC)
target_compile_options(${t} PRIVATE -J -W4 ${warn_WX}) target_compile_options(${t} PRIVATE -J -W4 ${warn_WX})
else() else()
@@ -127,6 +158,7 @@ else()
endif() endif()
set(t upx_vendor_zlib) set(t upx_vendor_zlib)
upx_sanitize_target(${t})
if(MSVC) if(MSVC)
target_compile_options(${t} PRIVATE -DHAVE_STDARG_H -DHAVE_VSNPRINTF -J -W3 ${warn_WX}) target_compile_options(${t} PRIVATE -DHAVE_STDARG_H -DHAVE_VSNPRINTF -J -W3 ${warn_WX})
else() else()
@@ -140,13 +172,11 @@ target_include_directories(${t} PRIVATE vendor)
target_compile_definitions(${t} PRIVATE $<$<CONFIG:Debug>:DEBUG=1>) target_compile_definitions(${t} PRIVATE $<$<CONFIG:Debug>:DEBUG=1>)
if(GITREV_SHORT) if(GITREV_SHORT)
target_compile_definitions(${t} PRIVATE UPX_VERSION_GITREV="${GITREV_SHORT}${GITREV_PLUS}") target_compile_definitions(${t} PRIVATE UPX_VERSION_GITREV="${GITREV_SHORT}${GITREV_PLUS}")
if(GIT_DESCRIBE)
target_compile_definitions(${t} PRIVATE UPX_VERSION_GIT_DESCRIBE="${GIT_DESCRIBE}")
endif()
endif() endif()
if(NOT UPX_CONFIG_DISABLE_SANITIZE AND NOT MSVC) upx_sanitize_target(${t})
# default sanitizer for Debug builds
target_compile_options(${t} PRIVATE $<$<CONFIG:Debug>:-fsanitize=undefined -fsanitize-undefined-trap-on-error -fstack-protector-all>)
# default sanitizer for Release builds
target_compile_options(${t} PRIVATE $<$<CONFIG:Release>:-fstack-protector>)
endif()
if(MSVC) if(MSVC)
target_compile_options(${t} PRIVATE -EHsc -J -W4 ${warn_WX}) target_compile_options(${t} PRIVATE -EHsc -J -W4 ${warn_WX})
else() else()
@@ -160,26 +190,34 @@ endif()
# "make test" # "make test"
#*********************************************************************** #***********************************************************************
include(CTest)
if(NOT CMAKE_CROSSCOMPILING) if(NOT CMAKE_CROSSCOMPILING)
include(CTest)
set(exe ${CMAKE_EXECUTABLE_SUFFIX})
set(upx_self_exe "$<TARGET_FILE:upx>")
add_test(NAME upx-test-cleanup COMMAND rm -f ./upx.packed${exe} ./upx.unpacked${exe})
add_test(NAME upx-version COMMAND upx --version) add_test(NAME upx-version COMMAND upx --version)
add_test(NAME upx-help COMMAND upx --help) add_test(NAME upx-help COMMAND upx --help)
add_test(NAME upx-self-pack COMMAND upx -3 ${upx_self_exe} -o upx.packed${exe})
add_test(NAME upx-list COMMAND upx -l upx.packed${exe})
add_test(NAME upx-fileinfo COMMAND upx --fileinfo upx.packed${exe})
add_test(NAME upx-test COMMAND upx -t upx.packed${exe})
add_test(NAME upx-unpack COMMAND upx -d upx.packed${exe} -o upx.unpacked${exe})
add_test(NAME upx-run-unpacked COMMAND ./upx.unpacked${exe} --version)
add_test(NAME upx-run-packed COMMAND ./upx.packed${exe} --version)
endif() endif()
if(NOT CMAKE_CROSSCOMPILING AND NOT UPX_CONFIG_DISABLE_SELF_PACK_TEST)
# TODO: could add some more explicit test programs; but then, the integrated # NOTE: these tests can only work if the host executable format is supported by UPX!
# "doctest" is quite convenient and already covers a number of basic function(upx_add_test)
# checks - and more complex cases better should be handled by an set(name ${ARGV0})
# external test suite. list(REMOVE_AT ARGV 0)
add_test(NAME ${name} COMMAND ${ARGV})
set_tests_properties(${name} PROPERTIES RUN_SERIAL TRUE) # run these tests sequentially
endfunction()
set(exe ${CMAKE_EXECUTABLE_SUFFIX})
set(upx_self_exe "$<TARGET_FILE:upx>")
set(fo "--force-overwrite")
upx_add_test(upx-self-pack upx -3 ${upx_self_exe} ${fo} -o upx-packed${exe})
upx_add_test(upx-self-pack-n2b upx -3 --nrv2b ${upx_self_exe} ${fo} -o upx-packed-n2b${exe})
upx_add_test(upx-self-pack-n2d upx -3 --nrv2d ${upx_self_exe} ${fo} -o upx-packed-n2d${exe})
upx_add_test(upx-self-pack-n2e upx -3 --nrv2e ${upx_self_exe} ${fo} -o upx-packed-n2e${exe})
upx_add_test(upx-self-pack-lzma upx -3 --lzma ${upx_self_exe} ${fo} -o upx-packed-lzma${exe})
upx_add_test(upx-list upx -l upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_test(upx-fileinfo upx --fileinfo upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_test(upx-test upx -t upx-packed${exe} upx-packed-n2b${exe} upx-packed-n2d${exe} upx-packed-n2e${exe} upx-packed-lzma${exe})
upx_add_test(upx-unpack upx -d upx-packed${exe} ${fo} -o upx-unpacked${exe})
upx_add_test(upx-run-unpacked ./upx-unpacked${exe} --version-short)
upx_add_test(upx-run-packed ./upx-packed${exe} --version-short)
endif()
#*********************************************************************** #***********************************************************************
# "make install" # "make install"
@@ -194,7 +232,7 @@ include(GNUInstallDirs)
if(DEFINED CMAKE_INSTALL_FULL_BINDIR) if(DEFINED CMAKE_INSTALL_FULL_BINDIR)
install(TARGETS upx DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}") install(TARGETS upx DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
install(FILES install(FILES
COPYING LICENSE NEWS README doc/upx-doc.html doc/upx-doc.txt COPYING LICENSE NEWS README THANKS doc/upx-doc.html doc/upx-doc.txt
DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}"
) )
install(FILES doc/upx.1 DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man1") install(FILES doc/upx.1 DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man1")
+6 -2
View File
@@ -36,7 +36,7 @@ __check_cache = $(if $(wildcard $1/CMakeCache.txt),@true,)
run_config = $(call __check_cache,$1) $(CMAKE) -S . -B $1 $(UPX_CMAKE_CONFIG_FLAGS) -DCMAKE_BUILD_TYPE=$2 run_config = $(call __check_cache,$1) $(CMAKE) -S . -B $1 $(UPX_CMAKE_CONFIG_FLAGS) -DCMAKE_BUILD_TYPE=$2
run_build = $(CMAKE) --build $1 $(UPX_CMAKE_BUILD_FLAGS) --config $2 run_build = $(CMAKE) --build $1 $(UPX_CMAKE_BUILD_FLAGS) --config $2
default: build/release .DEFAULT_GOAL = build/release
build/debug: PHONY build/debug: PHONY
$(call run_config,$@,Debug) $(call run_config,$@,Debug)
@@ -46,6 +46,10 @@ build/release: PHONY
$(call run_config,$@,Release) $(call run_config,$@,Release)
$(call run_build,$@,Release) $(call run_build,$@,Release)
# shortcuts
debug: build/debug
release: build/release
#*********************************************************************** #***********************************************************************
# some pre-defined build configurations # some pre-defined build configurations
#*********************************************************************** #***********************************************************************
@@ -82,4 +86,4 @@ build/release-cross-mingw64: PHONY
$(call run_config,$@,Release) $(call run_config,$@,Release)
$(call run_build,$@,Release) $(call run_build,$@,Release)
.PHONY: default PHONY .PHONY: PHONY
+4
View File
@@ -2,6 +2,9 @@
User visible changes for UPX User visible changes for UPX
================================================================== ==================================================================
Changes in 4.0.1 (16 Nov 2022):
* bug fixes - see https://github.com/upx/upx/milestone/8
Changes in 4.0.0 (28 Oct 2022): Changes in 4.0.0 (28 Oct 2022):
* Switch to semantic versioning * Switch to semantic versioning
* SECURITY NOTES: emphasize the security context in the docs * SECURITY NOTES: emphasize the security context in the docs
@@ -9,6 +12,7 @@ Changes in 4.0.0 (28 Oct 2022):
* Support easy rebuilding the stubs from source with Podman/Docker * Support easy rebuilding the stubs from source with Podman/Docker
* Add integrated doctest C++ testing framework * Add integrated doctest C++ testing framework
* Add support for EFI files (PE x86; Kornel Pal) * Add support for EFI files (PE x86; Kornel Pal)
* win32/pe and win64/pe: set correct SizeOfHeaders in the PE header
* bug fixes - see https://github.com/upx/upx/milestone/6 * bug fixes - see https://github.com/upx/upx/milestone/6
* bug fixes - see https://github.com/upx/upx/milestone/7 * bug fixes - see https://github.com/upx/upx/milestone/7
+24 -35
View File
@@ -1,21 +1,8 @@
# #
# UPX doc Makefile - needs GNU make # UPX doc Makefile - needs GNU make, pod2html, pod2man and pod2text
# #
MAKEFLAGS += -rR BUILT_SOURCES = upx.1 upx-doc.html upx-doc.txt
.SUFFIXES:
SHELL = /bin/sh
# internal make variables
comma := ,
empty :=
space := $(empty) $(empty)
tab := $(empty) $(empty)
# /***********************************************************************
# //
# ************************************************************************/
top_srcdir ?= .. top_srcdir ?= ..
@@ -23,28 +10,31 @@ PACKAGE = upx
VERSION_DATE := $(shell sed -n 's/^.*UPX_VERSION_DATE_ISO .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h) VERSION_DATE := $(shell sed -n 's/^.*UPX_VERSION_DATE_ISO .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h)
VERSION := $(shell sed -n 's/^.*UPX_VERSION_STRING .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h) VERSION := $(shell sed -n 's/^.*UPX_VERSION_STRING .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h)
# internal make variables
comma := ,
empty :=
space := $(empty) $(empty)
tab := $(empty) $(empty)
RTRIM := sed -e 's/[ $(tab)]*$$//' RTRIM := sed -e 's/[ $(tab)]*$$//'
DETAB2 := sed -e 's/$(tab)/ /g' DETAB2 := sed -e 's/$(tab)/ /g'
BUILT_SOURCES = upx.1 upx-doc.html upx-doc.txt #***********************************************************************
# targets
#***********************************************************************
.DEFAULT_GOAL = all
### all: $(BUILT_SOURCES) PHONY
### targets
###
all: $(BUILT_SOURCES) mostlyclean clean distclean maintainer-clean: PHONY
rm -f $(BUILT_SOURCES) ./pod2htm*
mostlyclean clean distclean maintainer-clean: #***********************************************************************
rm -f $(BUILT_SOURCES) pod2htm* # rules
#***********************************************************************
.PHONY: all mostlyclean clean distclean maintainer-clean
###
### rules
###
.SUFFIXES:
.SUFFIXES: .1 .html .man .pod .ps .tex .txt .SUFFIXES: .1 .html .man .pod .ps .tex .txt
%.1 : %.pod %.1 : %.pod
@@ -53,7 +43,7 @@ mostlyclean clean distclean maintainer-clean:
%-doc.html : %.pod %-doc.html : %.pod
pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@ pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@
@rm -f pod2htm* @rm -f ./pod2htm*
test -s $@ test -s $@
%.man : %.1 %.man : %.1
@@ -72,11 +62,10 @@ mostlyclean clean distclean maintainer-clean:
pod2text < $< | $(RTRIM) > $@ pod2text < $< | $(RTRIM) > $@
test -s $@ test -s $@
#***********************************************************************
### # dependencies
### dependencies #***********************************************************************
###
$(BUILT_SOURCES): $(top_srcdir)/src/version.h $(MAKEFILE_LIST) $(BUILT_SOURCES): $(top_srcdir)/src/version.h $(MAKEFILE_LIST)
.DELETE_ON_ERROR: $(BUILT_SOURCES) .DELETE_ON_ERROR: $(BUILT_SOURCES)
.PHONY: PHONY
+1 -1
View File
@@ -133,7 +133,7 @@
.\" ======================================================================== .\" ========================================================================
.\" .\"
.IX Title "UPX 1" .IX Title "UPX 1"
.TH UPX 1 "2022-10-28" "upx 4.0.0" " " .TH UPX 1 "2022-11-16" "upx 4.0.1" " "
.\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents. .\" way too many mistakes in technical documents.
.if n .ad l .if n .ad l
+17
View File
@@ -0,0 +1,17 @@
#! /usr/bin/env bash
## vim:set ts=4 sw=4 et:
set -e; set -o pipefail
argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")"
# create the image from Dockerfile
# using a rootless Podman container
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20210104-vX,
# so you have to create that image first
# WARNING: we install many packages, so the resulting image needs A LOT of disk space!
image=upx-cross-compile-20221108-v7
podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir"
podman image list "$image"
podman image tree "$image"
+40
View File
@@ -0,0 +1,40 @@
#! /usr/bin/env bash
## vim:set ts=4 sw=4 et:
set -e; set -o pipefail
argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")"
# run an interactive shell in the image
# using a rootless Podman container
image=upx-cross-compile-20221108-v7
flags=( -ti --read-only --rm )
flags+=( --cap-drop=all ) # drop all capabilities
flags+=( --network=none ) # no network needed
flags+=( -e TERM="$TERM" ) # pass $TERM
if [[ 1 == 1 ]]; then
# run as user upx 2000:2000
flags+=( --user 2000 )
# map container users 0..999 to subuid-users 1..1000, and map container user 2000 to current host user
flags+=( --uidmap=0:1:1000 --uidmap=2000:0:1 )
# map container groups 0..999 to subgid-groups 1..1000, and map container group 2000 to current host group
flags+=( --gidmap=0:1:1000 --gidmap=2000:0:1 )
# NOTE: we mount the upx top-level directory read-write under /home/upx/src/upx
# INFO: SELinux users *may* have to add ":z" to the volume mount flags; check the docs!
flags+=( -v "${argv0dir}/../..:/home/upx/src/upx" )
flags+=( -w /home/upx/src/upx ) # set working directory
else
# run as user root 0:0
# ONLY FOR DEBUGGING THE IMAGE
# map container user/group 0 to current host user/group
flags+=( --user 0 )
fi
podman run "${flags[@]}" "$image" bash -l
# now we can cross-compile UPX for Windows:
# cd /home/upx/src/upx
# rm -rf ./build/release-cross-mingw64
# make build/release-cross-mingw64
# lots of other cross-compilers are installed; see "ls /usr/bin/*g++*"
@@ -0,0 +1,47 @@
# NOTE: this image is based on rebuild-stubs-with-upx/upx-stubtools-20210104-vX,
# so you have to create that image first
# WARNING: we install many packages, so the resulting image needs A LOT of disk space!
FROM localhost/upx-stubtools-20210104-v7
ARG DEBIAN_FRONTEND=noninteractive
USER root
# Ubuntu 22.04
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y \
# Linux cross compilers
g++-aarch64-linux-gnu \
g++-alpha-linux-gnu \
g++-arm-linux-gnueabi \
g++-arm-linux-gnueabihf \
g++-hppa-linux-gnu \
g++-i686-linux-gnu \
g++-m68k-linux-gnu \
g++-mips-linux-gnu \
g++-mipsel-linux-gnu \
g++-mips64-linux-gnuabi64 \
g++-mips64el-linux-gnuabi64 \
g++-powerpc-linux-gnu \
g++-powerpc64-linux-gnu \
g++-powerpc64le-linux-gnu \
g++-riscv64-linux-gnu \
g++-s390x-linux-gnu \
g++-sh4-linux-gnu \
g++-sparc64-linux-gnu \
# Linux cross compilers - ILP32 on 64-bit CPUs
g++-x86-64-linux-gnux32 \
# Windows cross compilers
g++-mingw-w64-i686 \
g++-mingw-w64-x86-64 \
&& true
RUN apt-get install -y \
# clang-14 and tools
clang-14 clang-format-14 clang-tidy-14 clang-tools-14 lldb-14 llvm-14 \
# QEMU and Wine
qemu-system qemu-user wine wine32 \
# misc
gdb lsb-release valgrind \
&& true
# switch back to default user upx 2000:2000
USER upx
@@ -6,7 +6,7 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")"
# create the image from Dockerfile # create the image from Dockerfile
# using a rootless Podman container # using a rootless Podman container
image=upx-stubtools-20210104-v5 image=upx-stubtools-20210104-v7
podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir" podman build -t "$image" -f "$argv0dir/Dockerfile" "$argv0dir"
@@ -6,7 +6,7 @@ argv0=$0; argv0abs="$(readlink -fn "$argv0")"; argv0dir="$(dirname "$argv0abs")"
# run an interactive shell in the image # run an interactive shell in the image
# using a rootless Podman container # using a rootless Podman container
image=upx-stubtools-20210104-v5 image=upx-stubtools-20210104-v7
flags=( -ti --read-only --rm ) flags=( -ti --read-only --rm )
flags+=( --cap-drop=all ) # drop all capabilities flags+=( --cap-drop=all ) # drop all capabilities
@@ -15,14 +15,14 @@ flags+=( -e TERM="$TERM" ) # pass $TERM
if [[ 1 == 1 ]]; then if [[ 1 == 1 ]]; then
# run as user upx 2000:2000 # run as user upx 2000:2000
flags+=( --user 2000 ) flags+=( --user 2000 )
# map container user 0 to subuid-user 1, and map container user 2000 to current host user # map container users 0..999 to subuid-users 1..1000, and map container user 2000 to current host user
flags+=( --uidmap=0:1:1 --uidmap=2000:0:1 ) flags+=( --uidmap=0:1:1000 --uidmap=2000:0:1 )
# map container group 0 to subgid-group 1, and map container group 2000 to current host group # map container groups 0..999 to subgid-groups 1..1000, and map container group 2000 to current host group
flags+=( --gidmap=0:1:1 --gidmap=2000:0:1 ) flags+=( --gidmap=0:1:1000 --gidmap=2000:0:1 )
# NOTE: we mount the upx top-level directory read-write under /home/upx/src/upx # NOTE: we mount the upx top-level directory read-write under /home/upx/src/upx
# INFO: SELinux users *may* have to add ":z" to the volume mount flags; check the docs! # INFO: SELinux users *may* have to add ":z" to the volume mount flags; check the docs!
flags+=( -v "${argv0dir}/../..:/home/upx/src/upx" ) flags+=( -v "${argv0dir}/../..:/home/upx/src/upx" )
flags+=( -w /home/upx/src/upx ) # working directory flags+=( -w /home/upx/src/upx ) # set working directory
else else
# run as user root 0:0 # run as user root 0:0
# ONLY FOR DEBUGGING THE IMAGE # ONLY FOR DEBUGGING THE IMAGE
@@ -44,3 +44,17 @@ podman run "${flags[@]}" "$image" bash -l
# # make sure that the stub files did rebuild correctly: # # make sure that the stub files did rebuild correctly:
# git status . # git status .
# git diff . # git diff .
# we can also build UPX in the container:
# cd /home/upx/src/upx
# rm -rf ./build/release
# make build/release
# # run tests
# ./build/release/upx --version
# make -C build/release test
# and we can also rebuild the UPX docs the container:
# cd /home/upx/src/upx
# make -C doc clean all
# git status doc
# git diff doc
+9 -7
View File
@@ -9,14 +9,14 @@ RUN dpkg --add-architecture i386 \
aria2 ca-certificates git less libmpc3 libncurses5 make \ aria2 ca-certificates git less libmpc3 libncurses5 make \
ncurses-term perl-base python2-minimal wget xz-utils \ ncurses-term perl-base python2-minimal wget xz-utils \
libc6:i386 zlib1g:i386 \ libc6:i386 zlib1g:i386 \
# the following packages are not required for rebuilding the stubs, # the following packages are not required for rebuilding the stubs, but
# but they do make the image more convenient and also allow building # they do make the image much more convenient and also allow building
# the full UPX binary inside the container via CMake: # the full UPX binary inside the container via CMake:
bzip2 cmake elfutils file g++ libzstd-dev lzop ninja-build patch \ 7zip bzip2 cmake elfutils file g++ htop libzstd-dev lzip lzop ninja-build \
patchelf pax-utils rsync unzip vim zip zlib1g-dev zsh zstd \ p7zip patch patchelf pax-utils rsync unzip vim zip zlib1g-dev zsh zstd \
&& true && true
# manually install compat libs from Ubuntu 16.04 # manually install compat libs from Ubuntu 16.04; REQUIRED
RUN cd /root \ RUN cd /root \
&& aria2c --checksum=sha-256=2605f43f8047fc972855bb909f1dd7af761bbfd35ae559ad689b0d55a4236d69 \ && aria2c --checksum=sha-256=2605f43f8047fc972855bb909f1dd7af761bbfd35ae559ad689b0d55a4236d69 \
'http://mirror.enzu.com/ubuntu/pool/main/g/gmp/libgmp10_6.1.0+dfsg-2_amd64.deb' \ 'http://mirror.enzu.com/ubuntu/pool/main/g/gmp/libgmp10_6.1.0+dfsg-2_amd64.deb' \
@@ -29,7 +29,7 @@ RUN cd /root \
&& ldconfig \ && ldconfig \
&& true && true
# install upx-stubtools into /usr/local/bin/bin-upx-20210104 # install upx-stubtools into /usr/local/bin/bin-upx-20210104; REQUIRED
RUN cd /root \ RUN cd /root \
&& aria2c --checksum=sha-256=abcd8337cc656fe68d7bbb2ffe0f1e5ddce618688aa0e18c1ebcc40072843884 \ && aria2c --checksum=sha-256=abcd8337cc656fe68d7bbb2ffe0f1e5ddce618688aa0e18c1ebcc40072843884 \
'https://github.com/upx/upx-stubtools/releases/download/v20210104/bin-upx-20210104.tar.xz' \ 'https://github.com/upx/upx-stubtools/releases/download/v20210104/bin-upx-20210104.tar.xz' \
@@ -38,7 +38,7 @@ RUN cd /root \
&& rm /root/bin-upx-20210104.tar.xz \ && rm /root/bin-upx-20210104.tar.xz \
&& true && true
# install previous UPX versions into /usr/local/bin # install pre-built binary UPX versions into /usr/local/bin; not required but convenient for testing
RUN cd /root \ RUN cd /root \
&& wget -q https://github.com/upx/upx/releases/download/v3.91/upx-3.91-amd64_linux.tar.bz2 \ && wget -q https://github.com/upx/upx/releases/download/v3.91/upx-3.91-amd64_linux.tar.bz2 \
&& wget -q https://github.com/upx/upx/releases/download/v3.92/upx-3.92-amd64_linux.tar.xz \ && wget -q https://github.com/upx/upx/releases/download/v3.92/upx-3.92-amd64_linux.tar.xz \
@@ -46,6 +46,7 @@ RUN cd /root \
&& wget -q https://github.com/upx/upx/releases/download/v3.94/upx-3.94-amd64_linux.tar.xz \ && wget -q https://github.com/upx/upx/releases/download/v3.94/upx-3.94-amd64_linux.tar.xz \
&& wget -q https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz \ && wget -q https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz \
&& wget -q https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz \ && wget -q https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz \
&& wget -q https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-amd64_linux.tar.xz \
&& for f in ./upx-*.tar.*; do tar -xoaf $f; done \ && for f in ./upx-*.tar.*; do tar -xoaf $f; done \
&& rm ./upx-*.tar.* \ && rm ./upx-*.tar.* \
&& d=upx-3.91-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.91 \ && d=upx-3.91-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.91 \
@@ -54,6 +55,7 @@ RUN cd /root \
&& d=upx-3.94-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.94 \ && d=upx-3.94-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.94 \
&& d=upx-3.95-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.95 \ && d=upx-3.95-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.95 \
&& d=upx-3.96-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.96 \ && d=upx-3.96-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-3.96 \
&& d=upx-4.0.0-amd64_linux; ./$d/upx -d $d/upx -o /usr/local/bin/upx-4.0.0 \
&& rm -rf ./upx-*linux \ && rm -rf ./upx-*linux \
&& true && true
+15 -15
View File
@@ -21,19 +21,21 @@ endif
# redirect to top-level CMake build # redirect to top-level CMake build
# #
default: debug .DEFAULT_GOAL = build/debug
all: debug release
debug: $(top_srcdir)/build/debug/upx
release: $(top_srcdir)/build/release/upx
$(top_srcdir)/build/debug/upx: build/debug: $(top_srcdir)/build/debug/upx
build/release: $(top_srcdir)/build/release/upx
# shortcuts
all: build/debug build/release
debug: build/debug
release: build/release
$(top_srcdir)/build/debug/upx: PHONY
$(MAKE) -C $(top_srcdir) build/debug $(MAKE) -C $(top_srcdir) build/debug
$(top_srcdir)/build/release/upx: $(top_srcdir)/build/release/upx: PHONY
$(MAKE) -C $(top_srcdir) build/release $(MAKE) -C $(top_srcdir) build/release
.PHONY: default all debug release .PHONY: PHONY
.PHONY: $(top_srcdir)/build/debug/upx
.PHONY: $(top_srcdir)/build/release/upx
# #
# "make run-testsuite" # "make run-testsuite"
@@ -60,9 +62,8 @@ ifneq ($(wildcard $(top_srcdir)/.github/travis_testsuite_1.sh),)
run-testsuite: export upx_exe := $(top_srcdir)/build/release/upx run-testsuite: export upx_exe := $(top_srcdir)/build/release/upx
run-testsuite: export upx_testsuite_SRCDIR := $(upx_testsuite_SRCDIR) run-testsuite: export upx_testsuite_SRCDIR := $(upx_testsuite_SRCDIR)
run-testsuite: export upx_testsuite_BUILDDIR := ./tmp-testsuite run-testsuite: export upx_testsuite_BUILDDIR := ./tmp-testsuite
run-testsuite: $(top_srcdir)/build/release/upx run-testsuite: $(top_srcdir)/build/release/upx PHONY
time -p bash $(top_srcdir)/.github/travis_testsuite_1.sh time -p bash $(top_srcdir)/.github/travis_testsuite_1.sh
.PHONY: run-testsuite
endif endif
endif endif
@@ -73,6 +74,7 @@ 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 += bele.h bele_policy.h CLANG_FORMAT_FILES += bele.h bele_policy.h
CLANG_FORMAT_FILES += compress_lzma.cpp compress_ucl.cpp compress_zlib.cpp
CLANG_FORMAT_FILES += except.cpp except.h CLANG_FORMAT_FILES += except.cpp except.h
CLANG_FORMAT_FILES += file.cpp file.h CLANG_FORMAT_FILES += file.cpp file.h
CLANG_FORMAT_FILES += linker.cpp linker.h packhead.cpp packmast.cpp packmast.h CLANG_FORMAT_FILES += linker.cpp linker.h packhead.cpp packmast.cpp packmast.h
@@ -81,9 +83,8 @@ CLANG_FORMAT_FILES += p_tos.cpp p_tos.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 += ui.cpp ui.h work.cpp CLANG_FORMAT_FILES += ui.cpp ui.h work.cpp
CLANG_FORMAT_FILES += $(wildcard util/[a-ln-z]*.[ch]* util/mem*.[ch]*) CLANG_FORMAT_FILES += $(wildcard util/[a-ln-z]*.[ch]* util/mem*.[ch]*)
clang-format: clang-format: PHONY
$(top_srcdir)/misc/scripts/upx-clang-format -i $(addprefix $(top_srcdir)/src/,$(sort $(CLANG_FORMAT_FILES))) $(top_srcdir)/misc/scripts/upx-clang-format -i $(addprefix $(top_srcdir)/src/,$(sort $(CLANG_FORMAT_FILES)))
.PHONY: clang-format
endif endif
# #
@@ -96,8 +97,7 @@ CHECK_WHITESPACE = $(top_srcdir)/misc/scripts/check_whitespace.sh $(top_srcdir)
ifneq ($(wildcard $(top_srcdir)/.git/.),) ifneq ($(wildcard $(top_srcdir)/.git/.),)
CHECK_WHITESPACE = $(top_srcdir)/misc/scripts/check_whitespace_git.sh $(top_srcdir) CHECK_WHITESPACE = $(top_srcdir)/misc/scripts/check_whitespace_git.sh $(top_srcdir)
endif endif
check-whitespace : ; $(CHECK_WHITESPACE) check-whitespace : PHONY ; $(CHECK_WHITESPACE)
endif endif
.PHONY: check-whitespace
# vim:set ts=8 sw=8 noet: # vim:set ts=8 sw=8 noet:
+145 -133
View File
@@ -25,30 +25,24 @@
<markus@oberhumer.com> <ezerotven+github@gmail.com> <markus@oberhumer.com> <ezerotven+github@gmail.com>
*/ */
#include "conf.h" #include "conf.h"
#include "compress.h" #include "compress.h"
#include "util/membuffer.h" #include "util/membuffer.h"
#if (ACC_CC_CLANG) #if (ACC_CC_CLANG)
# pragma clang diagnostic ignored "-Wshadow" #pragma clang diagnostic ignored "-Wshadow"
#endif #endif
#if (ACC_CC_GNUC >= 0x040200) #if (ACC_CC_GNUC >= 0x040200)
# pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wshadow"
#endif #endif
#if (ACC_CC_MSC) #if (ACC_CC_MSC)
# pragma warning(disable: 4456) // -Wno-shadow #pragma warning(disable : 4456) // -Wno-shadow
#endif #endif
#if (ACC_CC_MSC && (_MSC_VER < 1900)) #if (ACC_CC_MSC && (_MSC_VER < 1900))
# pragma warning(disable: 4127) // warning C4127: conditional expression is constant #pragma warning(disable : 4127) // warning C4127: conditional expression is constant
#endif
#if (ACC_CC_INTELC_GNUC)
# pragma warning(error: 424) // #424: extra ";" ignored
#endif #endif
void lzma_compress_config_t::reset() {
void lzma_compress_config_t::reset()
{
pos_bits.reset(); pos_bits.reset();
lit_pos_bits.reset(); lit_pos_bits.reset();
lit_context_bits.reset(); lit_context_bits.reset();
@@ -60,7 +54,6 @@ void lzma_compress_config_t::reset()
max_num_probs = 0; max_num_probs = 0;
} }
// INFO: the LZMA SDK is covered by a permissive license which allows // INFO: the LZMA SDK is covered by a permissive license which allows
// using unmodified LZMA source code in UPX and the UPX stubs. // using unmodified LZMA source code in UPX and the UPX stubs.
// See SPECIAL EXCEPTION below. // See SPECIAL EXCEPTION below.
@@ -97,21 +90,18 @@ void lzma_compress_config_t::reset()
// SPECIAL EXCEPTION allows you to use LZMA SDK in applications with closed code, // SPECIAL EXCEPTION allows you to use LZMA SDK in applications with closed code,
// while you keep LZMA SDK code unmodified. // while you keep LZMA SDK code unmodified.
/************************************************************************* /*************************************************************************
// compress defaults // compress defaults
**************************************************************************/ **************************************************************************/
static int prepare(lzma_compress_result_t *res, static bool prepare_result(lzma_compress_result_t *res, unsigned src_len, int method, int level,
unsigned src_len, int method, int level, const lzma_compress_config_t *lcconf) {
const lzma_compress_config_t *lcconf)
{
// setup defaults // setup defaults
res->pos_bits = 2; // 0 .. 4 res->pos_bits = 2; // 0 .. 4
res->lit_pos_bits = 0; // 0 .. 4 res->lit_pos_bits = 0; // 0 .. 4
res->lit_context_bits = 3; // 0 .. 8 res->lit_context_bits = 3; // 0 .. 8
res->dict_size = 4 * 1024 * 1024; // 1 .. 2**30 res->dict_size = 4 * 1024 * 1024; // 1 .. 2**30
res->fast_mode = 2; res->fast_mode = 2; // 0 .. 2
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
@@ -135,8 +125,7 @@ static int prepare(lzma_compress_result_t *res,
#endif #endif
// TODO: tune these settings according to level // TODO: tune these settings according to level
switch (level) switch (level) {
{
case 1: case 1:
res->dict_size = 256 * 1024; res->dict_size = 256 * 1024;
res->fast_mode = 0; res->fast_mode = 0;
@@ -169,8 +158,7 @@ static int prepare(lzma_compress_result_t *res,
} }
// cconf overrides // cconf overrides
if (lcconf) if (lcconf) {
{
oassign(res->pos_bits, lcconf->pos_bits); oassign(res->pos_bits, lcconf->pos_bits);
oassign(res->lit_pos_bits, lcconf->lit_pos_bits); oassign(res->lit_pos_bits, lcconf->lit_pos_bits);
oassign(res->lit_context_bits, lcconf->lit_context_bits); oassign(res->lit_context_bits, lcconf->lit_context_bits);
@@ -183,21 +171,16 @@ static int prepare(lzma_compress_result_t *res,
res->dict_size = src_len; res->dict_size = src_len;
// limit num_probs // limit num_probs
if (lcconf && lcconf->max_num_probs) if (lcconf && lcconf->max_num_probs) {
{ for (;;) {
for (;;)
{
unsigned n = 1846 + (768u << (res->lit_context_bits + res->lit_pos_bits)); unsigned n = 1846 + (768u << (res->lit_context_bits + res->lit_pos_bits));
if (n <= lcconf->max_num_probs) if (n <= lcconf->max_num_probs)
break; break;
if (res->lit_pos_bits > res->lit_context_bits) if (res->lit_pos_bits > res->lit_context_bits) {
{
if (res->lit_pos_bits == 0) if (res->lit_pos_bits == 0)
goto error; goto error;
res->lit_pos_bits -= 1; res->lit_pos_bits -= 1;
} } else {
else
{
if (res->lit_context_bits == 0) if (res->lit_context_bits == 0)
goto error; goto error;
res->lit_context_bits -= 1; res->lit_context_bits -= 1;
@@ -212,14 +195,14 @@ static int prepare(lzma_compress_result_t *res,
lzma_compress_config_t::num_fast_bytes_t::assertValue(res->num_fast_bytes); lzma_compress_config_t::num_fast_bytes_t::assertValue(res->num_fast_bytes);
res->num_probs = 1846 + (768u << (res->lit_context_bits + res->lit_pos_bits)); res->num_probs = 1846 + (768u << (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,
return 0; // res->lit_context_bits, res->dict_size, res->num_probs);
return true;
error: error:
return -1; return false;
} }
/************************************************************************* /*************************************************************************
// compress - cruft because of pseudo-COM layer // compress - cruft because of pseudo-COM layer
**************************************************************************/ **************************************************************************/
@@ -238,69 +221,80 @@ error:
namespace MyLzma { namespace MyLzma {
struct InStream: public ISequentialInStream, public CMyUnknownImp struct InStream final : public ISequentialInStream, public CMyUnknownImp {
{ virtual ~InStream() {}
virtual ~InStream() { }
MY_UNKNOWN_IMP MY_UNKNOWN_IMP
const Byte *b_buf; size_t b_size; size_t b_pos; const Byte *b_buf = nullptr;
size_t b_size;
size_t b_pos;
void Init(const Byte *data, size_t size) { void Init(const Byte *data, size_t size) {
b_buf = data; b_size = size; b_pos = 0; b_buf = data;
b_size = size;
b_pos = 0;
} }
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) override; STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) override;
}; };
STDMETHODIMP InStream::Read(void *data, UInt32 size, UInt32 *processedSize) STDMETHODIMP InStream::Read(void *data, UInt32 size, UInt32 *processedSize) {
{
size_t remain = b_size - b_pos; size_t remain = b_size - b_pos;
if (size > remain) size = (UInt32) remain; if (size > remain)
size = (UInt32) remain;
memmove(data, b_buf + b_pos, size); memmove(data, b_buf + b_pos, size);
b_pos += size; b_pos += size;
if (processedSize != nullptr) *processedSize = size; if (processedSize != nullptr)
*processedSize = size;
return S_OK; return S_OK;
} }
struct OutStream : public ISequentialOutStream, public CMyUnknownImp struct OutStream final : public ISequentialOutStream, public CMyUnknownImp {
{ virtual ~OutStream() {}
virtual ~OutStream() { }
MY_UNKNOWN_IMP MY_UNKNOWN_IMP
Byte *b_buf; size_t b_size; size_t b_pos; bool overflow; Byte *b_buf = nullptr;
size_t b_size;
size_t b_pos;
bool overflow;
void Init(Byte *data, size_t size) { void Init(Byte *data, size_t size) {
b_buf = data; b_size = size; b_pos = 0; overflow = false; b_buf = data;
b_size = size;
b_pos = 0;
overflow = false;
} }
HRESULT WriteByte(Byte c) { HRESULT WriteByte(Byte c) {
if (b_pos >= b_size) { overflow = true; return E_FAIL; } if (b_pos >= b_size) {
overflow = true;
return E_FAIL;
}
b_buf[b_pos++] = c; b_buf[b_pos++] = c;
return S_OK; return S_OK;
} }
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) override; STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) override;
}; };
STDMETHODIMP OutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) STDMETHODIMP OutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) {
{
size_t remain = b_size - b_pos; size_t remain = b_size - b_pos;
if (size > remain) size = (UInt32) remain, overflow = true; if (size > remain)
size = (UInt32) remain, overflow = true;
memmove(b_buf + b_pos, data, size); memmove(b_buf + b_pos, data, size);
b_pos += size; b_pos += size;
if (processedSize != nullptr) *processedSize = size; if (processedSize != nullptr)
*processedSize = size;
return overflow ? E_FAIL : S_OK; return overflow ? E_FAIL : S_OK;
} }
struct ProgressInfo : public ICompressProgressInfo, public CMyUnknownImp struct ProgressInfo final : public ICompressProgressInfo, public CMyUnknownImp {
{ virtual ~ProgressInfo() {}
virtual ~ProgressInfo() { }
MY_UNKNOWN_IMP MY_UNKNOWN_IMP
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) override; STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) override;
upx_callback_p cb; upx_callback_p cb = nullptr;
}; };
STDMETHODIMP ProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) STDMETHODIMP ProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) {
{
if (cb && cb->nprogress) if (cb && cb->nprogress)
cb->nprogress(cb, (unsigned) *inSize, (unsigned) *outSize); cb->nprogress(cb, (unsigned) *inSize, (unsigned) *outSize);
return S_OK; return S_OK;
} }
} // namespace } // namespace MyLzma
#include <lzma-sdk/C/Common/Alloc.cpp> #include <lzma-sdk/C/Common/Alloc.cpp>
#include <lzma-sdk/C/Common/CRC.cpp> #include <lzma-sdk/C/Common/CRC.cpp>
@@ -314,29 +308,27 @@ STDMETHODIMP ProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outS
#include <lzma-sdk/C/7zip/Compress/RangeCoder/RangeCoderBit.cpp> #include <lzma-sdk/C/7zip/Compress/RangeCoder/RangeCoderBit.cpp>
#undef RC_NORMALIZE #undef RC_NORMALIZE
int upx_lzma_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
int upx_lzma_compress ( const upx_bytep src, unsigned src_len, upx_callback_p cb, int method, int level,
upx_bytep dst, unsigned* dst_len, const upx_compress_config_t *cconf_parm, upx_compress_result_t *cresult) {
upx_callback_p cb,
int method, int level,
const upx_compress_config_t *cconf_parm,
upx_compress_result_t *cresult )
{
assert(M_IS_LZMA(method)); assert(M_IS_LZMA(method));
assert(level > 0); assert(cresult != nullptr); assert(level > 0);
assert(cresult != nullptr);
int r = UPX_E_ERROR; int r = UPX_E_ERROR;
HRESULT rh; HRESULT rh;
const lzma_compress_config_t *lcconf = cconf_parm ? &cconf_parm->conf_lzma : nullptr; const lzma_compress_config_t *const lcconf = cconf_parm ? &cconf_parm->conf_lzma : nullptr;
lzma_compress_result_t *res = &cresult->result_lzma; lzma_compress_result_t *const res = &cresult->result_lzma;
MyLzma::InStream is; is.AddRef(); MyLzma::InStream is;
MyLzma::OutStream os; os.AddRef(); is.AddRef();
is.Init(src, src_len); is.Init(src, src_len);
MyLzma::OutStream os;
os.AddRef();
os.Init(dst, *dst_len); os.Init(dst, *dst_len);
MyLzma::ProgressInfo progress;
MyLzma::ProgressInfo progress; progress.AddRef(); progress.AddRef();
progress.cb = cb; progress.cb = cb; // progress.Init()
NCompress::NLZMA::CEncoder enc; NCompress::NLZMA::CEncoder enc;
const PROPID propIDs[8] = { const PROPID propIDs[8] = {
@@ -351,13 +343,10 @@ int upx_lzma_compress ( const upx_bytep src, unsigned src_len,
}; };
PROPVARIANT pr[8]; PROPVARIANT pr[8];
const unsigned nprops = 8; const unsigned nprops = 8;
static const wchar_t matchfinder[] = L"BT4"; if (!prepare_result(res, src_len, method, level, lcconf))
assert(NCompress::NLZMA::FindMatchFinder(matchfinder) >= 0);
pr[7].vt = VT_BSTR; pr[7].bstrVal = ACC_PCAST(BSTR, ACC_UNCONST_CAST(wchar_t *, matchfinder));
pr[0].vt = pr[1].vt = pr[2].vt = pr[3].vt = VT_UI4;
pr[4].vt = pr[5].vt = pr[6].vt = VT_UI4;
if (prepare(res, src_len, method, level, lcconf) != 0)
goto error; goto error;
pr[0].vt = pr[1].vt = pr[2].vt = pr[3].vt = pr[4].vt = pr[5].vt = pr[6].vt = VT_UI4;
pr[7].vt = VT_BSTR;
pr[0].uintVal = res->pos_bits; pr[0].uintVal = res->pos_bits;
pr[1].uintVal = res->lit_pos_bits; pr[1].uintVal = res->lit_pos_bits;
pr[2].uintVal = res->lit_context_bits; pr[2].uintVal = res->lit_context_bits;
@@ -365,25 +354,31 @@ int upx_lzma_compress ( const upx_bytep src, unsigned src_len,
pr[4].uintVal = res->fast_mode; pr[4].uintVal = res->fast_mode;
pr[5].uintVal = res->num_fast_bytes; pr[5].uintVal = res->num_fast_bytes;
pr[6].uintVal = res->match_finder_cycles; pr[6].uintVal = res->match_finder_cycles;
static const wchar_t matchfinder[] = L"BT4";
assert(NCompress::NLZMA::FindMatchFinder(matchfinder) >= 0);
pr[7].bstrVal = ACC_PCAST(BSTR, ACC_UNCONST_CAST(wchar_t *, matchfinder));
try { try {
if (enc.SetCoderProperties(propIDs, pr, nprops) != S_OK) if (enc.SetCoderProperties(propIDs, pr, nprops) != S_OK)
goto error; goto error;
// encode properties in LZMA-style (5 bytes)
if (enc.WriteCoderProperties(&os) != S_OK) if (enc.WriteCoderProperties(&os) != S_OK)
goto error; goto error;
if (os.overflow) { if (os.overflow) {
//r = UPX_E_OUTPUT_OVERRUN; // r = UPX_E_OUTPUT_OVERRUN;
r = UPX_E_NOT_COMPRESSIBLE; r = UPX_E_NOT_COMPRESSIBLE;
goto error; goto error;
} }
assert(os.b_pos == 5); assert(os.b_pos == 5);
// reset and encode properties in UPX-style (2 bytes)
os.b_pos = 0; os.b_pos = 0;
// extra stuff in first byte: 5 high bits convenience for stub decompressor // UPX extra stuff in first byte: 5 high bits convenience for stub decompressor
unsigned t = res->lit_context_bits + res->lit_pos_bits; unsigned t = res->lit_context_bits + res->lit_pos_bits;
os.WriteByte(Byte((t << 3) | res->pos_bits)); os.WriteByte(Byte((t << 3) | res->pos_bits));
os.WriteByte(Byte((res->lit_pos_bits << 4) | (res->lit_context_bits))); os.WriteByte(Byte((res->lit_pos_bits << 4) | (res->lit_context_bits)));
// compress
rh = enc.Code(&is, &os, nullptr, nullptr, &progress); rh = enc.Code(&is, &os, nullptr, nullptr, &progress);
} catch (...) { } catch (...) {
@@ -394,26 +389,24 @@ int upx_lzma_compress ( const upx_bytep src, unsigned src_len,
assert(os.b_pos <= *dst_len); assert(os.b_pos <= *dst_len);
if (rh == E_OUTOFMEMORY) if (rh == E_OUTOFMEMORY)
r = UPX_E_OUT_OF_MEMORY; r = UPX_E_OUT_OF_MEMORY;
else if (os.overflow) else if (os.overflow) {
{
assert(os.b_pos == *dst_len); assert(os.b_pos == *dst_len);
//r = UPX_E_OUTPUT_OVERRUN; // r = UPX_E_OUTPUT_OVERRUN;
r = UPX_E_NOT_COMPRESSIBLE; r = UPX_E_NOT_COMPRESSIBLE;
} } else if (rh == S_OK) {
else if (rh == S_OK)
{
assert(is.b_pos == src_len); assert(is.b_pos == src_len);
r = UPX_E_OK; r = UPX_E_OK;
} }
error: error:
*dst_len = (unsigned) os.b_pos; *dst_len = (unsigned) os.b_pos;
//printf("\nlzma_compress: %d: %u %u %u %u %u, %u - > %u\n", r, res->pos_bits, res->lit_pos_bits, res->lit_context_bits, res->dict_size, res->num_probs, src_len, *dst_len); // printf("\nlzma_compress: %d: %u %u %u %u %u, %u - > %u\n", r, res->pos_bits,
//printf("%u %u %u\n", is.__m_RefCount, os.__m_RefCount, progress.__m_RefCount); // res->lit_pos_bits,
// res->lit_context_bits, res->dict_size, res->num_probs, src_len, *dst_len);
// printf("%u %u %u\n", is.__m_RefCount, os.__m_RefCount, progress.__m_RefCount);
return r; return r;
} }
/************************************************************************* /*************************************************************************
// decompress // decompress
**************************************************************************/ **************************************************************************/
@@ -425,60 +418,67 @@ error:
#include <lzma-sdk/C/7zip/Compress/LZMA_C/LzmaDecode.h> #include <lzma-sdk/C/7zip/Compress/LZMA_C/LzmaDecode.h>
#include <lzma-sdk/C/7zip/Compress/LZMA_C/LzmaDecode.c> #include <lzma-sdk/C/7zip/Compress/LZMA_C/LzmaDecode.c>
int upx_lzma_decompress ( const upx_bytep src, unsigned src_len, int upx_lzma_decompress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_bytep dst, unsigned* dst_len, int method, const upx_compress_result_t *cresult) {
int method,
const upx_compress_result_t *cresult )
{
assert(M_IS_LZMA(method)); assert(M_IS_LZMA(method));
// see res->num_probs above // see res->num_probs above
COMPILE_TIME_ASSERT(sizeof(CProb) == 2) COMPILE_TIME_ASSERT(sizeof(CProb) == 2)
COMPILE_TIME_ASSERT(LZMA_BASE_SIZE == 1846) COMPILE_TIME_ASSERT(LZMA_BASE_SIZE == 1846)
COMPILE_TIME_ASSERT(LZMA_LIT_SIZE == 768) COMPILE_TIME_ASSERT(LZMA_LIT_SIZE == 768)
CLzmaDecoderState s; memset(&s, 0, sizeof(s)); CLzmaDecoderState s;
memset(&s, 0, sizeof(s));
SizeT src_out = 0, dst_out = 0; SizeT src_out = 0, dst_out = 0;
int r = UPX_E_ERROR; int r = UPX_E_ERROR;
int rh; int rh;
if (src_len < 3) // decode UPX-style properties (2 bytes)
if (src_len < 3) {
r = UPX_E_INPUT_OVERRUN;
goto error; goto error;
}
s.Properties.pb = src[0] & 7; s.Properties.pb = src[0] & 7;
s.Properties.lp = (src[1] >> 4); s.Properties.lp = (src[1] >> 4);
s.Properties.lc = src[1] & 15; s.Properties.lc = src[1] & 15;
if (s.Properties.pb >= 5) goto error; if (s.Properties.pb >= 5)
if (s.Properties.lp >= 5) goto error; goto error;
if (s.Properties.lc >= 9) goto error; if (s.Properties.lp >= 5)
// extra goto error;
if ((src[0] >> 3) != s.Properties.lc + s.Properties.lp) goto error; if (s.Properties.lc >= 9)
src += 2; src_len -= 2; goto error;
// UPX extra stuff in first byte: 5 high bits convenience for stub decompressor
if ((src[0] >> 3) != s.Properties.lc + s.Properties.lp)
goto error;
src += 2;
src_len -= 2;
if (cresult) if (cresult) {
{
assert(cresult->method == method); assert(cresult->method == method);
assert(cresult->result_lzma.pos_bits == (unsigned) s.Properties.pb); assert(cresult->result_lzma.pos_bits == (unsigned) s.Properties.pb);
assert(cresult->result_lzma.lit_pos_bits == (unsigned) s.Properties.lp); assert(cresult->result_lzma.lit_pos_bits == (unsigned) s.Properties.lp);
assert(cresult->result_lzma.lit_context_bits == (unsigned) s.Properties.lc); assert(cresult->result_lzma.lit_context_bits == (unsigned) s.Properties.lc);
assert(cresult->result_lzma.num_probs == (unsigned) LzmaGetNumProbs(&s.Properties)); assert(cresult->result_lzma.num_probs == (unsigned) LzmaGetNumProbs(&s.Properties));
const lzma_compress_result_t *res = &cresult->result_lzma; const lzma_compress_result_t *res = &cresult->result_lzma;
// printf("\nlzma_decompress config: %u %u %u %u %u\n", res->pos_bits, res->lit_pos_bits,
// res->lit_context_bits, res->dict_size, res->num_probs);
UNUSED(res); UNUSED(res);
//printf("\nlzma_decompress config: %u %u %u %u %u\n", res->pos_bits, res->lit_pos_bits, res->lit_context_bits, res->dict_size, res->num_probs);
} }
s.Probs = (CProb *) malloc(sizeof(CProb) * LzmaGetNumProbs(&s.Properties)); s.Probs = (CProb *) malloc(sizeof(CProb) * LzmaGetNumProbs(&s.Properties));
if (!s.Probs) if (!s.Probs) {
{
r = UPX_E_OUT_OF_MEMORY; r = UPX_E_OUT_OF_MEMORY;
goto error; goto error;
} }
rh = LzmaDecode(&s, src, src_len, &src_out, dst, *dst_len, &dst_out); rh = LzmaDecode(&s, src, src_len, &src_out, dst, *dst_len, &dst_out);
assert(src_out <= src_len); assert(src_out <= src_len);
assert(dst_out <= *dst_len); assert(dst_out <= *dst_len);
if (rh == 0) if (rh == 0) {
{
r = UPX_E_OK; r = UPX_E_OK;
if (src_out != src_len) if (src_out != src_len)
r = UPX_E_INPUT_NOT_CONSUMED; r = UPX_E_INPUT_NOT_CONSUMED;
} } else if (rh == LZMA_RESULT_INPUT_OVERRUN)
r = UPX_E_INPUT_OVERRUN;
else if (rh == LZMA_RESULT_OUTPUT_OVERRUN)
r = UPX_E_OUTPUT_OVERRUN;
error: error:
*dst_len = dst_out; *dst_len = dst_out;
@@ -486,24 +486,20 @@ error:
return r; return r;
} }
/************************************************************************* /*************************************************************************
// test_overlap - see <ucl/ucl.h> for semantics // test_overlap - see <ucl/ucl.h> for semantics
**************************************************************************/ **************************************************************************/
int upx_lzma_test_overlap ( const upx_bytep buf, int upx_lzma_test_overlap(const upx_bytep buf, const upx_bytep tbuf, unsigned src_off,
const upx_bytep tbuf, unsigned src_len, unsigned *dst_len, int method,
unsigned src_off, unsigned src_len, const upx_compress_result_t *cresult) {
unsigned* dst_len,
int method,
const upx_compress_result_t *cresult )
{
assert(M_IS_LZMA(method)); assert(M_IS_LZMA(method));
MemBuffer b(src_off + src_len); MemBuffer b(src_off + src_len);
memcpy(b + src_off, buf + src_off, src_len); memcpy(b + src_off, buf + src_off, src_len);
unsigned saved_dst_len = *dst_len; unsigned saved_dst_len = *dst_len;
int r = upx_lzma_decompress(b + src_off, src_len, b, dst_len, method, cresult); int r = upx_lzma_decompress(raw_index_bytes(b, src_off, src_len), src_len,
raw_bytes(b, *dst_len), dst_len, method, cresult);
if (r != UPX_E_OK) if (r != UPX_E_OK)
return r; return r;
if (*dst_len != saved_dst_len) if (*dst_len != saved_dst_len)
@@ -516,25 +512,41 @@ int upx_lzma_test_overlap ( const upx_bytep buf,
return UPX_E_OK; return UPX_E_OK;
} }
/************************************************************************* /*************************************************************************
// misc // misc
**************************************************************************/ **************************************************************************/
int upx_lzma_init(void) int upx_lzma_init(void) { return 0; }
{
return 0;
}
const char *upx_lzma_version_string(void) const char *upx_lzma_version_string(void) {
{
#if (WITH_LZMA == 0x443) #if (WITH_LZMA == 0x443)
return "4.43"; return "4.43";
#else #else
# error "unknown WITH_LZMA version" #error "unknown WITH_LZMA version"
return nullptr; return nullptr;
#endif #endif
} }
/*************************************************************************
// doctest checks
**************************************************************************/
TEST_CASE("upx_lzma_decompress") {
typedef const upx_byte C;
C *c_data;
upx_byte d_buf[16];
unsigned d_len;
int r;
c_data = (C *) "\x1a\x03\x00\x7f\xed\x3c\x00\x00\x00";
d_len = 16;
r = upx_lzma_decompress(c_data, 9, d_buf, &d_len, M_LZMA, nullptr);
CHECK((r == 0 && d_len == 16));
r = upx_lzma_decompress(c_data, 8, d_buf, &d_len, M_LZMA, nullptr);
CHECK(r == UPX_E_INPUT_OVERRUN);
d_len = 15;
r = upx_lzma_decompress(c_data, 9, d_buf, &d_len, M_LZMA, nullptr);
CHECK(r == UPX_E_OUTPUT_OVERRUN);
}
/* vim:set ts=4 sw=4 et: */ /* vim:set ts=4 sw=4 et: */
+136 -112
View File
@@ -25,60 +25,62 @@
<markus@oberhumer.com> <ezerotven+github@gmail.com> <markus@oberhumer.com> <ezerotven+github@gmail.com>
*/ */
#include "conf.h" #include "conf.h"
#include "compress.h" #include "compress.h"
/************************************************************************* /*************************************************************************
// //
**************************************************************************/ **************************************************************************/
static int convert_errno_from_ucl(int r) static int convert_errno_from_ucl(int r) {
{ switch (r) {
switch (r) case UCL_E_OK:
{ return UPX_E_OK;
case UCL_E_OK: return UPX_E_OK; case UCL_E_ERROR:
case UCL_E_ERROR: return UPX_E_ERROR; return UPX_E_ERROR;
case UCL_E_OUT_OF_MEMORY: return UPX_E_OUT_OF_MEMORY; case UCL_E_OUT_OF_MEMORY:
case UCL_E_NOT_COMPRESSIBLE: return UPX_E_NOT_COMPRESSIBLE; return UPX_E_OUT_OF_MEMORY;
case UCL_E_INPUT_OVERRUN: return UPX_E_INPUT_OVERRUN; case UCL_E_NOT_COMPRESSIBLE:
case UCL_E_OUTPUT_OVERRUN: return UPX_E_OUTPUT_OVERRUN; return UPX_E_NOT_COMPRESSIBLE;
case UCL_E_LOOKBEHIND_OVERRUN: return UPX_E_LOOKBEHIND_OVERRUN; case UCL_E_INPUT_OVERRUN:
case UCL_E_EOF_NOT_FOUND: return UPX_E_EOF_NOT_FOUND; return UPX_E_INPUT_OVERRUN;
case UCL_E_INPUT_NOT_CONSUMED: return UPX_E_INPUT_NOT_CONSUMED; case UCL_E_OUTPUT_OVERRUN:
// case UCL_E_NOT_YET_IMPLEMENTED: return UPX_E_NOT_YET_IMPLEMENTED; return UPX_E_OUTPUT_OVERRUN;
case UCL_E_INVALID_ARGUMENT: return UPX_E_INVALID_ARGUMENT; case UCL_E_LOOKBEHIND_OVERRUN:
return UPX_E_LOOKBEHIND_OVERRUN;
case UCL_E_EOF_NOT_FOUND:
return UPX_E_EOF_NOT_FOUND;
case UCL_E_INPUT_NOT_CONSUMED:
return UPX_E_INPUT_NOT_CONSUMED;
case UCL_E_INVALID_ARGUMENT:
return UPX_E_INVALID_ARGUMENT;
// UCL extra: // UCL extra:
case UCL_E_OVERLAP_OVERRUN: return UPX_E_ERROR; case UCL_E_OVERLAP_OVERRUN:
return UPX_E_ERROR;
} }
return UPX_E_ERROR; return UPX_E_ERROR;
} }
extern "C" { extern "C" {
static void __UCL_CDECL wrap_nprogress_ucl(ucl_uint a, ucl_uint b, int state, ucl_voidp user) static void __UCL_CDECL wrap_nprogress_ucl(ucl_uint a, ucl_uint b, int state, ucl_voidp user) {
{ if (state != -1 && state != 3)
if (state != -1 && state != 3) return; return;
upx_callback_p cb = (upx_callback_p) user; upx_callback_p cb = (upx_callback_p) user;
if (cb && cb->nprogress) if (cb && cb->nprogress)
cb->nprogress(cb, a, b); cb->nprogress(cb, a, b);
}} }
}
/************************************************************************* /*************************************************************************
// //
**************************************************************************/ **************************************************************************/
int upx_ucl_compress ( const upx_bytep src, unsigned src_len, int upx_ucl_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_bytep dst, unsigned* dst_len, upx_callback_p cb_parm, int method, int level,
upx_callback_p cb_parm, const upx_compress_config_t *cconf_parm, upx_compress_result_t *cresult) {
int method, int level,
const upx_compress_config_t *cconf_parm,
upx_compress_result_t *cresult )
{
int r; int r;
assert(level > 0); assert(cresult != nullptr); assert(level > 0);
assert(cresult != nullptr);
COMPILE_TIME_ASSERT(sizeof(ucl_compress_config_t) == sizeof(REAL_ucl_compress_config_t)) COMPILE_TIME_ASSERT(sizeof(ucl_compress_config_t) == sizeof(REAL_ucl_compress_config_t))
@@ -90,49 +92,47 @@ int upx_ucl_compress ( const upx_bytep src, unsigned src_len,
cb.user = cb_parm; cb.user = cb_parm;
} }
ucl_compress_config_t cconf; cconf.reset(); ucl_compress_config_t cconf;
if (cconf_parm) cconf.reset();
memcpy(&cconf, &cconf_parm->conf_ucl, sizeof(cconf)); // cconf = cconf_parm->conf_ucl; // struct copy if (cconf_parm) {
// cconf = cconf_parm->conf_ucl; // struct copy
memcpy(&cconf, &cconf_parm->conf_ucl, sizeof(cconf));
}
ucl_uint *res = cresult->result_ucl.result; ucl_uint *const res = cresult->result_ucl.result;
// assume no info available - fill in worst case results // assume no info available - fill in worst case results
//res[0] = 1; // min_offset_found - NOT USED // res[0] = 1; // min_offset_found - NOT USED
res[1] = src_len - 1; // max_offset_found res[1] = src_len - 1; // max_offset_found
//res[2] = 2; // min_match_found - NOT USED // res[2] = 2; // min_match_found - NOT USED
res[3] = src_len - 1; // max_match_found res[3] = src_len - 1; // max_match_found
//res[4] = 1; // min_run_found - NOT USED // res[4] = 1; // min_run_found - NOT USED
res[5] = src_len; // max_run_found res[5] = src_len; // max_run_found
res[6] = 1; // first_offset_found res[6] = 1; // first_offset_found
//res[7] = 999999; // same_match_offsets_found - NOT USED // res[7] = 999999; // same_match_offsets_found - NOT USED
// prepare bit-buffer settings // prepare bit-buffer settings
cconf.bb_endian = 0; cconf.bb_endian = 0;
cconf.bb_size = 0; cconf.bb_size = 0;
if (method >= M_NRV2B_LE32 && method <= M_NRV2E_LE16) if (method >= M_NRV2B_LE32 && method <= M_NRV2E_LE16) {
{
static const unsigned char sizes[3] = {32, 8, 16}; static const unsigned char sizes[3] = {32, 8, 16};
cconf.bb_size = sizes[(method - M_NRV2B_LE32) % 3]; cconf.bb_size = sizes[(method - M_NRV2B_LE32) % 3];
} } else {
else {
throwInternalError("unknown compression method"); throwInternalError("unknown compression method");
return UPX_E_ERROR; return UPX_E_ERROR;
} }
// optimize compression parms // optimize compression parms
if (level <= 3 && cconf.max_offset == UCL_UINT_MAX) if (level <= 3 && cconf.max_offset == UCL_UINT_MAX)
cconf.max_offset = 8*1024-1; cconf.max_offset = 8 * 1024 - 1;
else if (level == 4 && cconf.max_offset == UCL_UINT_MAX) else if (level == 4 && cconf.max_offset == UCL_UINT_MAX)
cconf.max_offset = 32*1024-1; cconf.max_offset = 32 * 1024 - 1;
if M_IS_NRV2B(method) if M_IS_NRV2B (method)
r = ucl_nrv2b_99_compress(src, src_len, dst, dst_len, r = ucl_nrv2b_99_compress(src, src_len, dst, dst_len, &cb, level, &cconf, res);
&cb, level, &cconf, res); else if M_IS_NRV2D (method)
else if M_IS_NRV2D(method) r = ucl_nrv2d_99_compress(src, src_len, dst, dst_len, &cb, level, &cconf, res);
r = ucl_nrv2d_99_compress(src, src_len, dst, dst_len, else if M_IS_NRV2E (method)
&cb, level, &cconf, res); r = ucl_nrv2e_99_compress(src, src_len, dst, dst_len, &cb, level, &cconf, res);
else if M_IS_NRV2E(method)
r = ucl_nrv2e_99_compress(src, src_len, dst, dst_len,
&cb, level, &cconf, res);
else { else {
throwInternalError("unknown compression method"); throwInternalError("unknown compression method");
return UPX_E_ERROR; return UPX_E_ERROR;
@@ -145,46 +145,41 @@ int upx_ucl_compress ( const upx_bytep src, unsigned src_len,
return convert_errno_from_ucl(r); return convert_errno_from_ucl(r);
} }
/************************************************************************* /*************************************************************************
// //
**************************************************************************/ **************************************************************************/
int upx_ucl_decompress ( const upx_bytep src, unsigned src_len, int upx_ucl_decompress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_bytep dst, unsigned* dst_len, int method, const upx_compress_result_t *cresult) {
int method,
const upx_compress_result_t *cresult )
{
int r; int r;
switch (method) switch (method) {
{
case M_NRV2B_8: case M_NRV2B_8:
r = ucl_nrv2b_decompress_safe_8(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2b_decompress_safe_8(src, src_len, dst, dst_len, nullptr);
break; break;
case M_NRV2B_LE16: case M_NRV2B_LE16:
r = ucl_nrv2b_decompress_safe_le16(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2b_decompress_safe_le16(src, src_len, dst, dst_len, nullptr);
break; break;
case M_NRV2B_LE32: case M_NRV2B_LE32:
r = ucl_nrv2b_decompress_safe_le32(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2b_decompress_safe_le32(src, src_len, dst, dst_len, nullptr);
break; break;
case M_NRV2D_8: case M_NRV2D_8:
r = ucl_nrv2d_decompress_safe_8(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2d_decompress_safe_8(src, src_len, dst, dst_len, nullptr);
break; break;
case M_NRV2D_LE16: case M_NRV2D_LE16:
r = ucl_nrv2d_decompress_safe_le16(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2d_decompress_safe_le16(src, src_len, dst, dst_len, nullptr);
break; break;
case M_NRV2D_LE32: case M_NRV2D_LE32:
r = ucl_nrv2d_decompress_safe_le32(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2d_decompress_safe_le32(src, src_len, dst, dst_len, nullptr);
break; break;
case M_NRV2E_8: case M_NRV2E_8:
r = ucl_nrv2e_decompress_safe_8(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2e_decompress_safe_8(src, src_len, dst, dst_len, nullptr);
break; break;
case M_NRV2E_LE16: case M_NRV2E_LE16:
r = ucl_nrv2e_decompress_safe_le16(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2e_decompress_safe_le16(src, src_len, dst, dst_len, nullptr);
break; break;
case M_NRV2E_LE32: case M_NRV2E_LE32:
r = ucl_nrv2e_decompress_safe_le32(src,src_len,dst,dst_len,nullptr); r = ucl_nrv2e_decompress_safe_le32(src, src_len, dst, dst_len, nullptr);
break; break;
default: default:
throwInternalError("unknown decompression method"); throwInternalError("unknown decompression method");
@@ -195,49 +190,43 @@ int upx_ucl_decompress ( const upx_bytep src, unsigned src_len,
return convert_errno_from_ucl(r); return convert_errno_from_ucl(r);
} }
/************************************************************************* /*************************************************************************
// //
**************************************************************************/ **************************************************************************/
int upx_ucl_test_overlap ( const upx_bytep buf, int upx_ucl_test_overlap(const upx_bytep buf, const upx_bytep tbuf, unsigned src_off,
const upx_bytep tbuf, unsigned src_len, unsigned *dst_len, int method,
unsigned src_off, unsigned src_len, const upx_compress_result_t *cresult) {
unsigned* dst_len,
int method,
const upx_compress_result_t *cresult )
{
int r; int r;
UNUSED(tbuf); // not needed for UCL UNUSED(tbuf); // not needed for UCL
switch (method) switch (method) {
{
case M_NRV2B_8: case M_NRV2B_8:
r = ucl_nrv2b_test_overlap_8(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2b_test_overlap_8(buf, src_off, src_len, dst_len, nullptr);
break; break;
case M_NRV2B_LE16: case M_NRV2B_LE16:
r = ucl_nrv2b_test_overlap_le16(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2b_test_overlap_le16(buf, src_off, src_len, dst_len, nullptr);
break; break;
case M_NRV2B_LE32: case M_NRV2B_LE32:
r = ucl_nrv2b_test_overlap_le32(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2b_test_overlap_le32(buf, src_off, src_len, dst_len, nullptr);
break; break;
case M_NRV2D_8: case M_NRV2D_8:
r = ucl_nrv2d_test_overlap_8(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2d_test_overlap_8(buf, src_off, src_len, dst_len, nullptr);
break; break;
case M_NRV2D_LE16: case M_NRV2D_LE16:
r = ucl_nrv2d_test_overlap_le16(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2d_test_overlap_le16(buf, src_off, src_len, dst_len, nullptr);
break; break;
case M_NRV2D_LE32: case M_NRV2D_LE32:
r = ucl_nrv2d_test_overlap_le32(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2d_test_overlap_le32(buf, src_off, src_len, dst_len, nullptr);
break; break;
case M_NRV2E_8: case M_NRV2E_8:
r = ucl_nrv2e_test_overlap_8(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2e_test_overlap_8(buf, src_off, src_len, dst_len, nullptr);
break; break;
case M_NRV2E_LE16: case M_NRV2E_LE16:
r = ucl_nrv2e_test_overlap_le16(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2e_test_overlap_le16(buf, src_off, src_len, dst_len, nullptr);
break; break;
case M_NRV2E_LE32: case M_NRV2E_LE32:
r = ucl_nrv2e_test_overlap_le32(buf,src_off,src_len,dst_len,nullptr); r = ucl_nrv2e_test_overlap_le32(buf, src_off, src_len, dst_len, nullptr);
break; break;
default: default:
throwInternalError("unknown decompression method"); throwInternalError("unknown decompression method");
@@ -248,7 +237,6 @@ int upx_ucl_test_overlap ( const upx_bytep buf,
return convert_errno_from_ucl(r); return convert_errno_from_ucl(r);
} }
/************************************************************************* /*************************************************************************
// misc // misc
**************************************************************************/ **************************************************************************/
@@ -258,8 +246,7 @@ static ucl_voidp __UCL_CDECL my_malloc(ucl_uint n) { return calloc(1, n); }
static void __UCL_CDECL my_free(ucl_voidp p) { free(p); } static void __UCL_CDECL my_free(ucl_voidp p) { free(p); }
} }
int upx_ucl_init(void) int upx_ucl_init(void) {
{
if (ucl_init() != UCL_E_OK) if (ucl_init() != UCL_E_OK)
return -1; return -1;
if (UCL_VERSION != ucl_version() || strcmp(UCL_VERSION_STRING, ucl_version_string()) != 0) if (UCL_VERSION != ucl_version() || strcmp(UCL_VERSION_STRING, ucl_version_string()) != 0)
@@ -268,25 +255,20 @@ int upx_ucl_init(void)
return 0; return 0;
} }
const char *upx_ucl_version_string(void) const char *upx_ucl_version_string(void) { return ucl_version_string(); }
{
return ucl_version_string();
}
unsigned upx_ucl_adler32(const void *buf, unsigned len, unsigned adler) unsigned upx_ucl_adler32(const void *buf, unsigned len, unsigned adler) {
{
return ucl_adler32(adler, (const ucl_bytep) buf, len); return ucl_adler32(adler, (const ucl_bytep) buf, len);
} }
#if 0 /* UNUSED */ #if 0 /* UNUSED */
unsigned upx_ucl_crc32(const void *buf, unsigned len, unsigned crc) unsigned upx_ucl_crc32(const void *buf, unsigned len, unsigned crc) {
{
return ucl_crc32(crc, (const ucl_bytep) buf, len); return ucl_crc32(crc, (const ucl_bytep) buf, len);
} }
#endif #endif
/************************************************************************* /*************************************************************************
// Debug checks // doctest checks
**************************************************************************/ **************************************************************************/
#if DEBUG && 1 #if DEBUG && 1
@@ -308,21 +290,26 @@ static bool check_ucl(const int method, const unsigned expected_c_len) {
d_buf.allocForDecompression(u_len); d_buf.allocForDecompression(u_len);
c_len = c_buf.getSize() - c_extra; c_len = c_buf.getSize() - c_extra;
r = upx_ucl_compress(u_buf, u_len, c_buf + c_extra, &c_len, nullptr, method, level, NULL_cconf, &cresult); r = upx_ucl_compress(raw_bytes(u_buf, u_len), u_len, raw_index_bytes(c_buf, c_extra, c_len),
if (r != 0 || c_len != expected_c_len) return false; &c_len, nullptr, method, level, NULL_cconf, &cresult);
if (r != 0 || c_len != expected_c_len)
return false;
d_len = d_buf.getSize(); d_len = d_buf.getSize();
r = upx_ucl_decompress(c_buf + c_extra, c_len, d_buf, &d_len, method, nullptr); r = upx_ucl_decompress(raw_index_bytes(c_buf, c_extra, c_len), c_len, raw_bytes(d_buf, d_len),
if (r != 0 || d_len != u_len) return false; &d_len, method, nullptr);
if (memcmp(u_buf, d_buf, u_len) != 0) return false; if (r != 0 || d_len != u_len || memcmp(u_buf, d_buf, u_len) != 0)
return false;
d_len = u_len - 1; d_len = u_len - 1;
r = upx_ucl_decompress(c_buf + c_extra, c_len, d_buf, &d_len, method, nullptr); r = upx_ucl_decompress(raw_index_bytes(c_buf, c_extra, c_len), c_len, raw_bytes(d_buf, d_len),
if (r == 0) return false; &d_len, method, nullptr);
if (r == 0)
return false;
// TODO: rewrite Packer::findOverlapOverhead() so that we can test it here // TODO: rewrite Packer::findOverlapOverhead() so that we can test it here
//unsigned x_len = d_len; // unsigned x_len = d_len;
//r = upx_ucl_test_overlap(c_buf, u_buf, c_extra, c_len, &x_len, method, nullptr); // r = upx_ucl_test_overlap(c_buf, u_buf, c_extra, c_len, &x_len, method, nullptr);
return true; return true;
} }
@@ -340,5 +327,42 @@ TEST_CASE("compress_ucl") {
#endif // DEBUG #endif // DEBUG
TEST_CASE("upx_ucl_decompress") {
typedef const upx_byte C;
C *c_data;
upx_byte d_buf[16];
unsigned d_len;
int r;
c_data = (C *) "\x92\xff\x10\x00\x00\x00\x00\x00\x48\xff";
d_len = 16;
r = upx_ucl_decompress(c_data, 10, d_buf, &d_len, M_NRV2B_8, nullptr);
CHECK((r == 0 && d_len == 16));
r = upx_ucl_decompress(c_data, 9, d_buf, &d_len, M_NRV2B_8, nullptr);
CHECK(r == UPX_E_INPUT_OVERRUN);
d_len = 15;
r = upx_ucl_decompress(c_data, 10, d_buf, &d_len, M_NRV2B_8, nullptr);
CHECK(r == UPX_E_OUTPUT_OVERRUN);
c_data = (C *) "\x92\xff\x10\x92\x49\x24\x92\xa0\xff";
d_len = 16;
r = upx_ucl_decompress(c_data, 9, d_buf, &d_len, M_NRV2D_8, nullptr);
CHECK((r == 0 && d_len == 16));
r = upx_ucl_decompress(c_data, 8, d_buf, &d_len, M_NRV2D_8, nullptr);
CHECK(r == UPX_E_INPUT_OVERRUN);
d_len = 15;
r = upx_ucl_decompress(c_data, 9, d_buf, &d_len, M_NRV2D_8, nullptr);
CHECK(r == UPX_E_OUTPUT_OVERRUN);
c_data = (C *) "\x90\xff\xb0\x92\x49\x24\x92\xa0\xff";
d_len = 16;
r = upx_ucl_decompress(c_data, 9, d_buf, &d_len, M_NRV2E_8, nullptr);
CHECK((r == 0 && d_len == 16));
r = upx_ucl_decompress(c_data, 8, d_buf, &d_len, M_NRV2E_8, nullptr);
CHECK(r == UPX_E_INPUT_OVERRUN);
d_len = 15;
r = upx_ucl_decompress(c_data, 9, d_buf, &d_len, M_NRV2E_8, nullptr);
CHECK(r == UPX_E_OUTPUT_OVERRUN);
}
/* vim:set ts=4 sw=4 et: */ /* vim:set ts=4 sw=4 et: */
+83 -68
View File
@@ -25,16 +25,13 @@
<markus@oberhumer.com> <ezerotven+github@gmail.com> <markus@oberhumer.com> <ezerotven+github@gmail.com>
*/ */
#include "conf.h" #include "conf.h"
#include "compress.h" #include "compress.h"
#include "util/membuffer.h" #include "util/membuffer.h"
#include <zlib/zlib.h> #include <zlib/zlib.h>
#include <zlib/deflate.h> #include <zlib/deflate.h>
void zlib_compress_config_t::reset() {
void zlib_compress_config_t::reset()
{
mem_clear(this, sizeof(*this)); mem_clear(this, sizeof(*this));
mem_level.reset(); mem_level.reset();
@@ -42,37 +39,49 @@ void zlib_compress_config_t::reset()
strategy.reset(); strategy.reset();
} }
static int convert_errno_from_zlib(int zr) {
static int convert_errno_from_zlib(int zr) switch (zr) {
{ case Z_OK:
switch (zr) return UPX_E_OK;
{ // positive values
case Z_OK: return UPX_E_OK; case Z_STREAM_END:
case Z_DATA_ERROR: return UPX_E_ERROR; return UPX_E_ERROR;
case Z_NEED_DICT: return UPX_E_ERROR; case Z_NEED_DICT:
return UPX_E_ERROR;
// negative values
case Z_ERRNO:
return UPX_E_ERROR;
case Z_STREAM_ERROR:
return UPX_E_ERROR;
case Z_DATA_ERROR:
return UPX_E_ERROR;
case Z_MEM_ERROR:
return UPX_E_OUT_OF_MEMORY;
case Z_BUF_ERROR:
return UPX_E_OUTPUT_OVERRUN;
case Z_VERSION_ERROR:
return UPX_E_ERROR;
case -7: // UPX extra
return UPX_E_INPUT_OVERRUN;
} }
return UPX_E_ERROR; return UPX_E_ERROR;
} }
/************************************************************************* /*************************************************************************
// //
**************************************************************************/ **************************************************************************/
int upx_zlib_compress ( const upx_bytep src, unsigned src_len, int upx_zlib_compress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_bytep dst, unsigned* dst_len, upx_callback_p cb_parm, int method, int level,
upx_callback_p cb_parm, const upx_compress_config_t *cconf_parm, upx_compress_result_t *cresult) {
int method, int level,
const upx_compress_config_t *cconf_parm,
upx_compress_result_t *cresult )
{
assert(method == M_DEFLATE); assert(method == M_DEFLATE);
assert(level > 0); assert(cresult != nullptr); assert(level > 0);
assert(cresult != nullptr);
UNUSED(cb_parm); UNUSED(cb_parm);
int r = UPX_E_ERROR; int r = UPX_E_ERROR;
int zr; int zr;
const zlib_compress_config_t *lcconf = cconf_parm ? &cconf_parm->conf_zlib : nullptr; const zlib_compress_config_t *const lcconf = cconf_parm ? &cconf_parm->conf_zlib : nullptr;
zlib_compress_result_t *res = &cresult->result_zlib; zlib_compress_result_t *const res = &cresult->result_zlib;
if (level == 10) if (level == 10)
level = 9; level = 9;
@@ -81,8 +90,7 @@ int upx_zlib_compress ( const upx_bytep src, unsigned src_len,
zlib_compress_config_t::window_bits_t window_bits; zlib_compress_config_t::window_bits_t window_bits;
zlib_compress_config_t::strategy_t strategy; zlib_compress_config_t::strategy_t strategy;
// cconf overrides // cconf overrides
if (lcconf) if (lcconf) {
{
oassign(mem_level, lcconf->mem_level); oassign(mem_level, lcconf->mem_level);
oassign(window_bits, lcconf->window_bits); oassign(window_bits, lcconf->window_bits);
oassign(strategy, lcconf->strategy); oassign(strategy, lcconf->strategy);
@@ -99,8 +107,7 @@ int upx_zlib_compress ( const upx_bytep src, unsigned src_len,
s.avail_out = *dst_len; s.avail_out = *dst_len;
s.total_in = s.total_out = 0; s.total_in = s.total_out = 0;
zr = (int)deflateInit2(&s, level, Z_DEFLATED, 0 - (int)window_bits, zr = (int) deflateInit2(&s, level, Z_DEFLATED, 0 - (int) window_bits, mem_level, strategy);
mem_level, strategy);
if (zr != Z_OK) if (zr != Z_OK)
goto error; goto error;
assert(s.state->level == level); assert(s.state->level == level);
@@ -118,8 +125,7 @@ error:
if (r == UPX_E_OK) if (r == UPX_E_OK)
r = UPX_E_ERROR; r = UPX_E_ERROR;
done: done:
if (r == UPX_E_OK) if (r == UPX_E_OK) {
{
if (s.avail_in != 0 || s.total_in != src_len) if (s.avail_in != 0 || s.total_in != src_len)
r = UPX_E_ERROR; r = UPX_E_ERROR;
} }
@@ -129,16 +135,12 @@ done:
return r; return r;
} }
/************************************************************************* /*************************************************************************
// //
**************************************************************************/ **************************************************************************/
int upx_zlib_decompress ( const upx_bytep src, unsigned src_len, int upx_zlib_decompress(const upx_bytep src, unsigned src_len, upx_bytep dst, unsigned *dst_len,
upx_bytep dst, unsigned* dst_len, int method, const upx_compress_result_t *cresult) {
int method,
const upx_compress_result_t *cresult )
{
assert(method == M_DEFLATE); assert(method == M_DEFLATE);
UNUSED(method); UNUSED(method);
UNUSED(cresult); UNUSED(cresult);
@@ -158,8 +160,11 @@ int upx_zlib_decompress ( const upx_bytep src, unsigned src_len,
if (zr != Z_OK) if (zr != Z_OK)
goto error; goto error;
zr = inflate(&s, Z_FINISH); zr = inflate(&s, Z_FINISH);
if (zr != Z_STREAM_END) if (zr != Z_STREAM_END) {
if (zr == Z_BUF_ERROR && s.avail_in == 0)
zr = -7; // UPX extra
goto error; goto error;
}
zr = inflateEnd(&s); zr = inflateEnd(&s);
if (zr != Z_OK) if (zr != Z_OK)
goto error; goto error;
@@ -171,8 +176,7 @@ error:
if (r == UPX_E_OK) if (r == UPX_E_OK)
r = UPX_E_ERROR; r = UPX_E_ERROR;
done: done:
if (r == UPX_E_OK) if (r == UPX_E_OK) {
{
if (s.avail_in != 0 || s.total_in != src_len) if (s.avail_in != 0 || s.total_in != src_len)
r = UPX_E_INPUT_NOT_CONSUMED; r = UPX_E_INPUT_NOT_CONSUMED;
} }
@@ -182,24 +186,20 @@ done:
return r; return r;
} }
/************************************************************************* /*************************************************************************
// test_overlap - see <ucl/ucl.h> for semantics // test_overlap - see <ucl/ucl.h> for semantics
**************************************************************************/ **************************************************************************/
int upx_zlib_test_overlap ( const upx_bytep buf, int upx_zlib_test_overlap(const upx_bytep buf, const upx_bytep tbuf, unsigned src_off,
const upx_bytep tbuf, unsigned src_len, unsigned *dst_len, int method,
unsigned src_off, unsigned src_len, const upx_compress_result_t *cresult) {
unsigned* dst_len,
int method,
const upx_compress_result_t *cresult )
{
assert(method == M_DEFLATE); assert(method == M_DEFLATE);
MemBuffer b(src_off + src_len); MemBuffer b(src_off + src_len);
memcpy(b + src_off, buf + src_off, src_len); memcpy(b + src_off, buf + src_off, src_len);
unsigned saved_dst_len = *dst_len; unsigned saved_dst_len = *dst_len;
int r = upx_zlib_decompress(b + src_off, src_len, b, dst_len, method, cresult); int r = upx_zlib_decompress(raw_index_bytes(b, src_off, src_len), src_len,
raw_bytes(b, *dst_len), dst_len, method, cresult);
if (r != UPX_E_OK) if (r != UPX_E_OK)
return r; return r;
if (*dst_len != saved_dst_len) if (*dst_len != saved_dst_len)
@@ -212,39 +212,32 @@ int upx_zlib_test_overlap ( const upx_bytep buf,
return UPX_E_OK; return UPX_E_OK;
} }
/************************************************************************* /*************************************************************************
// misc // misc
**************************************************************************/ **************************************************************************/
int upx_zlib_init(void) int upx_zlib_init(void) {
{
if (strcmp(ZLIB_VERSION, zlibVersion()) != 0) if (strcmp(ZLIB_VERSION, zlibVersion()) != 0)
return -2; return -2;
return 0; return 0;
} }
const char *upx_zlib_version_string(void) const char *upx_zlib_version_string(void) { return zlibVersion(); }
{
return zlibVersion();
}
#if 0 /* UNUSED */ #if 0 /* UNUSED */
unsigned upx_zlib_adler32(const void *buf, unsigned len, unsigned adler) unsigned upx_zlib_adler32(const void *buf, unsigned len, unsigned adler) {
{
return adler32(adler, (const Bytef *) buf, len); return adler32(adler, (const Bytef *) buf, len);
} }
#endif #endif
#if 0 /* UNUSED */ #if 0 /* UNUSED */
unsigned upx_zlib_crc32(const void *buf, unsigned len, unsigned crc) unsigned upx_zlib_crc32(const void *buf, unsigned len, unsigned crc) {
{
return crc32(crc, (const Bytef *) buf, len); return crc32(crc, (const Bytef *) buf, len);
} }
#endif #endif
/************************************************************************* /*************************************************************************
// Debug checks // doctest checks
**************************************************************************/ **************************************************************************/
#if DEBUG && 1 #if DEBUG && 1
@@ -265,21 +258,26 @@ static bool check_zlib(const int method, const int level, const unsigned expecte
d_buf.allocForDecompression(u_len); d_buf.allocForDecompression(u_len);
c_len = c_buf.getSize() - c_extra; c_len = c_buf.getSize() - c_extra;
r = upx_zlib_compress(u_buf, u_len, c_buf + c_extra, &c_len, nullptr, method, level, NULL_cconf, &cresult); r = upx_zlib_compress(raw_bytes(u_buf, u_len), u_len, raw_index_bytes(c_buf, c_extra, c_len),
if (r != 0 || c_len != expected_c_len) return false; &c_len, nullptr, method, level, NULL_cconf, &cresult);
if (r != 0 || c_len != expected_c_len)
return false;
d_len = d_buf.getSize(); d_len = d_buf.getSize();
r = upx_zlib_decompress(c_buf + c_extra, c_len, d_buf, &d_len, method, nullptr); r = upx_zlib_decompress(raw_index_bytes(c_buf, c_extra, c_len), c_len, raw_bytes(d_buf, d_len),
if (r != 0 || d_len != u_len) return false; &d_len, method, nullptr);
if (memcmp(u_buf, d_buf, u_len) != 0) return false; if (r != 0 || d_len != u_len || memcmp(u_buf, d_buf, u_len) != 0)
return false;
d_len = u_len - 1; d_len = u_len - 1;
r = upx_zlib_decompress(c_buf + c_extra, c_len, d_buf, &d_len, method, nullptr); r = upx_zlib_decompress(raw_index_bytes(c_buf, c_extra, c_len), c_len, raw_bytes(d_buf, d_len),
if (r == 0) return false; &d_len, method, nullptr);
if (r == 0)
return false;
// TODO: rewrite Packer::findOverlapOverhead() so that we can test it here // TODO: rewrite Packer::findOverlapOverhead() so that we can test it here
//unsigned x_len = d_len; // unsigned x_len = d_len;
//r = upx_zlib_test_overlap(c_buf, u_buf, c_extra, c_len, &x_len, method, nullptr); // r = upx_zlib_test_overlap(c_buf, u_buf, c_extra, c_len, &x_len, method, nullptr);
return true; return true;
} }
@@ -291,5 +289,22 @@ TEST_CASE("compress_zlib") {
#endif // DEBUG #endif // DEBUG
TEST_CASE("upx_zlib_decompress") {
typedef const upx_byte C;
C *c_data;
upx_byte d_buf[16];
unsigned d_len;
int r;
c_data = (C *) "\xfb\xff\x1f\x15\x00\x00";
d_len = 16;
r = upx_zlib_decompress(c_data, 6, d_buf, &d_len, M_DEFLATE, nullptr);
CHECK((r == 0 && d_len == 16));
r = upx_zlib_decompress(c_data, 5, d_buf, &d_len, M_DEFLATE, nullptr);
CHECK(r == UPX_E_INPUT_OVERRUN);
d_len = 15;
r = upx_zlib_decompress(c_data, 6, d_buf, &d_len, M_DEFLATE, nullptr);
CHECK(r == UPX_E_OUTPUT_OVERRUN);
}
/* vim:set ts=4 sw=4 et: */ /* vim:set ts=4 sw=4 et: */
+12 -2
View File
@@ -295,9 +295,9 @@ typedef upx_int64_t upx_off_t;
#define CLANG_FORMAT_DUMMY_STATEMENT /*empty*/ #define CLANG_FORMAT_DUMMY_STATEMENT /*empty*/
#if defined(_WIN32) && defined(__MINGW32__) && defined(__GNUC__) && !defined(__clang__) #if defined(_WIN32) && defined(__MINGW32__) && defined(__GNUC__) && !defined(__clang__)
# define attribute_format(a,b) __attribute__((__format__(__gnu_printf__,a,b))); # define attribute_format(a,b) __attribute__((__format__(__gnu_printf__,a,b)))
#elif (ACC_CC_CLANG || ACC_CC_GNUC) #elif (ACC_CC_CLANG || ACC_CC_GNUC)
# define attribute_format(a,b) __attribute__((__format__(__printf__,a,b))); # define attribute_format(a,b) __attribute__((__format__(__printf__,a,b)))
#else #else
# define attribute_format(a,b) /*empty*/ # define attribute_format(a,b) /*empty*/
#endif #endif
@@ -377,6 +377,9 @@ private:
namespace compile_time { namespace compile_time {
constexpr size_t string_len(const char *a) {
return *a == '\0' ? 0 : 1 + string_len(a + 1);
}
constexpr bool string_eq(const char *a, const char *b) { constexpr bool string_eq(const char *a, const char *b) {
return *a == *b && (*a == '\0' || string_eq(a + 1, b + 1)); return *a == *b && (*a == '\0' || string_eq(a + 1, b + 1));
} }
@@ -816,6 +819,13 @@ inline T *raw_bytes(T *ptr, size_t size_in_bytes) {
return ptr; return ptr;
} }
// default: for any regular pointer, raw_index_bytes() is just "pointer + index"
// NOTE: index == number of elements, *NOT* size in bytes!
template <class T>
inline T *raw_index_bytes(T *ptr, size_t index, size_t size_in_bytes) {
typedef T element_type;
return raw_bytes(ptr, mem_size(sizeof(element_type), index, size_in_bytes)) + index;
}
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64) #if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR) # if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR)
+7 -4
View File
@@ -38,6 +38,7 @@
static bool head_done = 0; static bool head_done = 0;
// also see UPX_CONFIG_DISABLE_GITREV in CMakeLists.txt
#if defined(UPX_VERSION_GITREV) #if defined(UPX_VERSION_GITREV)
const char gitrev[] = UPX_VERSION_GITREV; const char gitrev[] = UPX_VERSION_GITREV;
#else #else
@@ -381,11 +382,13 @@ void show_version(bool one_line)
FILE *fp = stdout; FILE *fp = stdout;
const char *v; const char *v;
fprintf(fp, "upx %s\n", UPX_VERSION_STRING #if defined(UPX_VERSION_GIT_DESCRIBE)
#if defined(UPX_VERSION_GITREV) fprintf(fp, "upx %s\n", UPX_VERSION_GIT_DESCRIBE);
"-git-" UPX_VERSION_GITREV #elif defined(UPX_VERSION_GITREV)
fprintf(fp, "upx %s\n", UPX_VERSION_STRING "-git-" UPX_VERSION_GITREV);
#else
fprintf(fp, "upx %s\n", UPX_VERSION_STRING);
#endif #endif
);
if (one_line) if (one_line)
return; return;
#if (WITH_NRV) #if (WITH_NRV)
+3 -3
View File
@@ -36,9 +36,9 @@ LeFile::LeFile(InputFile *f) :
fif(f), fof(nullptr), fif(f), fof(nullptr),
le_offset(0), exe_offset(0) le_offset(0), exe_offset(0)
{ {
COMPILE_TIME_ASSERT(sizeof(le_header_t) == 196); COMPILE_TIME_ASSERT(sizeof(le_header_t) == 196)
COMPILE_TIME_ASSERT(sizeof(le_object_table_entry_t) == 24); COMPILE_TIME_ASSERT(sizeof(le_object_table_entry_t) == 24)
COMPILE_TIME_ASSERT(sizeof(le_pagemap_entry_t) == 4); COMPILE_TIME_ASSERT(sizeof(le_pagemap_entry_t) == 4)
memset(&ih,0,sizeof ih); memset(&ih,0,sizeof ih);
memset(&oh,0,sizeof oh); memset(&oh,0,sizeof oh);
iobject_table = oobject_table = nullptr; iobject_table = oobject_table = nullptr;
+10 -5
View File
@@ -375,6 +375,9 @@ static int do_option(int optc, const char *arg) {
case 'f': case 'f':
opt->force++; opt->force++;
break; break;
case 529:
opt->force_overwrite = true;
break;
case 909: case 909:
set_cmd(CMD_FILEINFO); set_cmd(CMD_FILEINFO);
break; break;
@@ -801,6 +804,7 @@ int main_get_options(int argc, char **argv) {
// options // options
{"force", 0, N, 'f'}, // force overwrite of output files {"force", 0, N, 'f'}, // force overwrite of output files
{"force-compress", 0, N, 'f'}, // and compression of suspicious files {"force-compress", 0, N, 'f'}, // and compression of suspicious files
{"force-overwrite", 0x90, N, 529}, // force overwrite of output files
{"info", 0, N, 'i'}, // info mode {"info", 0, N, 'i'}, // info mode
{"no-env", 0x10, N, 519}, // no environment var {"no-env", 0x10, N, 519}, // no environment var
{"no-mode", 0x10, N, 526}, // do not preserve mode (permissions) {"no-mode", 0x10, N, 526}, // do not preserve mode (permissions)
@@ -897,7 +901,7 @@ int main_get_options(int argc, char **argv) {
// dos/sys // dos/sys
// unix // unix
{"blocksize", 0x31, N, 660}, // --blocksize= {"blocksize", 0x31, N, 660}, // --blocksize=
{"force-execve", 0x10, N, 661}, // force linux/386 execve format {"force-execve", 0x90, N, 661}, // force linux/386 execve format
{"is_ptinterp", 0x10, N, 663}, // linux/elf386 PT_INTERP program {"is_ptinterp", 0x10, N, 663}, // linux/elf386 PT_INTERP program
{"use_ptinterp", 0x10, N, 664}, // linux/elf386 PT_INTERP program {"use_ptinterp", 0x10, N, 664}, // linux/elf386 PT_INTERP program
{"make_ptinterp", 0x10, N, 665}, // linux/elf386 PT_INTERP program {"make_ptinterp", 0x10, N, 665}, // linux/elf386 PT_INTERP program
@@ -912,7 +916,7 @@ int main_get_options(int argc, char **argv) {
{"unmap-all-pages", 0x10, N, 674}, // linux /proc/self/exe vanishes {"unmap-all-pages", 0x10, N, 674}, // linux /proc/self/exe vanishes
{"preserve-build-id", 0, N, 675}, {"preserve-build-id", 0, N, 675},
{"android-shlib", 0, N, 676}, {"android-shlib", 0, N, 676},
{"force-pie", 0, N, 677}, {"force-pie", 0x90, N, 677},
// watcom/le // watcom/le
{"le", 0x10, N, 620}, // produce LE output {"le", 0x10, N, 620}, // produce LE output
// win32/pe // win32/pe
@@ -1263,11 +1267,12 @@ int upx_main(int argc, char *argv[]) {
return exit_code; return exit_code;
if (gitrev[0]) { if (gitrev[0]) {
bool warn = true; // also see UPX_CONFIG_DISABLE_GITREV in CMakeLists.txt
bool warn_gitrev = true;
const char *ee = getenv("UPX_DEBUG_DISABLE_GITREV_WARNING"); const char *ee = getenv("UPX_DEBUG_DISABLE_GITREV_WARNING");
if (ee && ee[0] && strcmp(ee, "1") == 0) if (ee && ee[0] && strcmp(ee, "1") == 0)
warn = false; warn_gitrev = false;
if (warn) { if (warn_gitrev) {
FILE *f = stdout; FILE *f = stdout;
int fg = con_fg(f, FG_RED); int fg = con_fg(f, FG_RED);
con_fprintf( con_fprintf(
+1
View File
@@ -69,6 +69,7 @@ struct options_t {
int backup; int backup;
int console; int console;
int force; int force;
bool force_overwrite;
int info_mode; int info_mode;
bool ignorewarn; bool ignorewarn;
bool no_env; bool no_env;
+7 -4
View File
@@ -1978,7 +1978,7 @@ bool PackLinuxElf32::calls_crt1(Elf32_Rel const *rel, int sz)
#include "p_elf_enum.h" #include "p_elf_enum.h"
#undef WANT_REL_ENUM #undef WANT_REL_ENUM
int PackLinuxElf32::canUnpack() // really 'bool' int PackLinuxElf32::canUnpack() // bool, except -1: format known, but not packed
{ {
if (checkEhdr(&ehdri)) { if (checkEhdr(&ehdri)) {
return false; return false;
@@ -2409,7 +2409,7 @@ proceed: ;
return true; return true;
} }
int PackLinuxElf64::canUnpack() // really 'bool' int PackLinuxElf64::canUnpack() // bool, except -1: format known, but not packed
{ {
if (checkEhdr(&ehdri)) { if (checkEhdr(&ehdri)) {
return false; return false;
@@ -2497,6 +2497,9 @@ PackLinuxElf64::canPack()
max_offset = UPX_MAX(max_offset, get_te64(&phdr->p_filesz) + get_te64(&phdr->p_offset)); max_offset = UPX_MAX(max_offset, get_te64(&phdr->p_filesz) + get_te64(&phdr->p_offset));
} }
} }
if (canUnpack() > 0) {
throwAlreadyPacked();
}
// We want to compress position-independent executable (gcc -pie) // We want to compress position-independent executable (gcc -pie)
// main programs, but compressing a shared library must be avoided // main programs, but compressing a shared library must be avoided
// because the result is no longer usable. In theory, there is no way // because the result is no longer usable. In theory, there is no way
@@ -4448,7 +4451,7 @@ int PackLinuxElf64::pack2(OutputFile *fo, Filter &ft)
} }
} }
else // main program, not shared library else // main program, not shared library
if (hdr_u_len < (u64_t)x.size) { if (hdr_u_len <= (u64_t)x.size) {
if (0 == nx) { // 1st PT_LOAD64 must cover Ehdr at 0==p_offset if (0 == nx) { // 1st PT_LOAD64 must cover Ehdr at 0==p_offset
unsigned const delta = hdr_u_len; unsigned const delta = hdr_u_len;
if (ft.id < 0x40) { if (ft.id < 0x40) {
@@ -5337,7 +5340,7 @@ PackLinuxElf32x86::~PackLinuxElf32x86()
{ {
} }
int PackLinuxElf32x86::canUnpack() // really 'bool' int PackLinuxElf32x86::canUnpack() // bool, except -1: format known, but not packed
{ {
if (super::canUnpack()) { if (super::canUnpack()) {
return true; return true;
+4 -4
View File
@@ -42,7 +42,7 @@ public:
/*virtual void buildLoader(const Filter *);*/ /*virtual void buildLoader(const Filter *);*/
virtual int getVersion() const override { return 14; } // upx-3.96 cannot upack, for instance virtual int getVersion() const override { return 14; } // upx-3.96 cannot upack, for instance
virtual bool canUnpackVersion(int version) const override { return (version >= 11); } virtual bool canUnpackVersion(int version) const override { return (version >= 11); }
virtual int canUnpack() override { return super::canUnpack(); } // really 'bool' virtual int canUnpack() override { return super::canUnpack(); } // bool, except -1: format known, but not packed
protected: protected:
virtual const int *getCompressionMethods(int method, int level) const override; virtual const int *getCompressionMethods(int method, int level) const override;
@@ -123,7 +123,7 @@ protected:
virtual void PackLinuxElf32help1(InputFile *f); virtual void PackLinuxElf32help1(InputFile *f);
virtual int checkEhdr(Elf32_Ehdr const *ehdr) const; virtual int checkEhdr(Elf32_Ehdr const *ehdr) const;
virtual bool canPack() override; virtual bool canPack() override;
virtual int canUnpack() override; // really 'bool' virtual int canUnpack() override; // bool, except -1: format known, but not packed
// These ARM routines are essentially common to big/little endian, // These ARM routines are essentially common to big/little endian,
// but the class hierarchy splits after this class. // but the class hierarchy splits after this class.
@@ -266,7 +266,7 @@ 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() override; virtual bool canPack() override;
virtual int canUnpack() override; // really 'bool' virtual int canUnpack() override; // bool, except -1: format known, but not packed
virtual void pack1(OutputFile *, Filter &) override; // generate executable header virtual void pack1(OutputFile *, Filter &) override; // generate executable header
virtual void asl_pack2_Shdrs(OutputFile *); // AndroidSharedLibrary processes Shdrs virtual void asl_pack2_Shdrs(OutputFile *); // AndroidSharedLibrary processes Shdrs
@@ -559,7 +559,7 @@ public:
virtual const char *getName() const override { return "linux/i386"; } virtual const char *getName() const override { return "linux/i386"; }
virtual const char *getFullName(const options_t *) const override { return "i386-linux.elf"; } virtual const char *getFullName(const options_t *) const override { return "i386-linux.elf"; }
virtual const int *getFilters() const override; virtual const int *getFilters() const override;
virtual int canUnpack() override; // reallly 'bool' virtual int canUnpack() override; // bool, except -1: format known, but not packed
protected: protected:
virtual void pack1(OutputFile *, Filter &) override; // generate executable header virtual void pack1(OutputFile *, Filter &) override; // generate executable header
+1 -1
View File
@@ -111,7 +111,7 @@ __packed_struct(Mach_command) // generic prefix
Word data[2]; // because cmdsize >= 16 Word data[2]; // because cmdsize >= 16
#define WANT_MACH_SEGMENT_ENUM 1 #define WANT_MACH_SEGMENT_ENUM 1
#include "p_mach_enum.h" #include "p_mach_enum.h"
__packed_struct_end(); __packed_struct_end()
template <class TMachITypes> template <class TMachITypes>
__packed_struct(Mach_segment_command) __packed_struct(Mach_segment_command)
+1 -1
View File
@@ -151,7 +151,7 @@ bool PackPs1::readBkupHeader()
return true; return true;
} }
#define INIT_BH_BKUP(p, l) {(p)->id = '1'; (p)->len = l;} #define INIT_BH_BKUP(p, l) ACC_BLOCK_BEGIN {(p)->id = '1'; (p)->len = l;} ACC_BLOCK_END
#define ADLER16(a) (((a) >> 16) ^ ((a) & 0xffff)) #define ADLER16(a) (((a) >> 16) ^ ((a) & 0xffff))
void PackPs1::putBkupHeader(const unsigned char *src, unsigned char *dst, unsigned *len) void PackPs1::putBkupHeader(const unsigned char *src, unsigned char *dst, unsigned *len)
+1 -1
View File
@@ -46,7 +46,7 @@ static const
PackTmt::PackTmt(InputFile *f) : super(f) PackTmt::PackTmt(InputFile *f) : super(f)
{ {
bele = &N_BELE_RTP::le_policy; bele = &N_BELE_RTP::le_policy;
COMPILE_TIME_ASSERT(sizeof(tmt_header_t) == 44); COMPILE_TIME_ASSERT(sizeof(tmt_header_t) == 44)
} }
+1 -1
View File
@@ -46,7 +46,7 @@ static const CLANG_FORMAT_DUMMY_STATEMENT
PackTos::PackTos(InputFile *f) : super(f) { PackTos::PackTos(InputFile *f) : super(f) {
bele = &N_BELE_RTP::be_policy; bele = &N_BELE_RTP::be_policy;
COMPILE_TIME_ASSERT(FH_SIZE == 28); COMPILE_TIME_ASSERT(FH_SIZE == 28)
COMPILE_TIME_ASSERT_ALIGNED1(tos_header_t) COMPILE_TIME_ASSERT_ALIGNED1(tos_header_t)
} }
+5 -5
View File
@@ -49,11 +49,11 @@
PackUnix::PackUnix(InputFile *f) : PackUnix::PackUnix(InputFile *f) :
super(f), exetype(0), blocksize(0), overlay_offset(0), lsize(0) super(f), exetype(0), blocksize(0), overlay_offset(0), lsize(0)
{ {
COMPILE_TIME_ASSERT(sizeof(Elf32_Ehdr) == 52); COMPILE_TIME_ASSERT(sizeof(Elf32_Ehdr) == 52)
COMPILE_TIME_ASSERT(sizeof(Elf32_Phdr) == 32); COMPILE_TIME_ASSERT(sizeof(Elf32_Phdr) == 32)
COMPILE_TIME_ASSERT(sizeof(b_info) == 12); COMPILE_TIME_ASSERT(sizeof(b_info) == 12)
COMPILE_TIME_ASSERT(sizeof(l_info) == 12); COMPILE_TIME_ASSERT(sizeof(l_info) == 12)
COMPILE_TIME_ASSERT(sizeof(p_info) == 12); COMPILE_TIME_ASSERT(sizeof(p_info) == 12)
} }
+1 -1
View File
@@ -49,7 +49,7 @@ public:
virtual void unpack(OutputFile *fo) override; virtual void unpack(OutputFile *fo) override;
virtual bool canPack() override; virtual bool canPack() override;
virtual int canUnpack() override; // really 'bool' virtual int canUnpack() override; // bool, except -1: format known, but not packed
int find_overlay_offset(MemBuffer const &buf); int find_overlay_offset(MemBuffer const &buf);
protected: protected:
+6 -7
View File
@@ -108,16 +108,16 @@ typename T::Shdr const *PackVmlinuxBase<T>::getElfSections()
if (ehdri.e_shentsize != sizeof(*shdri) if (ehdri.e_shentsize != sizeof(*shdri)
|| file_size_u < ehdri.e_shoff || file_size_u < ehdri.e_shoff
|| file_size_u < ehdri.e_shoff + mem_size(ehdri.e_shentsize, e_shnum)) { || file_size_u < ehdri.e_shoff + mem_size(ehdri.e_shentsize, e_shnum)) {
throwCantPack("bad ElfXX_Shdrs"); infoWarning("bad ElfXX_Shdrs");
return nullptr;
} }
shdri = new Shdr[(unsigned) e_shnum]; shdri = new Shdr[(unsigned) e_shnum];
fi->seek(ehdri.e_shoff, SEEK_SET); fi->seek(ehdri.e_shoff, SEEK_SET);
fi->readx(shdri, e_shnum * sizeof(*shdri)); fi->readx(shdri, e_shnum * sizeof(*shdri));
unsigned const e_shstrndx = ehdri.e_shstrndx; unsigned const e_shstrndx = ehdri.e_shstrndx;
if (e_shnum <= e_shstrndx) { if (e_shnum <= e_shstrndx) {
char msg[50]; snprintf(msg, sizeof(msg), infoWarning("bad .e_shstrndx %#x", e_shstrndx);
"bad .e_shstrndx %#x", e_shstrndx); return nullptr;
throwCantPack(msg);
} }
Shdr const *p = &shdri[e_shstrndx]; Shdr const *p = &shdri[e_shstrndx];
if (Shdr::SHT_STRTAB==p->sh_type if (Shdr::SHT_STRTAB==p->sh_type
@@ -128,9 +128,8 @@ typename T::Shdr const *PackVmlinuxBase<T>::getElfSections()
// 10 == (1+ strlen(".shstrtab")) // 10 == (1+ strlen(".shstrtab"))
) { ) {
if (p->sh_size <= p->sh_name) { if (p->sh_size <= p->sh_name) {
char msg[50]; snprintf(msg, sizeof(msg), infoWarning("bad .shstrtab _Shdr[%u]", (unsigned)ehdri.e_shstrndx);
"bad .shstrtab _Shdr[%u]", (unsigned)ehdri.e_shstrndx); return nullptr;
throwCantPack(msg);
} }
shstrtab = new char[1+ p->sh_size]; shstrtab = new char[1+ p->sh_size];
fi->seek(p->sh_offset, SEEK_SET); fi->seek(p->sh_offset, SEEK_SET);
+1 -1
View File
@@ -56,7 +56,7 @@ PackVmlinuzI386::PackVmlinuzI386(InputFile *f) :
, filter_len(0) , filter_len(0)
{ {
bele = &N_BELE_RTP::le_policy; bele = &N_BELE_RTP::le_policy;
COMPILE_TIME_ASSERT(sizeof(boot_sect_t) == 0x250); COMPILE_TIME_ASSERT(sizeof(boot_sect_t) == 0x250)
} }
+2 -4
View File
@@ -155,12 +155,10 @@ protected:
public: public:
// canPack() should throw a cantPackException eplaining why it // canPack() should throw a cantPackException eplaining why it
// cannot pack a recognized format. // cannot pack a recognized format.
// canUnpack() can return -1 meaning "format recognized, but file
// is definitely not packed" (see packmast.cpp).
virtual bool canPack() = 0; virtual bool canPack() = 0;
// canUnpack() can return -1 meaning "format recognized, but file
// is definitely not packed". See packmast.cpp try_unpack().
virtual int canUnpack() = 0; virtual int canUnpack() = 0;
virtual int canTest() { return canUnpack(); }
virtual int canList() { return canUnpack(); }
protected: protected:
// main compression drivers // main compression drivers
+1 -3
View File
@@ -217,10 +217,8 @@ Packer *PackMaster::visitAllPackers(visit_func_t func, InputFile *f, const optio
D(PackSys); D(PackSys);
D(PackCom); D(PackCom);
// Mach (MacOS X PowerPC) // Mach (macOS)
D(PackDylibAMD64); D(PackDylibAMD64);
D(PackMachPPC32);
D(PackMachPPC64);
D(PackMachI386); D(PackMachI386);
D(PackMachAMD64); D(PackMachAMD64);
D(PackMachARMEL); D(PackMachARMEL);
+16 -15
View File
@@ -873,7 +873,7 @@ void PeFile::addStubImports()
void PeFile::processImports2(unsigned myimport, unsigned) // pass 2 void PeFile::processImports2(unsigned myimport, unsigned) // pass 2
{ {
COMPILE_TIME_ASSERT(sizeof(import_desc) == 20); COMPILE_TIME_ASSERT(sizeof(import_desc) == 20)
if (!ilinker) if (!ilinker)
return; return;
@@ -1386,11 +1386,12 @@ void PeFile::processTls1(Interval *iv,
// ... and those dwords should be correctly aligned // ... and those dwords should be correctly aligned
if (use_tls_callbacks) if (use_tls_callbacks)
sotls = ALIGN_UP(sotls, cb_size) + 2 * cb_size; sotls = ALIGN_UP(sotls, cb_size) + 2 * cb_size;
const unsigned aligned_sotls = ALIGN_UP(sotls, (unsigned)sizeof(LEXX));
// the PE loader wants this stuff uncompressed // the PE loader wants this stuff uncompressed
mb_otls.alloc(sotls); mb_otls.alloc(aligned_sotls);
mb_otls.clear(); mb_otls.clear();
otls = mb_otls; // => SPAN_S otls = mb_otls; // => otls now is a SPAN_S
unsigned const take1 = sizeof(tls); unsigned const take1 = sizeof(tls);
unsigned const skip1 = IDADDR(PEDIR_TLS); unsigned const skip1 = IDADDR(PEDIR_TLS);
memcpy(otls,ibuf.subref("bad tls %#x", skip1, take1), take1); memcpy(otls,ibuf.subref("bad tls %#x", skip1, take1), take1);
@@ -2599,7 +2600,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh,
callProcessRelocs(rel, ic); callProcessRelocs(rel, ic);
// when the resource is put alone into section 3 // when the resource is put alone into section 3
const unsigned res_start = (ic + oam1) &~ oam1;; const unsigned res_start = (ic + oam1) &~ oam1;
if (last_section_rsrc_only) if (last_section_rsrc_only)
callProcessResources(res, ic = res_start); callProcessResources(res, ic = res_start);
@@ -2784,7 +2785,7 @@ void PeFile::rebuildRelocs(SPAN_S(upx_byte) & extrainfo, unsigned bits,
if (ODSIZE(PEDIR_RELOC) == 8) // some tricky dlls use this if (ODSIZE(PEDIR_RELOC) == 8) // some tricky dlls use this
{ {
omemcpy(obuf + ODADDR(PEDIR_RELOC) - rvamin, "\x0\x0\x0\x0\x8\x0\x0\x0", 8); omemcpy(obuf + (ODADDR(PEDIR_RELOC) - rvamin), "\x0\x0\x0\x0\x8\x0\x0\x0", 8);
return; return;
} }
@@ -2830,7 +2831,7 @@ void PeFile::rebuildRelocs(SPAN_S(upx_byte) & extrainfo, unsigned bits,
} }
rel.finish (oxrelocs,soxrelocs); rel.finish (oxrelocs,soxrelocs);
omemcpy(obuf + ODADDR(PEDIR_RELOC) - rvamin,oxrelocs,soxrelocs); omemcpy(obuf + (ODADDR(PEDIR_RELOC) - rvamin), oxrelocs, soxrelocs);
delete [] oxrelocs; oxrelocs = nullptr; delete [] oxrelocs; oxrelocs = nullptr;
mb_wrkmem.dealloc(); mb_wrkmem.dealloc();
@@ -2846,7 +2847,7 @@ void PeFile::rebuildExports()
Export xport((char*)(unsigned char*) ibuf - isection[2].vaddr); Export xport((char*)(unsigned char*) ibuf - isection[2].vaddr);
processExports(&xport); processExports(&xport);
processExports(&xport,ODADDR(PEDIR_EXPORT)); processExports(&xport,ODADDR(PEDIR_EXPORT));
omemcpy(obuf + ODADDR(PEDIR_EXPORT) - rvamin, oexport, soexport); omemcpy(obuf + (ODADDR(PEDIR_EXPORT) - rvamin), oexport, soexport);
} }
void PeFile::rebuildTls() void PeFile::rebuildTls()
@@ -2876,19 +2877,19 @@ void PeFile::rebuildResources(SPAN_S(upx_byte) & extrainfo, unsigned lastvaddr)
ICHECK(r + res.offs() - 4, 4); ICHECK(r + res.offs() - 4, 4);
unsigned origoffs = get_le32(r + res.offs() - 4); unsigned origoffs = get_le32(r + res.offs() - 4);
res.newoffs() = origoffs; res.newoffs() = origoffs;
omemcpy(obuf + origoffs - rvamin,r + res.offs(),res.size()); omemcpy(obuf + (origoffs - rvamin), r + res.offs(), res.size());
if (icondir_count && res.itype() == RT_GROUP_ICON) if (icondir_count && res.itype() == RT_GROUP_ICON)
{ {
set_le16(obuf + origoffs - rvamin + 4,icondir_count); set_le16(obuf + (origoffs - rvamin + 4), icondir_count);
icondir_count = 0; icondir_count = 0;
} }
} }
if (res.dirsize()) { if (res.dirsize()) {
upx_byte *p = res.build(); upx_byte *p = res.build();
OCHECK(obuf + ODADDR(PEDIR_RESOURCE) - rvamin, 16); OCHECK(obuf + (ODADDR(PEDIR_RESOURCE) - rvamin), 16);
// write back when the original is zeroed // write back when the original is zeroed
if (get_le32(obuf + ODADDR(PEDIR_RESOURCE) - rvamin + 12) == 0) if (get_le32(obuf + (ODADDR(PEDIR_RESOURCE) - rvamin + 12)) == 0)
omemcpy(obuf + ODADDR(PEDIR_RESOURCE) - rvamin, p, res.dirsize()); omemcpy(obuf + (ODADDR(PEDIR_RESOURCE) - rvamin), p, res.dirsize());
} }
} }
@@ -3066,8 +3067,8 @@ void PeFile::unpack0(OutputFile *fo, const ht &ih, ht &oh,
Filter ft(ph.level); Filter ft(ph.level);
ft.init(ph.filter,oh.codebase - rvamin); ft.init(ph.filter,oh.codebase - rvamin);
ft.cto = (unsigned char) ph.filter_cto; ft.cto = (unsigned char) ph.filter_cto;
OCHECK(obuf + oh.codebase - rvamin, oh.codesize); OCHECK(obuf + (oh.codebase - rvamin), oh.codesize);
ft.unfilter(obuf + oh.codebase - rvamin, oh.codesize); ft.unfilter(obuf + (oh.codebase - rvamin), oh.codesize);
} }
// FIXME: ih.flags is checked here because of a bug in UPX 0.92 // FIXME: ih.flags is checked here because of a bug in UPX 0.92
@@ -3127,7 +3128,7 @@ void PeFile::unpack0(OutputFile *fo, const ht &ih, ht &oh,
fo->write(ibuf,osection[ic].rawdataptr - fo->getBytesWritten()); fo->write(ibuf,osection[ic].rawdataptr - fo->getBytesWritten());
for (ic = 0; ic < objs; ic++) for (ic = 0; ic < objs; ic++)
if (osection[ic].rawdataptr) if (osection[ic].rawdataptr)
fo->write(obuf + osection[ic].vaddr - rvamin,ALIGN_UP(osection[ic].size,oh.filealign)); fo->write(obuf + (osection[ic].vaddr - rvamin), ALIGN_UP(osection[ic].size,oh.filealign));
copyOverlay(fo, overlay, obuf); copyOverlay(fo, overlay, obuf);
} }
ibuf.dealloc(); ibuf.dealloc();
+65 -63
View File
@@ -1,5 +1,5 @@
/* amd64-linux.elf-fold.h /* amd64-linux.elf-fold.h
created from amd64-linux.elf-fold.bin, 2351 (0x92f) bytes created from amd64-linux.elf-fold.bin, 2374 (0x946) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@@ -31,20 +31,20 @@
*/ */
#define STUB_AMD64_LINUX_ELF_FOLD_SIZE 2351 #define STUB_AMD64_LINUX_ELF_FOLD_SIZE 2374
#define STUB_AMD64_LINUX_ELF_FOLD_ADLER32 0x9080724c #define STUB_AMD64_LINUX_ELF_FOLD_ADLER32 0x003c800b
#define STUB_AMD64_LINUX_ELF_FOLD_CRC32 0xf093d1bc #define STUB_AMD64_LINUX_ELF_FOLD_CRC32 0xfde01b27
unsigned char stub_amd64_linux_elf_fold[2351] = { unsigned char stub_amd64_linux_elf_fold[2374] = {
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 2, 0, 62, 0, 1, 0, 0, 0,188, 0, 16, 0, 0, 0, 0, 0, /* 0x0010 */ 2, 0, 62, 0, 1, 0, 0, 0,188, 0, 16, 0, 0, 0, 0, 0,
/* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0030 */ 0, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0, /* 0x0030 */ 0, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0,
/* 0x0040 */ 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0040 */ 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, /* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
/* 0x0060 */ 47, 9, 0, 0, 0, 0, 0, 0, 48, 9, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 70, 9, 0, 0, 0, 0, 0, 0, 72, 9, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 0, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, /* 0x0070 */ 0, 0, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
/* 0x0080 */ 47, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0080 */ 70, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0090 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0090 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x00a0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, /* 0x00a0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
/* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 74, 0, 0, /* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 74, 0, 0,
@@ -65,7 +65,7 @@ unsigned char stub_amd64_linux_elf_fold[2351] = {
/* 0x01a0 */ 239, 8, 73,141,119,248, 72,193,233, 3,243, 72,165, 72,141,103, /* 0x01a0 */ 239, 8, 73,141,119,248, 72,193,233, 3,243, 72,165, 72,141,103,
/* 0x01b0 */ 8,252, 75,141, 12, 38,139, 67,252,131,224, 1, 72, 1,193, 65, /* 0x01b0 */ 8,252, 75,141, 12, 38,139, 67,252,131,224, 1, 72, 1,193, 65,
/* 0x01c0 */ 89, 94, 95, 88, 72,129,236, 0, 8, 0, 0, 72,137,226, 80, 73, /* 0x01c0 */ 89, 94, 95, 88, 72,129,236, 0, 8, 0, 0, 72,137,226, 80, 73,
/* 0x01d0 */ 137,197, 73,137,232,232, 13, 6, 0, 0, 72,129,196, 8, 8, 0, /* 0x01d0 */ 137,197, 73,137,232,232, 36, 6, 0, 0, 72,129,196, 8, 8, 0,
/* 0x01e0 */ 0, 72,137, 68, 36, 32, 91, 73,139,181,160, 0, 0, 0, 76,137, /* 0x01e0 */ 0, 72,137, 68, 36, 32, 91, 73,139,181,160, 0, 0, 0, 76,137,
/* 0x01f0 */ 239,232, 79, 0, 0, 0, 77, 41,201, 65,137,216,106, 2, 89,106, /* 0x01f0 */ 239,232, 79, 0, 0, 0, 77, 41,201, 65,137,216,106, 2, 89,106,
/* 0x0200 */ 1, 90,190, 0, 16, 0, 0, 41,255,232, 16, 0, 0, 0,137,223, /* 0x0200 */ 1, 90,190, 0, 16, 0, 0, 41,255,232, 16, 0, 0, 0,137,223,
@@ -118,10 +118,10 @@ unsigned char stub_amd64_linux_elf_fold[2351] = {
/* 0x04f0 */ 69,200, 69, 49,201, 65,131,200,255, 49,210, 72,137,222,232, 27, /* 0x04f0 */ 69,200, 69, 49,201, 65,131,200,255, 49,210, 72,137,222,232, 27,
/* 0x0500 */ 253,255,255, 72,137,199, 72,141, 4, 3, 73,137,254, 72,137, 68, /* 0x0500 */ 253,255,255, 72,137,199, 72,141, 4, 3, 73,137,254, 72,137, 68,
/* 0x0510 */ 36, 72, 73, 41,238,102, 65,131,127, 56, 0,199, 68, 36, 28, 0, /* 0x0510 */ 36, 72, 73, 41,238,102, 65,131,127, 56, 0,199, 68, 36, 28, 0,
/* 0x0520 */ 0, 0, 0, 15,132,157, 2, 0, 0, 72,131,124, 36, 64, 0,116, /* 0x0520 */ 0, 0, 0, 15,132,180, 2, 0, 0, 72,131,124, 36, 64, 0,116,
/* 0x0530 */ 35, 65,131, 60, 36, 6,117, 28, 73,139, 84, 36, 16, 72,139,124, /* 0x0530 */ 35, 65,131, 60, 36, 6,117, 28, 73,139, 84, 36, 16, 72,139,124,
/* 0x0540 */ 36, 48,190, 3, 0, 0, 0, 76, 1,242,232, 82,254,255,255,233, /* 0x0540 */ 36, 48,190, 3, 0, 0, 0, 76, 1,242,232, 82,254,255,255,233,
/* 0x0550 */ 91, 2, 0, 0, 65,131, 60, 36, 1, 15,133, 80, 2, 0, 0, 65, /* 0x0550 */ 114, 2, 0, 0, 65,131, 60, 36, 1, 15,133,103, 2, 0, 0, 65,
/* 0x0560 */ 139, 76, 36, 4,199, 68, 36, 24, 64, 98, 81,115,131,225, 7,193, /* 0x0560 */ 139, 76, 36, 4,199, 68, 36, 24, 64, 98, 81,115,131,225, 7,193,
/* 0x0570 */ 225, 2,211,108, 36, 24,131,100, 36, 24, 7, 72,131,124, 36, 64, /* 0x0570 */ 225, 2,211,108, 36, 24,131,100, 36, 24, 7, 72,131,124, 36, 64,
/* 0x0580 */ 0,116, 75, 73,131,124, 36, 8, 0,117, 67, 73,139, 84, 36, 16, /* 0x0580 */ 0,116, 75, 73,131,124, 36, 8, 0,117, 67, 73,139, 84, 36, 16,
@@ -130,57 +130,59 @@ unsigned char stub_amd64_linux_elf_fold[2351] = {
/* 0x05b0 */ 190, 5, 0, 0, 0,232,231,253,255,255, 73, 15,183, 87, 54, 72, /* 0x05b0 */ 190, 5, 0, 0, 0,232,231,253,255,255, 73, 15,183, 87, 54, 72,
/* 0x05c0 */ 139,124, 36, 48,190, 4, 0, 0, 0,232,211,253,255,255, 73,139, /* 0x05c0 */ 139,124, 36, 48,190, 4, 0, 0, 0,232,211,253,255,255, 73,139,
/* 0x05d0 */ 124, 36, 16, 73,139, 68, 36, 40,185, 50, 0, 0, 0, 73,139,116, /* 0x05d0 */ 124, 36, 16, 73,139, 68, 36, 40,185, 50, 0, 0, 0, 73,139,116,
/* 0x05e0 */ 36, 32, 77,139, 76, 36, 8, 76, 1,247, 72, 1,248, 72,137,253, /* 0x05e0 */ 36, 32, 76, 1,247, 72, 1,248, 72,137,250, 72,137,253,129,226,
/* 0x05f0 */ 72,137,116, 36, 16, 72,137, 68, 36, 8, 72,137,248, 72,137,116, /* 0x05f0 */ 255, 15, 0, 0, 72,137, 68, 36, 8, 72,137,240, 72, 1,208, 72,
/* 0x0600 */ 36, 80, 37,255, 15, 0, 0, 72, 1, 68, 36, 16, 72,137,124, 36, /* 0x0600 */ 41,213, 72,137,116, 36, 80, 72,137, 68, 36, 16,139, 68, 36, 24,
/* 0x0610 */ 88, 72, 41,197, 73, 41,193,131,200,255, 72,131,124, 36, 64, 0, /* 0x0610 */ 76,141, 44, 55,139,116, 36, 24, 72,137,124, 36, 88,131,200, 2,
/* 0x0620 */ 76,141, 44, 55,117, 6,139, 68, 36, 60,177, 18,139, 84, 36, 24, /* 0x0620 */ 72,131,124, 36, 64, 0, 15, 69,240,137,240,131,224,251, 72,131,
/* 0x0630 */ 72,139,116, 36, 16, 65,137,192, 72,137,239,131,202, 2, 72,131, /* 0x0630 */ 124, 36, 64, 0, 15, 69,240, 73,139, 68, 36, 8, 72, 41,208,131,
/* 0x0640 */ 124, 36, 64, 0, 15, 68, 84, 36, 24,232,208,251,255,255, 72, 57, /* 0x0640 */ 202,255, 72,131,124, 36, 64, 0,117, 6,139, 84, 36, 60,177, 18,
/* 0x0650 */ 197, 15,133, 32, 1, 0, 0, 72,131,124, 36, 64, 0,116, 25, 72, /* 0x0650 */ 65,137,208,137,242, 72,139,116, 36, 16, 73,137,193, 72,137,239,
/* 0x0660 */ 139, 76, 36, 32, 72,139, 84, 36, 40, 72,141,116, 36, 80, 72,139, /* 0x0660 */ 232,185,251,255,255, 72, 57,197, 15,133, 32, 1, 0, 0, 72,131,
/* 0x0670 */ 124, 36, 64,232, 24,252,255,255,246, 68, 36, 24, 2,116, 22, 68, /* 0x0670 */ 124, 36, 64, 0,116, 25, 72,139, 76, 36, 32, 72,139, 84, 36, 40,
/* 0x0680 */ 137,233, 76,137,239, 49,192,247,217,252,129,225,255, 15, 0, 0, /* 0x0680 */ 72,141,116, 36, 80, 72,139,124, 36, 64,232, 1,252,255,255,246,
/* 0x0690 */ 243,170, 73,137,253, 72,131,124, 36, 64, 0, 15,132,224, 0, 0, /* 0x0690 */ 68, 36, 24, 2,116, 22, 68,137,233, 76,137,239, 49,192,247,217,
/* 0x06a0 */ 0,199, 68, 36, 4, 0, 0, 0, 0, 72,184,255,255,255,255, 1, /* 0x06a0 */ 252,129,225,255, 15, 0, 0,243,170, 73,137,253, 72,131,124, 36,
/* 0x06b0 */ 0, 0, 0, 73, 35, 4, 36, 72,186, 1, 0, 0, 0, 1, 0, 0, /* 0x06b0 */ 64, 0, 15,132,224, 0, 0, 0,199, 68, 36, 4, 0, 0, 0, 0,
/* 0x06c0 */ 0, 72, 57,208, 15,133,152, 0, 0, 0, 73,139, 84, 36, 40, 73, /* 0x06c0 */ 72,184,255,255,255,255, 1, 0, 0, 0, 73, 35, 4, 36, 72,186,
/* 0x06d0 */ 139, 76, 36, 16, 73, 59, 84, 36, 32, 72,141, 4, 10, 74,141, 28, /* 0x06d0 */ 1, 0, 0, 0, 1, 0, 0, 0, 72, 57,208, 15,133,152, 0, 0,
/* 0x06e0 */ 48,117, 14,137,216,247,216, 37,255, 15, 0, 0,131,248, 3,119, /* 0x06e0 */ 0, 73,139, 84, 36, 40, 73,139, 76, 36, 16, 73, 59, 84, 36, 32,
/* 0x06f0 */ 58, 73,131,124, 36, 8, 0, 74,141, 92, 49, 12,116, 45, 69, 49, /* 0x06f0 */ 72,141, 4, 10, 74,141, 28, 48,117, 14,137,216,247,216, 37,255,
/* 0x0700 */ 201, 65,131,200,255, 49,255,185, 34, 0, 0, 0,186, 3, 0, 0, /* 0x0700 */ 15, 0, 0,131,248, 3,119, 58, 73,131,124, 36, 8, 0, 74,141,
/* 0x0710 */ 0,190, 0, 16, 0, 0,199, 68, 36, 4, 1, 0, 0, 0,232,251, /* 0x0710 */ 92, 49, 12,116, 45, 69, 49,201, 65,131,200,255, 49,255,185, 34,
/* 0x0720 */ 250,255,255, 72,133,192, 72,137,195,116, 55,131,124, 36, 4, 0, /* 0x0720 */ 0, 0, 0,186, 3, 0, 0, 0,190, 0, 16, 0, 0,199, 68, 36,
/* 0x0730 */ 199, 3, 15, 5, 90,195,116, 18,186, 5, 0, 0, 0,190, 4, 0, /* 0x0730 */ 4, 1, 0, 0, 0,232,228,250,255,255, 72,133,192, 72,137,195,
/* 0x0740 */ 0, 0, 72,137,223,232,255,250,255,255, 72,133,219,116, 19, 72, /* 0x0740 */ 116, 55,131,124, 36, 4, 0,199, 3, 15, 5, 90,195,116, 18,186,
/* 0x0750 */ 139,124, 36, 48, 72,137,218, 49,246, 72,131,231,254,232, 63,252, /* 0x0750 */ 5, 0, 0, 0,190, 4, 0, 0, 0, 72,137,223,232,232,250,255,
/* 0x0760 */ 255,255,139, 84, 36, 24, 72,139,116, 36, 16, 72,137,239,232,214, /* 0x0760 */ 255, 72,133,219,116, 19, 72,139,124, 36, 48, 72,137,218, 49,246,
/* 0x0770 */ 250,255,255,133,192,116, 10,191,127, 0, 0, 0,232,180,250,255, /* 0x0770 */ 72,131,231,254,232, 40,252,255,255,139, 84, 36, 24, 72,139,116,
/* 0x0780 */ 255, 76, 59,108, 36, 8,115, 39, 76, 41,108, 36, 8,139, 84, 36, /* 0x0780 */ 36, 16, 72,137,239,232,191,250,255,255,133,192,116, 10,191,127,
/* 0x0790 */ 24, 69, 49,201, 72,139,116, 36, 8, 65,131,200,255,185, 50, 0, /* 0x0790 */ 0, 0, 0,232,157,250,255,255, 76, 59,108, 36, 8,115, 39, 76,
/* 0x07a0 */ 0, 0, 76,137,239,232,116,250,255,255, 73, 57,197,117,200,255, /* 0x07a0 */ 41,108, 36, 8,139, 84, 36, 24, 69, 49,201, 72,139,116, 36, 8,
/* 0x07b0 */ 68, 36, 28, 65, 15,183, 71, 56, 73,131,196, 56, 57, 68, 36, 28, /* 0x07b0 */ 65,131,200,255,185, 50, 0, 0, 0, 76,137,239,232, 93,250,255,
/* 0x07c0 */ 15,140, 99,253,255,255, 72,139,132, 36,160, 0, 0, 0, 76,137, /* 0x07c0 */ 255, 73, 57,197,117,200,255, 68, 36, 28, 65, 15,183, 71, 56, 73,
/* 0x07d0 */ 48, 77, 3,119, 24, 72,131,196,104, 91, 93, 65, 92, 65, 93, 76, /* 0x07d0 */ 131,196, 56, 57, 68, 36, 28, 15,140, 76,253,255,255, 72,139,132,
/* 0x07e0 */ 137,240, 65, 94, 65, 95,195, 65, 87, 65, 86, 73,137,206, 49,201, /* 0x07e0 */ 36,160, 0, 0, 0, 76,137, 48, 77, 3,119, 24, 72,131,196,104,
/* 0x07f0 */ 65, 85, 65, 84, 77,137,204, 85, 72,137,213, 76,141,109, 64, 83, /* 0x07f0 */ 91, 93, 65, 92, 65, 93, 76,137,240, 65, 94, 65, 95,195, 65, 87,
/* 0x0800 */ 76,137,195, 72,131,236, 72,139, 7, 72,137,124, 36, 24, 72,137, /* 0x0800 */ 65, 86, 73,137,206, 49,201, 65, 85, 65, 84, 77,137,204, 85, 72,
/* 0x0810 */ 124, 36, 40, 76,141,188, 36,128, 0, 0, 0, 72,137,116, 36, 32, /* 0x0810 */ 137,213, 76,141,109, 64, 83, 76,137,195, 72,131,236, 72,139, 7,
/* 0x0820 */ 72,141,116, 36, 48, 72,137, 84, 36, 56, 76,137,194, 72,137, 68, /* 0x0820 */ 72,137,124, 36, 24, 72,137,124, 36, 40, 76,141,188, 36,128, 0,
/* 0x0830 */ 36, 48,139, 71, 4, 72,141,124, 36, 16, 72,131,192, 12, 72,137, /* 0x0830 */ 0, 0, 72,137,116, 36, 32, 72,141,116, 36, 48, 72,137, 84, 36,
/* 0x0840 */ 68, 36, 16,232, 72,250,255,255, 65, 83, 77,137,225, 49,210, 73, /* 0x0840 */ 56, 76,137,194, 72,137, 68, 36, 48,139, 71, 4, 72,141,124, 36,
/* 0x0850 */ 137,216, 76,137,241, 72,137,239, 72,141,116, 36, 40, 65, 87,232, /* 0x0850 */ 16, 72,131,192, 12, 72,137, 68, 36, 16,232, 49,250,255,255, 65,
/* 0x0860 */ 124,251,255,255,190, 9, 0, 0, 0, 72,137,194, 76,137,247, 73, /* 0x0860 */ 83, 77,137,225, 49,210, 73,137,216, 76,137,241, 72,137,239, 72,
/* 0x0870 */ 137,196,232, 42,251,255,255, 65, 89, 65, 90,102,131,125, 56, 0, /* 0x0870 */ 141,116, 36, 40, 65, 87,232,101,251,255,255,190, 9, 0, 0, 0,
/* 0x0880 */ 199, 68, 36, 12, 0, 0, 0, 0, 15,132,143, 0, 0, 0, 65,131, /* 0x0880 */ 72,137,194, 76,137,247, 73,137,196,232, 19,251,255,255, 65, 89,
/* 0x0890 */ 125, 0, 3,117,114, 73,139, 63, 73, 3,125, 16, 49,210, 49,246, /* 0x0890 */ 65, 90,102,131,125, 56, 0,199, 68, 36, 12, 0, 0, 0, 0, 15,
/* 0x08a0 */ 232,156,249,255,255,133,192,137,195,120, 23,186, 0, 4, 0, 0, /* 0x08a0 */ 132,143, 0, 0, 0, 65,131,125, 0, 3,117,114, 73,139, 63, 73,
/* 0x08b0 */ 72,137,238,137,199,232,151,249,255,255, 72, 61, 0, 4, 0, 0, /* 0x08b0 */ 3,125, 16, 49,210, 49,246,232,133,249,255,255,133,192,137,195,
/* 0x08c0 */ 116, 10,191,127, 0, 0, 0,232,105,249,255,255, 73,199, 7, 0, /* 0x08c0 */ 120, 23,186, 0, 4, 0, 0, 72,137,238,137,199,232,128,249,255,
/* 0x08d0 */ 0, 0, 0, 65, 80, 69, 49,201, 69, 49,192, 49,201, 65, 87,137, /* 0x08d0 */ 255, 72, 61, 0, 4, 0, 0,116, 10,191,127, 0, 0, 0,232, 82,
/* 0x08e0 */ 218, 49,246, 72,137,239,232,245,250,255,255, 73,139, 23,190, 7, /* 0x08e0 */ 249,255,255, 73,199, 7, 0, 0, 0, 0, 65, 80, 69, 49,201, 69,
/* 0x08f0 */ 0, 0, 0, 76,137,247, 73,137,196,232,163,250,255,255,137,223, /* 0x08f0 */ 49,192, 49,201, 65, 87,137,218, 49,246, 72,137,239,232,222,250,
/* 0x0900 */ 232, 56,249,255,255, 94, 95,255, 68, 36, 12, 15,183, 69, 56, 73, /* 0x0900 */ 255,255, 73,139, 23,190, 7, 0, 0, 0, 76,137,247, 73,137,196,
/* 0x0910 */ 131,197, 56, 57, 68, 36, 12, 15,130,113,255,255,255, 72,131,196, /* 0x0910 */ 232,140,250,255,255,137,223,232, 33,249,255,255, 94, 95,255, 68,
/* 0x0920 */ 72, 76,137,224, 91, 93, 65, 92, 65, 93, 65, 94, 65, 95,195 /* 0x0920 */ 36, 12, 15,183, 69, 56, 73,131,197, 56, 57, 68, 36, 12, 15,130,
/* 0x0930 */ 113,255,255,255, 72,131,196, 72, 76,137,224, 91, 93, 65, 92, 65,
/* 0x0940 */ 93, 65, 94, 65, 95,195
}; };
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+78 -77
View File
@@ -1,5 +1,5 @@
/* arm64-linux.elf-fold.h /* arm64-linux.elf-fold.h
created from arm64-linux.elf-fold.bin, 2760 (0xac8) bytes created from arm64-linux.elf-fold.bin, 2776 (0xad8) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@@ -31,20 +31,20 @@
*/ */
#define STUB_ARM64_LINUX_ELF_FOLD_SIZE 2760 #define STUB_ARM64_LINUX_ELF_FOLD_SIZE 2776
#define STUB_ARM64_LINUX_ELF_FOLD_ADLER32 0xc968c426 #define STUB_ARM64_LINUX_ELF_FOLD_ADLER32 0x4a2bc8dc
#define STUB_ARM64_LINUX_ELF_FOLD_CRC32 0xcd2c5a06 #define STUB_ARM64_LINUX_ELF_FOLD_CRC32 0x29e40c30
unsigned char stub_arm64_linux_elf_fold[2760] = { unsigned char stub_arm64_linux_elf_fold[2776] = {
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 2, 0,183, 0, 1, 0, 0, 0,188, 0, 16, 0, 0, 0, 0, 0, /* 0x0010 */ 2, 0,183, 0, 1, 0, 0, 0,188, 0, 16, 0, 0, 0, 0, 0,
/* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0030 */ 0, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0, /* 0x0030 */ 0, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0,
/* 0x0040 */ 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0040 */ 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, /* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
/* 0x0060 */ 200, 10, 0, 0, 0, 0, 0, 0,200, 10, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 216, 10, 0, 0, 0, 0, 0, 0,216, 10, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, /* 0x0070 */ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
/* 0x0080 */ 200, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0080 */ 216, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0090 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0090 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x00a0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* 0x00a0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
/* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,146, /* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,146,
@@ -61,7 +61,7 @@ unsigned char stub_arm64_linux_elf_fold[2760] = {
/* 0x0160 */ 31, 4, 64,177, 66, 0, 0, 84, 95,104, 32, 56,231, 3, 20,170, /* 0x0160 */ 31, 4, 64,177, 66, 0, 0, 84, 95,104, 32, 56,231, 3, 20,170,
/* 0x0170 */ 230, 3, 25,170,255, 3, 40,209, 37, 5, 0, 16,228, 3, 24,170, /* 0x0170 */ 230, 3, 25,170,255, 3, 40,209, 37, 5, 0, 16,228, 3, 24,170,
/* 0x0180 */ 227, 3, 22,170,226, 3, 0,145,225, 3, 29, 42,224, 3, 28,170, /* 0x0180 */ 227, 3, 22,170,226, 3, 0,145,225, 3, 29, 42,224, 3, 28,170,
/* 0x0190 */ 244, 1, 0,148,255, 3, 40,145,248, 3, 0,170, 33, 83, 64,249, /* 0x0190 */ 248, 1, 0,148,255, 3, 40,145,248, 3, 0,170, 33, 83, 64,249,
/* 0x01a0 */ 224, 3, 25,170, 64, 0, 0,148, 5, 0,128,210,228, 3, 21, 42, /* 0x01a0 */ 224, 3, 25,170, 64, 0, 0,148, 5, 0,128,210,228, 3, 21, 42,
/* 0x01b0 */ 67, 0,128, 82, 34, 0,128, 82, 1, 0,130,210, 0, 0,128,210, /* 0x01b0 */ 67, 0,128, 82, 34, 0,128, 82, 1, 0,130,210, 0, 0,128,210,
/* 0x01c0 */ 67, 0, 0,148,224, 3, 21, 42, 46, 0, 0,148,254, 3, 24,170, /* 0x01c0 */ 67, 0, 0,148,224, 3, 21, 42, 46, 0, 0,148,254, 3, 24,170,
@@ -118,17 +118,17 @@ unsigned char stub_arm64_linux_elf_fold[2760] = {
/* 0x04f0 */ 97, 0, 0, 84, 97, 0, 0, 52,250,255,255, 23, 99, 0, 0,180, /* 0x04f0 */ 97, 0, 0, 84, 97, 0, 0, 52,250,255,255, 23, 99, 0, 0,180,
/* 0x0500 */ 0, 64, 0,145,244,255,255, 23,192, 3, 95,214,253,123,181,169, /* 0x0500 */ 0, 64, 0,145,244,255,255, 23,192, 3, 95,214,253,123,181,169,
/* 0x0510 */ 253, 3, 0,145,232, 39, 6,109,201, 0,103,158, 6, 16, 64,249, /* 0x0510 */ 253, 3, 0,145,232, 39, 6,109,201, 0,103,158, 6, 16, 64,249,
/* 0x0520 */ 236, 55, 8,109,245, 91, 2,169,238, 63, 9,109,245, 3, 0,170, /* 0x0520 */ 236, 55, 8,109,245, 91, 2,169,238, 63, 9,109,246, 3, 0,170,
/* 0x0530 */ 234, 47, 7,109,251,115, 5,169, 28, 0, 6,139,246, 3, 1,170, /* 0x0530 */ 234, 47, 7,109,251,115, 5,169, 28, 0, 6,139,245, 3, 1,170,
/* 0x0540 */ 32, 1,102,158,249,107, 4,169,243, 83, 1,169,247, 99, 3,169, /* 0x0540 */ 32, 1,102,158,249,107, 4,169,243, 83, 1,169,247, 99, 3,169,
/* 0x0550 */ 76, 0, 39, 30,250, 3, 3,170,141, 0,103,158,249, 3, 7,170, /* 0x0550 */ 76, 0, 39, 30,250, 3, 3,170,141, 0,103,158,249, 3, 7,170,
/* 0x0560 */ 174, 0,103,158, 2, 0, 64,249,163, 34, 64,121, 65, 2, 0,180, /* 0x0560 */ 174, 0,103,158, 2, 0, 64,249,195, 34, 64,121, 65, 2, 0,180,
/* 0x0570 */ 65, 16, 64,249,127, 8, 0,113, 65, 0, 1,139, 32, 36, 64,249, /* 0x0570 */ 65, 16, 64,249,127, 8, 0,113, 65, 0, 1,139, 32, 36, 64,249,
/* 0x0580 */ 64, 0, 0,203, 65, 0, 0, 84, 32, 8, 64,249, 33, 20, 64,249, /* 0x0580 */ 64, 0, 0,203, 65, 0, 0, 84, 32, 8, 64,249, 33, 20, 64,249,
/* 0x0590 */ 2, 0,128, 82, 67, 6,128, 82, 4, 0,128, 18, 5, 0,128,210, /* 0x0590 */ 2, 0,128, 82, 67, 6,128, 82, 4, 0,128, 18, 5, 0,128,210,
/* 0x05a0 */ 75,255,255,151,161, 34, 64,121, 63, 8, 0,113, 19, 16,159,154, /* 0x05a0 */ 75,255,255,151,193, 34, 64,121, 63, 8, 0,113, 19, 16,159,154,
/* 0x05b0 */ 42, 0, 0, 20,127, 12, 0,113, 3, 2,128, 82, 99, 16,159, 26, /* 0x05b0 */ 42, 0, 0, 20,127, 12, 0,113, 3, 2,128, 82, 99, 16,159, 26,
/* 0x05c0 */ 167,114, 64,121,224, 3, 2,170, 99,136, 0, 17,228, 3, 28,170, /* 0x05c0 */ 199,114, 64,121,224, 3, 2,170, 99,136, 0, 17,228, 3, 28,170,
/* 0x05d0 */ 19, 0,128,146,231, 4, 0, 81,255, 4, 0, 49,160, 1, 0, 84, /* 0x05d0 */ 19, 0,128,146,231, 4, 0, 81,255, 4, 0, 49,160, 1, 0, 84,
/* 0x05e0 */ 133, 0, 64,185,191, 4, 0,113, 1, 1, 0, 84,136, 8, 64,249, /* 0x05e0 */ 133, 0, 64,185,191, 4, 0,113, 1, 1, 0, 84,136, 8, 64,249,
/* 0x05f0 */ 133, 20, 64,249,127, 2, 8,235, 5, 1, 5,139,115,146,136,154, /* 0x05f0 */ 133, 20, 64,249,127, 2, 8,235, 5, 1, 5,139,115,146,136,154,
@@ -139,74 +139,75 @@ unsigned char stub_arm64_linux_elf_fold[2760] = {
/* 0x0640 */ 67, 6,128, 82, 2, 0,128, 82, 4, 0,128, 18, 5, 0,128,210, /* 0x0640 */ 67, 6,128, 82, 2, 0,128, 82, 4, 0,128, 18, 5, 0,128,210,
/* 0x0650 */ 31,255,255,151, 19, 0, 19,203,224, 3, 57, 42,232, 3, 39, 30, /* 0x0650 */ 31,255,255,151, 19, 0, 19,203,224, 3, 57, 42,232, 3, 39, 30,
/* 0x0660 */ 10, 0, 39, 30,224, 3, 57,170, 15, 0,103,158, 1, 1, 38, 30, /* 0x0660 */ 10, 0, 39, 30,224, 3, 57,170, 15, 0,103,158, 1, 1, 38, 30,
/* 0x0670 */ 160,114, 64,121, 63, 0, 0,107,202, 20, 0, 84,128, 3, 64,185, /* 0x0670 */ 192,114, 64,121, 63, 0, 0,107, 74, 21, 0, 84,128, 3, 64,185,
/* 0x0680 */ 54, 1, 0,180, 31, 24, 0,113,225, 0, 0, 84,130, 11, 64,249, /* 0x0680 */ 53, 1, 0,180, 31, 24, 0,113,225, 0, 0, 84,130, 11, 64,249,
/* 0x0690 */ 224, 3, 26,170, 97, 0,128, 82, 98, 2, 2,139,139,255,255,151, /* 0x0690 */ 224, 3, 26,170, 97, 0,128, 82, 98, 2, 2,139,139,255,255,151,
/* 0x06a0 */ 151, 0, 0, 20, 31, 4, 0,113,161, 18, 0, 84,155, 7, 64,185, /* 0x06a0 */ 155, 0, 0, 20, 31, 4, 0,113, 33, 19, 0, 84,155, 7, 64,185,
/* 0x06b0 */ 0, 72,140, 82, 32,106,174,114,123, 11, 30, 83, 27, 36,219, 26, /* 0x06b0 */ 0, 72,140, 82, 32,106,174,114,123, 11, 30, 83, 27, 36,219, 26,
/* 0x06c0 */ 121, 11, 0, 18, 86, 2, 0,180,128, 7, 64,249, 0, 2, 0,181, /* 0x06c0 */ 121, 11, 0, 18, 85, 2, 0,180,128, 7, 64,249, 0, 2, 0,181,
/* 0x06d0 */ 162, 18, 64,249,224, 3, 26,170,131, 11, 64,249, 97, 0,128, 82, /* 0x06d0 */ 194, 18, 64,249,224, 3, 26,170,131, 11, 64,249, 97, 0,128, 82,
/* 0x06e0 */ 98, 2, 2,139, 66, 0, 3,139,120,255,255,151,162,114, 64,121, /* 0x06e0 */ 98, 2, 2,139, 66, 0, 3,139,120,255,255,151,194,114, 64,121,
/* 0x06f0 */ 224, 3, 26,170,161, 0,128, 82,116,255,255,151,162,110, 64,121, /* 0x06f0 */ 224, 3, 26,170,161, 0,128, 82,116,255,255,151,194,110, 64,121,
/* 0x0700 */ 224, 3, 26,170,129, 0,128, 82,112,255,255,151,148, 11, 64,249, /* 0x0700 */ 224, 3, 26,170,129, 0,128, 82,112,255,255,151,148, 11, 64,249,
/* 0x0710 */ 223, 2, 31,235,128, 23, 64,249, 72, 6,128, 82,116, 2, 20,139, /* 0x0710 */ 191, 2, 31,235,128, 23, 64,249,130, 0,128, 18,116, 2, 20,139,
/* 0x0720 */ 151, 19, 64,249,128, 2, 0,139,183, 83, 0,249,225, 1,102,158, /* 0x0720 */ 151, 19, 64,249,128, 2, 0,139,183, 83, 0,249,225, 1,102,158,
/* 0x0730 */ 180, 87, 0,249, 11, 0,103,158,152, 2, 23,139, 64, 1, 38, 30, /* 0x0730 */ 180, 87, 0,249, 11, 0,103,158,152, 2, 23,139, 64, 1, 38, 30,
/* 0x0740 */ 135, 7, 64,249, 67, 2,128, 82, 5, 0, 20, 10,148, 2, 5,203, /* 0x0740 */ 135, 7, 64,249, 67, 6,128, 82, 5, 0, 20, 10,148, 2, 5,203,
/* 0x0750 */ 183, 0, 23,139,128, 2, 23,139,229, 0, 5,203,224, 3, 0,203, /* 0x0750 */ 183, 0, 23,139,128, 2, 23,139,229, 0, 5,203,224, 3, 0,203,
/* 0x0760 */ 0, 0, 1,138, 23, 0, 23,139, 64, 0,128, 82, 2, 16,159, 26, /* 0x0760 */ 0, 0, 1,138, 23, 0, 23,139, 64, 0,128, 82, 4, 16,159, 26,
/* 0x0770 */ 223, 2, 31,235,128, 1, 38, 30,225, 3, 23,170, 66, 0, 25, 42, /* 0x0770 */ 191, 2, 31,235,132, 0, 25, 42, 66, 16,159, 90, 66, 0, 4, 10,
/* 0x0780 */ 4, 0,159, 90,223, 2, 31,235, 3, 17,131, 26,224, 3, 20,170, /* 0x0780 */ 191, 2, 31,235,132, 1, 38, 30, 64, 2,128, 82, 3, 0,131, 26,
/* 0x0790 */ 207,254,255,151,159, 2, 0,235, 96, 0, 0, 84,224, 15,128, 82, /* 0x0790 */ 191, 2, 31,235,224, 3, 20,170,225, 3, 23,170,132, 0,159, 90,
/* 0x07a0 */ 176,254,255,151,214, 0, 0,180,162, 1,102,158,224, 3, 22,170, /* 0x07a0 */ 203,254,255,151,159, 2, 0,235, 96, 0, 0, 84,224, 15,128, 82,
/* 0x07b0 */ 195, 1,102,158,161,131, 2,145,242,254,255,151,187, 1, 8, 54, /* 0x07b0 */ 172,254,255,151,213, 0, 0,180,162, 1,102,158,224, 3, 21,170,
/* 0x07c0 */ 64, 1, 38, 30,225, 3, 24, 75, 34, 0, 0, 10, 0, 0,128,210, /* 0x07c0 */ 195, 1,102,158,161,131, 2,145,238,254,255,151,187, 1, 8, 54,
/* 0x07d0 */ 98, 0, 0, 53, 24, 3, 2,139, 6, 0, 0, 20, 31,107, 32, 56, /* 0x07d0 */ 64, 1, 38, 30,225, 3, 24, 75, 34, 0, 0, 10, 0, 0,128,210,
/* 0x07e0 */ 0, 4, 0,145, 31, 0, 2,235,161,255,255, 84,250,255,255, 23, /* 0x07e0 */ 98, 0, 0, 53, 24, 3, 2,139, 6, 0, 0, 20, 31,107, 32, 56,
/* 0x07f0 */ 214, 6, 0,180,128, 3, 64,249,225, 3, 0,178, 0,128, 64,146, /* 0x07f0 */ 0, 4, 0,145, 31, 0, 2,235,161,255,255, 84,250,255,255, 23,
/* 0x0800 */ 31, 0, 1,235,129, 5, 0, 84,128, 23, 64,249,130, 19, 64,249, /* 0x0800 */ 213, 6, 0,180,128, 3, 64,249,225, 3, 0,178, 0,128, 64,146,
/* 0x0810 */ 129, 11, 64,249, 31, 0, 2,235,129, 1, 0, 84,123, 14, 0,145, /* 0x0810 */ 31, 0, 1,235,129, 5, 0, 84,128, 23, 64,249,130, 19, 64,249,
/* 0x0820 */ 123, 3, 0,139, 66, 1, 38, 30,123, 3, 1,139,123,247,126,146, /* 0x0820 */ 129, 11, 64,249, 31, 0, 2,235,129, 1, 0, 84,123, 14, 0,145,
/* 0x0830 */ 224, 3, 27, 75, 0, 0, 2, 10, 31, 28, 0,113,105, 0, 0, 84, /* 0x0830 */ 123, 3, 0,139, 66, 1, 38, 30,123, 3, 1,139,123,247,126,146,
/* 0x0840 */ 0, 0,128, 82, 13, 0, 0, 20,128, 7, 64,249,160, 6, 0,180, /* 0x0840 */ 224, 3, 27, 75, 0, 0, 2, 10, 31, 28, 0,113,105, 0, 0, 84,
/* 0x0850 */ 0, 0,128,210, 1, 0,130,210, 98, 0,128, 82, 67, 4,128, 82, /* 0x0850 */ 0, 0,128, 82, 13, 0, 0, 20,128, 7, 64,249,160, 6, 0,180,
/* 0x0860 */ 4, 0,128, 18,229, 3, 0,170,153,254,255,151,251, 3, 0,170, /* 0x0860 */ 0, 0,128,210, 1, 0,130,210, 98, 0,128, 82, 67, 4,128, 82,
/* 0x0870 */ 32, 2, 0,180, 32, 0,128, 82, 33, 0,128, 82, 1,128,186,114, /* 0x0870 */ 4, 0,128, 18,229, 3, 0,170,149,254,255,151,251, 3, 0,170,
/* 0x0880 */ 97, 3, 0,185, 1,120,128, 82,225,203,186,114, 97, 7, 0,185, /* 0x0880 */ 32, 2, 0,180, 32, 0,128, 82, 33, 0,128, 82, 1,128,186,114,
/* 0x0890 */ 160, 0, 0, 52,224, 3, 27,170, 1, 1,128,210,162, 0,128, 82, /* 0x0890 */ 97, 3, 0,185, 1,120,128, 82,225,203,186,114, 97, 7, 0,185,
/* 0x08a0 */ 132,254,255,151, 64,251,127,146, 1, 0,128, 82,226, 3, 27,170, /* 0x08a0 */ 160, 0, 0, 52,224, 3, 27,170, 1, 1,128,210,162, 0,128, 82,
/* 0x08b0 */ 6,255,255,151,224, 3, 20,170,225, 3, 23,170,226, 3, 25, 42, /* 0x08b0 */ 128,254,255,151, 64,251,127,146, 1, 0,128, 82,226, 3, 27,170,
/* 0x08c0 */ 124,254,255,151,192,246,255, 53, 96, 1,102,158, 31, 3, 0,235, /* 0x08c0 */ 2,255,255,151,224, 3, 20,170,225, 3, 23,170,226, 3, 25, 42,
/* 0x08d0 */ 98, 1, 0, 84, 97, 1,102,158,224, 3, 24,170,226, 3, 25, 42, /* 0x08d0 */ 120,254,255,151,192,246,255, 53, 96, 1,102,158, 31, 3, 0,235,
/* 0x08e0 */ 67, 6,128, 82, 4, 0,128, 18, 5, 0,128,210, 33, 0, 24,203, /* 0x08e0 */ 98, 1, 0, 84, 97, 1,102,158,224, 3, 24,170,226, 3, 25, 42,
/* 0x08f0 */ 119,254,255,151, 31, 3, 0,235, 33,245,255, 84, 0, 1, 38, 30, /* 0x08f0 */ 67, 6,128, 82, 4, 0,128, 18, 5, 0,128,210, 33, 0, 24,203,
/* 0x0900 */ 156,227, 0,145, 0, 4, 0, 17, 8, 0, 39, 30, 88,255,255, 23, /* 0x0900 */ 115,254,255,151, 31, 3, 0,235, 33,245,255, 84, 0, 1, 38, 30,
/* 0x0910 */ 32, 1,102,158,192, 0, 0,180, 19, 0, 0,249, 4, 0, 0, 20, /* 0x0910 */ 156,227, 0,145, 0, 4, 0, 17, 8, 0, 39, 30, 84,255,255, 23,
/* 0x0920 */ 59, 0, 19,139,123, 35, 0,145,212,255,255, 23,160, 14, 64,249, /* 0x0920 */ 32, 1,102,158,192, 0, 0,180, 19, 0, 0,249, 4, 0, 0, 20,
/* 0x0930 */ 232, 39, 70,109,245, 91, 66,169,234, 47, 71,109, 96, 2, 0,139, /* 0x0930 */ 59, 0, 19,139,123, 35, 0,145,212,255,255, 23,192, 14, 64,249,
/* 0x0940 */ 236, 55, 72,109,243, 83, 65,169,238, 63, 73,109,247, 99, 67,169, /* 0x0940 */ 232, 39, 70,109,245, 91, 66,169,234, 47, 71,109, 96, 2, 0,139,
/* 0x0950 */ 249,107, 68,169,251,115, 69,169,253,123,203,168,192, 3, 95,214, /* 0x0950 */ 236, 55, 72,109,243, 83, 65,169,238, 63, 73,109,247, 99, 67,169,
/* 0x0960 */ 253,123,182,169,253, 3, 0,145,247, 99, 3,169,247, 3, 3,170, /* 0x0960 */ 249,107, 68,169,251,115, 69,169,253,123,203,168,192, 3, 95,214,
/* 0x0970 */ 3, 4, 64,185,243, 83, 1,169,162, 63, 0,249,243, 3, 2,170, /* 0x0970 */ 253,123,182,169,253, 3, 0,145,247, 99, 3,169,247, 3, 3,170,
/* 0x0980 */ 99, 48, 0,145, 2, 0, 64,185,162, 59, 0,249,226, 3, 4,170, /* 0x0980 */ 3, 4, 64,185,243, 83, 1,169,162, 63, 0,249,243, 3, 2,170,
/* 0x0990 */ 160, 79, 0,249,116, 2, 1,145,163, 75, 0,249, 3, 0,128,210, /* 0x0990 */ 99, 48, 0,145, 2, 0, 64,185,162, 59, 0,249,226, 3, 4,170,
/* 0x09a0 */ 160, 71, 0,249,160, 67, 2,145,161, 67, 0,249,161,195, 1,145, /* 0x09a0 */ 160, 79, 0,249,116, 2, 1,145,163, 75, 0,249, 3, 0,128,210,
/* 0x09b0 */ 245, 91, 2,169,249, 35, 0,249,249, 3, 7,170,165, 47, 0,249, /* 0x09b0 */ 160, 71, 0,249,160, 67, 2,145,161, 67, 0,249,161,195, 1,145,
/* 0x09c0 */ 22, 0,128, 82,166, 55, 0,249,164, 51, 0,249,109,254,255,151, /* 0x09c0 */ 245, 91, 2,169,249, 35, 0,249,249, 3, 7,170,165, 47, 0,249,
/* 0x09d0 */ 164, 51, 64,249,161, 3, 2,145,165, 47, 64,249, 2, 0,128, 82, /* 0x09d0 */ 22, 0,128, 82,166, 55, 0,249,164, 51, 0,249,105,254,255,151,
/* 0x09e0 */ 227, 3, 23,170,166,163, 1,145,231, 3, 25,170,224, 3, 19,170, /* 0x09e0 */ 164, 51, 64,249,161, 3, 2,145,165, 47, 64,249, 2, 0,128, 82,
/* 0x09f0 */ 199,254,255,151,245, 3, 0,170, 33, 1,128, 82,224, 3, 23,170, /* 0x09f0 */ 227, 3, 23,170,166,163, 1,145,231, 3, 25,170,224, 3, 19,170,
/* 0x0a00 */ 226, 3, 21,170,177,254,255,151, 96,114, 64,121,223, 2, 0,107, /* 0x0a00 */ 195,254,255,151,245, 3, 0,170, 33, 1,128, 82,224, 3, 23,170,
/* 0x0a10 */ 226, 4, 0, 84,128, 2, 64,185, 31, 12, 0,113, 33, 4, 0, 84, /* 0x0a10 */ 226, 3, 21,170,173,254,255,151, 96,114, 64,121,223, 2, 0,107,
/* 0x0a20 */ 129, 10, 64,249,160, 55, 64,249, 32, 0, 0,139, 1, 0,128, 82, /* 0x0a20 */ 226, 4, 0, 84,128, 2, 64,185, 31, 12, 0,113, 33, 4, 0, 84,
/* 0x0a30 */ 226, 3, 1, 42, 48,254,255,151,248, 3, 0, 42, 96, 0,248, 54, /* 0x0a30 */ 129, 10, 64,249,160, 55, 64,249, 32, 0, 0,139, 1, 0,128, 82,
/* 0x0a40 */ 224, 15,128, 82, 7,254,255,151,225, 3, 19,170, 2,128,128,210, /* 0x0a40 */ 226, 3, 1, 42, 44,254,255,151,248, 3, 0, 42, 96, 0,248, 54,
/* 0x0a50 */ 6,254,255,151, 31, 0, 16,241, 65,255,255, 84, 1, 0,128,210, /* 0x0a50 */ 224, 15,128, 82, 3,254,255,151,225, 3, 19,170, 2,128,128,210,
/* 0x0a60 */ 226, 3, 24, 42,227, 3, 1,170,228, 3, 1,170,229, 3, 1,170, /* 0x0a60 */ 2,254,255,151, 31, 0, 16,241, 65,255,255, 84, 1, 0,128,210,
/* 0x0a70 */ 166,163, 1,145,231, 3, 25,170,224, 3, 19,170,191, 55, 0,249, /* 0x0a70 */ 226, 3, 24, 42,227, 3, 1,170,228, 3, 1,170,229, 3, 1,170,
/* 0x0a80 */ 163,254,255,151,245, 3, 0,170,162, 55, 64,249,224, 3, 23,170, /* 0x0a80 */ 166,163, 1,145,231, 3, 25,170,224, 3, 19,170,191, 55, 0,249,
/* 0x0a90 */ 225, 0,128, 82,141,254,255,151,224, 3, 24, 42,249,253,255,151, /* 0x0a90 */ 159,254,255,151,245, 3, 0,170,162, 55, 64,249,224, 3, 23,170,
/* 0x0aa0 */ 148,226, 0,145,214, 6, 0, 17,216,255,255, 23,224, 3, 21,170, /* 0x0aa0 */ 225, 0,128, 82,137,254,255,151,224, 3, 24, 42,245,253,255,151,
/* 0x0ab0 */ 249, 35, 64,249,243, 83, 65,169,245, 91, 66,169,247, 99, 67,169, /* 0x0ab0 */ 148,226, 0,145,214, 6, 0, 17,216,255,255, 23,224, 3, 21,170,
/* 0x0ac0 */ 253,123,202,168,192, 3, 95,214 /* 0x0ac0 */ 249, 35, 64,249,243, 83, 65,169,245, 91, 66,169,247, 99, 67,169,
/* 0x0ad0 */ 253,123,202,168,192, 3, 95,214
}; };
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+104 -102
View File
@@ -1,5 +1,5 @@
/* powerpc64-linux.elf-fold.h /* powerpc64-linux.elf-fold.h
created from powerpc64-linux.elf-fold.bin, 3416 (0xd58) bytes created from powerpc64-linux.elf-fold.bin, 3448 (0xd78) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@@ -31,21 +31,21 @@
*/ */
#define STUB_POWERPC64_LINUX_ELF_FOLD_SIZE 3416 #define STUB_POWERPC64_LINUX_ELF_FOLD_SIZE 3448
#define STUB_POWERPC64_LINUX_ELF_FOLD_ADLER32 0x72d69751 #define STUB_POWERPC64_LINUX_ELF_FOLD_ADLER32 0xf41ca5e4
#define STUB_POWERPC64_LINUX_ELF_FOLD_CRC32 0x45619dfa #define STUB_POWERPC64_LINUX_ELF_FOLD_CRC32 0xc554fca1
unsigned char stub_powerpc64_linux_elf_fold[3416] = { unsigned char stub_powerpc64_linux_elf_fold[3448] = {
/* 0x0000 */ 127, 69, 76, 70, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 0, 2, 0, 21, 0, 0, 0, 1, 0, 0, 0, 0, 0, 16, 13, 8, /* 0x0010 */ 0, 2, 0, 21, 0, 0, 0, 1, 0, 0, 0, 0, 0, 16, 13, 40,
/* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0030 */ 0, 0, 0, 1, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, /* 0x0030 */ 0, 0, 0, 1, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0,
/* 0x0040 */ 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0040 */ 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0050 */ 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, /* 0x0050 */ 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0,
/* 0x0060 */ 0, 0, 0, 0, 0, 0, 13, 8, 0, 0, 0, 0, 0, 0, 13, 8, /* 0x0060 */ 0, 0, 0, 0, 0, 0, 13, 36, 0, 0, 0, 0, 0, 0, 13, 36,
/* 0x0070 */ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, /* 0x0070 */ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6,
/* 0x0080 */ 0, 0, 0, 0, 0, 0, 13, 8, 0, 0, 0, 0, 0, 16, 13, 8, /* 0x0080 */ 0, 0, 0, 0, 0, 0, 13, 40, 0, 0, 0, 0, 0, 16, 13, 40,
/* 0x0090 */ 0, 0, 0, 0, 0, 16, 13, 8, 0, 0, 0, 0, 0, 0, 0, 80, /* 0x0090 */ 0, 0, 0, 0, 0, 16, 13, 40, 0, 0, 0, 0, 0, 0, 0, 80,
/* 0x00a0 */ 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 1, 0, 0, /* 0x00a0 */ 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 1, 0, 0,
/* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 96,255,248, /* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 96,255,248,
/* 0x00c0 */ 120, 99, 77,164, 78,128, 0, 32, 96, 0, 0, 0, 72, 0, 0,125, /* 0x00c0 */ 120, 99, 77,164, 78,128, 0, 32, 96, 0, 0, 0, 72, 0, 0,125,
@@ -76,7 +76,7 @@ unsigned char stub_powerpc64_linux_elf_fold[3416] = {
/* 0x0250 */ 126,228,187,120, 56,161, 0,144,127, 70,211,120,127,231,251,120, /* 0x0250 */ 126,228,187,120, 56,161, 0,144,127, 70,211,120,127,231,251,120,
/* 0x0260 */ 126,200,179,120, 56, 0, 0, 0,248,225, 0,112, 56,225, 0,112, /* 0x0260 */ 126,200,179,120, 56, 0, 0, 0,248,225, 0,112, 56,225, 0,112,
/* 0x0270 */ 248, 1, 0,120,249, 1, 0,128, 57, 1, 0,128,248, 1, 0,136, /* 0x0270 */ 248, 1, 0,120,249, 1, 0,128, 57, 1, 0,128,248, 1, 0,136,
/* 0x0280 */ 127,202,243,120, 72, 0, 8,109, 56, 33, 8,144,126,162,171,120, /* 0x0280 */ 127,202,243,120, 72, 0, 8,137, 56, 33, 8,144,126,162,171,120,
/* 0x0290 */ 112, 96, 0, 7, 64,130, 0, 36,128, 3, 0, 0, 40, 0, 0, 0, /* 0x0290 */ 112, 96, 0, 7, 64,130, 0, 36,128, 3, 0, 0, 40, 0, 0, 0,
/* 0x02a0 */ 64,130, 0, 24,232, 1, 1,136,232, 67, 0, 8,124, 66, 2, 20, /* 0x02a0 */ 64,130, 0, 24,232, 1, 1,136,232, 67, 0, 8,124, 66, 2, 20,
/* 0x02b0 */ 232, 99, 0, 0,124, 99, 2, 20,248,117, 0, 0,124,127, 27,120, /* 0x02b0 */ 232, 99, 0, 0,124, 99, 2, 20,248,117, 0, 0,124,127, 27,120,
@@ -106,7 +106,7 @@ unsigned char stub_powerpc64_linux_elf_fold[3416] = {
/* 0x0430 */ 125, 74, 74, 20,249, 67, 0, 8,233, 67, 0, 0,125, 41, 80, 80, /* 0x0430 */ 125, 74, 74, 20,249, 67, 0, 8,233, 67, 0, 0,125, 41, 80, 80,
/* 0x0440 */ 249, 35, 0, 0, 78,128, 0, 32, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x0440 */ 249, 35, 0, 0, 78,128, 0, 32, 0, 0, 0, 0, 0, 0, 0, 1,
/* 0x0450 */ 128, 0, 0, 0,125,128, 0, 38,124, 8, 2,166,145,129, 0, 8, /* 0x0450 */ 128, 0, 0, 0,125,128, 0, 38,124, 8, 2,166,145,129, 0, 8,
/* 0x0460 */ 72, 0, 8, 61,248, 33,255, 81,124,126, 27,120,124,159, 35,120, /* 0x0460 */ 72, 0, 8, 89,248, 33,255, 81,124,126, 27,120,124,159, 35,120,
/* 0x0470 */ 124,189, 43,120,124,220, 51,120, 46, 38, 0, 0,233, 63, 0, 0, /* 0x0470 */ 124,189, 43,120,124,220, 51,120, 46, 38, 0, 0,233, 63, 0, 0,
/* 0x0480 */ 47,169, 0, 0, 65,158, 1, 84,127,195,243,120, 56,129, 0,112, /* 0x0480 */ 47,169, 0, 0, 65,158, 1, 84,127,195,243,120, 56,129, 0,112,
/* 0x0490 */ 56,160, 0, 12, 75,255,255, 81,129, 65, 0,112,129, 33, 0,116, /* 0x0490 */ 56,160, 0, 12, 75,255,255, 81,129, 65, 0,112,129, 33, 0,116,
@@ -130,14 +130,14 @@ unsigned char stub_powerpc64_linux_elf_fold[3416] = {
/* 0x05b0 */ 125, 37, 75,120, 75,255,254, 49,129, 1, 0,112,233, 95, 0, 8, /* 0x05b0 */ 125, 37, 75,120, 75,255,254, 49,129, 1, 0,112,233, 95, 0, 8,
/* 0x05c0 */ 233, 63, 0, 0,125, 74, 66, 20,125, 40, 72, 80,249, 95, 0, 8, /* 0x05c0 */ 233, 63, 0, 0,125, 74, 66, 20,125, 40, 72, 80,249, 95, 0, 8,
/* 0x05d0 */ 249, 63, 0, 0, 75,255,254,168, 56, 33, 0,176,129,129, 0, 8, /* 0x05d0 */ 249, 63, 0, 0, 75,255,254,168, 56, 33, 0,176,129,129, 0, 8,
/* 0x05e0 */ 125,144,129, 32, 72, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 3, /* 0x05e0 */ 125,144,129, 32, 72, 0, 7, 36, 0, 0, 0, 0, 0, 0, 0, 3,
/* 0x05f0 */ 128, 4, 0, 0, 44, 35, 0, 0, 77,130, 0, 32,120,105, 7,225, /* 0x05f0 */ 128, 4, 0, 0, 44, 35, 0, 0, 77,130, 0, 32,120,105, 7,225,
/* 0x0600 */ 76,130, 0, 32, 47, 36, 0, 0,233, 67, 0, 0,127,170, 32, 64, /* 0x0600 */ 76,130, 0, 32, 47, 36, 0, 0,233, 67, 0, 0,127,170, 32, 64,
/* 0x0610 */ 64,158, 0, 16,248,131, 0, 0,248,163, 0, 8, 78,128, 0, 32, /* 0x0610 */ 64,158, 0, 16,248,131, 0, 0,248,163, 0, 8, 78,128, 0, 32,
/* 0x0620 */ 43,170, 0, 1, 64,158, 0, 12, 65,154, 0, 16, 75,255,255,232, /* 0x0620 */ 43,170, 0, 1, 64,158, 0, 12, 65,154, 0, 16, 75,255,255,232,
/* 0x0630 */ 47,170, 0, 0, 77,158, 0, 32, 56, 99, 0, 16, 75,255,255,204, /* 0x0630 */ 47,170, 0, 0, 77,158, 0, 32, 56, 99, 0, 16, 75,255,255,204,
/* 0x0640 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,125,128, 0, 38, /* 0x0640 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,125,128, 0, 38,
/* 0x0650 */ 124, 8, 2,166,145,129, 0, 8, 72, 0, 6, 13,125, 53, 75,120, /* 0x0650 */ 124, 8, 2,166,145,129, 0, 8, 72, 0, 6, 41,125, 53, 75,120,
/* 0x0660 */ 233, 35, 0, 32, 46, 36, 0, 0,248, 33,254,209,125, 15, 67,120, /* 0x0660 */ 233, 35, 0, 32, 46, 36, 0, 0,248, 33,254,209,125, 15, 67,120,
/* 0x0670 */ 161, 3, 0, 16,125, 94, 83,120,124,124, 27,120,124,177, 43,120, /* 0x0670 */ 161, 3, 0, 16,125, 94, 83,120,124,124, 27,120,124,177, 43,120,
/* 0x0680 */ 124,216, 51,120,233, 85, 0, 0,124,240, 59,120,126, 67, 74, 20, /* 0x0680 */ 124,216, 51,120,233, 85, 0, 0,124,240, 59,120,126, 67, 74, 20,
@@ -161,93 +161,95 @@ unsigned char stub_powerpc64_linux_elf_fold[3416] = {
/* 0x07a0 */ 56,160, 0, 0,124,198, 7,180, 56,224,255,255, 57, 0, 0, 0, /* 0x07a0 */ 56,160, 0, 0,124,198, 7,180, 56,224,255,255, 57, 0, 0, 0,
/* 0x07b0 */ 75,255,251,213, 96, 0, 0, 0,127,255, 24, 80, 57, 63, 0,120, /* 0x07b0 */ 75,255,251,213, 96, 0, 0, 0,127,255, 24, 80, 57, 63, 0,120,
/* 0x07c0 */ 127,211,240,248,249, 33, 0,144,127,222,240,248,123, 9, 7,164, /* 0x07c0 */ 127,211,240,248,249, 33, 0,144,127,222,240,248,123, 9, 7,164,
/* 0x07d0 */ 251,193, 0,136,249, 33, 0,152, 62,224, 0, 1, 59, 32, 0, 0, /* 0x07d0 */ 251,193, 0,136,249, 33, 0,152, 62,224, 0, 1, 61,192, 78,128,
/* 0x07e0 */ 122,247,131,228, 98,247, 0, 1, 57,192, 0, 0,161, 92, 0, 56, /* 0x07e0 */ 122,247,131,228, 59, 32, 0, 0, 98,247, 0, 1, 97,206, 0, 32,
/* 0x07f0 */ 127,138,200, 0, 64,157, 2,188,129, 82, 0, 0, 65,146, 0, 36, /* 0x07f0 */ 161, 92, 0, 56,127,138,200, 0, 64,157, 2,212,129, 82, 0, 0,
/* 0x0800 */ 47,138, 0, 6, 64,158, 0, 28,232,178, 0, 16,127, 3,195,120, /* 0x0800 */ 65,146, 0, 36, 47,138, 0, 6, 64,158, 0, 28,232,178, 0, 16,
/* 0x0810 */ 56,128, 0, 3,124,191, 42, 20, 75,255,253,221, 72, 0, 2,132, /* 0x0810 */ 127, 3,195,120, 56,128, 0, 3,124,191, 42, 20, 75,255,253,217,
/* 0x0820 */ 47,138, 0, 1, 64,158, 2,124,131, 82, 0, 4, 61, 32,115, 81, /* 0x0820 */ 72, 0, 2,156, 47,138, 0, 1, 64,158, 2,148,131, 82, 0, 4,
/* 0x0830 */ 97, 41, 98, 64, 87, 90, 22,250,125, 58,212, 48, 87, 84, 7,126, /* 0x0830 */ 61, 32,115, 81, 97, 41, 98, 64, 87, 90, 22,250,125, 58,212, 48,
/* 0x0840 */ 65,146, 0, 76,233, 82, 0, 8, 47,170, 0, 0, 64,158, 0, 64, /* 0x0840 */ 87, 84, 7,126, 65,146, 0, 76,233, 82, 0, 8, 47,170, 0, 0,
/* 0x0850 */ 233, 92, 0, 32,232,178, 0, 16,127, 3,195,120, 56,128, 0, 3, /* 0x0850 */ 64,158, 0, 64,233, 92, 0, 32,232,178, 0, 16,127, 3,195,120,
/* 0x0860 */ 125, 95, 82, 20,124,170, 42, 20, 75,255,253,141,160,188, 0, 56, /* 0x0860 */ 56,128, 0, 3,125, 95, 82, 20,124,170, 42, 20, 75,255,253,137,
/* 0x0870 */ 127, 3,195,120, 56,128, 0, 5, 75,255,253,125,160,188, 0, 54, /* 0x0870 */ 160,188, 0, 56,127, 3,195,120, 56,128, 0, 5, 75,255,253,121,
/* 0x0880 */ 127, 3,195,120, 56,128, 0, 4, 75,255,253,109,235,210, 0, 16, /* 0x0880 */ 160,188, 0, 54,127, 3,195,120, 56,128, 0, 4, 75,255,253,105,
/* 0x0890 */ 235,114, 0, 32,234,210, 0, 40,233, 33, 0,136,127,223,242, 20, /* 0x0890 */ 235,210, 0, 16,235,114, 0, 32,234,210, 0, 40,233, 33, 0,136,
/* 0x08a0 */ 251, 97, 0,112,127,202,152, 56,127,190,218, 20,251,193, 0,120, /* 0x08a0 */ 127,223,242, 20,251, 97, 0,112,127,200,152, 56,127,190,218, 20,
/* 0x08b0 */ 121, 74, 0, 32,126,222,178, 20,127,106,218, 20,127,202,240, 80, /* 0x08b0 */ 251,193, 0,120,121, 8, 0, 32,126,222,178, 20,127,104,218, 20,
/* 0x08c0 */ 125, 30,218, 20,125, 8, 0,208,125, 8, 72, 56,127,104,218, 20, /* 0x08c0 */ 127,200,240, 80,125, 94,218, 20,125, 74, 0,208,125, 74, 72, 56,
/* 0x08d0 */ 64,146, 0, 12, 56,160, 0, 0, 72, 0, 0, 8, 56,160, 0, 2, /* 0x08d0 */ 127,106,218, 20, 64,146, 0, 12, 56,160, 0, 0, 72, 0, 0, 8,
/* 0x08e0 */ 124,165,163,120,124,165, 7,180, 64,146, 0, 16,126, 39,139,120, /* 0x08e0 */ 56,160, 0, 2,124,165,163,120, 64,146, 0, 16, 57, 64,255,255,
/* 0x08f0 */ 56,192, 0, 18, 72, 0, 0, 12, 56,192, 0, 50, 56,224,255,255, /* 0x08f0 */ 121, 74, 0, 32, 72, 0, 0, 16, 61, 64,255,255, 97, 74,255,251,
/* 0x0900 */ 233, 18, 0, 8,127,195,243,120,127,100,219,120,125, 10, 64, 80, /* 0x0900 */ 121, 74, 0, 32,125, 69, 40, 56, 65,146, 0, 16, 56,192, 0, 50,
/* 0x0910 */ 75,255,250,117, 96, 0, 0, 0,127,190, 24, 0, 65,254, 0, 16, /* 0x0910 */ 56,224,255,255, 72, 0, 0, 12,126, 39,139,120, 56,192, 0, 18,
/* 0x0920 */ 56, 96, 0,127, 75,255,250,121, 96, 0, 0, 0, 65,146, 0, 24, /* 0x0920 */ 233, 82, 0, 8,127,195,243,120,127,100,219,120,125, 8, 80, 80,
/* 0x0930 */ 232, 97, 0,128, 56,129, 0,112,126, 5,131,120,125,230,123,120, /* 0x0930 */ 75,255,250, 85, 96, 0, 0, 0,127,190, 24, 0, 65,254, 0, 16,
/* 0x0940 */ 75,255,251, 21,123, 73,255,227, 65,130, 0, 48,125, 93, 0,208, /* 0x0940 */ 56, 96, 0,127, 75,255,250, 89, 96, 0, 0, 0, 65,146, 0, 24,
/* 0x0950 */ 57, 29,255,255,125, 74,152, 56,121, 74, 0, 33, 64,130, 0, 12, /* 0x0950 */ 232, 97, 0,128, 56,129, 0,112,126, 5,131,120,125,230,123,120,
/* 0x0960 */ 127,189, 82, 20, 72, 0, 0, 20,125, 73, 3,166,157,200, 0, 1, /* 0x0960 */ 75,255,250,245,123, 73,255,227, 65,130, 0, 52,125, 93, 0,208,
/* 0x0970 */ 66, 0,255,252, 75,255,255,236, 65,146, 0,248,233, 82, 0, 0, /* 0x0970 */ 57, 29,255,255,125, 74,152, 56,121, 74, 0, 33, 64,130, 0, 12,
/* 0x0980 */ 121, 74, 7,194,121, 74, 0, 2,127,170,184, 0, 64,158, 0,200, /* 0x0980 */ 127,189, 82, 20, 72, 0, 0, 24,125, 73, 3,166, 56,224, 0, 0,
/* 0x0990 */ 235, 82, 0, 40,233, 82, 0, 32,233, 18, 0, 16,127,186, 80, 0, /* 0x0990 */ 156,232, 0, 1, 66, 0,255,252, 75,255,255,232, 65,146, 0,240,
/* 0x09a0 */ 64,158, 0, 36,127, 90, 66, 20,127, 90,250, 20,125, 90, 0,208, /* 0x09a0 */ 233, 82, 0, 0,121, 74, 7,194,121, 74, 0, 2,127,170,184, 0,
/* 0x09b0 */ 125, 74,152, 56, 43,138, 0, 15, 64,157, 0, 12, 57, 64, 0, 0, /* 0x09b0 */ 64,158, 0,192,235, 82, 0, 40,233, 82, 0, 32,233, 18, 0, 16,
/* 0x09c0 */ 72, 0, 0, 60,233, 82, 0, 8, 47,170, 0, 0, 65,158, 1, 8, /* 0x09c0 */ 127,186, 80, 0, 64,158, 0, 36,127, 90, 66, 20,127, 90,250, 20,
/* 0x09d0 */ 56, 96, 0, 0, 56,128, 16, 0, 56,160, 0, 3, 56,192, 0, 34, /* 0x09d0 */ 125, 90, 0,208,125, 74,152, 56, 43,138, 0, 15, 64,157, 0, 12,
/* 0x09e0 */ 56,224,255,255, 57, 0, 0, 0, 75,255,249,157, 96, 0, 0, 0, /* 0x09e0 */ 57, 64, 0, 0, 72, 0, 0, 60,233, 82, 0, 8, 47,170, 0, 0,
/* 0x09f0 */ 124,122, 27,121, 65,130, 0, 96, 57, 64, 0, 1, 61, 32, 68, 0, /* 0x09f0 */ 65,158, 1, 0, 56, 96, 0, 0, 56,128, 16, 0, 56,160, 0, 3,
/* 0x0a00 */ 47,170, 0, 0, 97, 41, 0, 2,145, 58, 0, 0, 61, 32,127,236, /* 0x0a00 */ 56,192, 0, 34, 56,224,255,255, 57, 0, 0, 0, 75,255,249,121,
/* 0x0a10 */ 97, 41,251,120,145, 58, 0, 4, 61, 32, 56,128,145, 58, 0, 8, /* 0x0a10 */ 96, 0, 0, 0,124,122, 27,121, 65,130, 0, 88, 57, 64, 0, 1,
/* 0x0a20 */ 61, 32, 78,128, 97, 41, 0, 32,145, 58, 0, 12, 65,158, 0, 24, /* 0x0a20 */ 61, 32, 68, 0, 61, 0, 56,128,145,218, 0, 12, 97, 41, 0, 2,
/* 0x0a30 */ 127, 67,211,120, 56,128, 0, 12, 56,160, 0, 5, 75,255,249,145, /* 0x0a30 */ 47,170, 0, 0,145, 26, 0, 8,145, 58, 0, 0, 61, 32,127,236,
/* 0x0a40 */ 96, 0, 0, 0,232, 97, 0,152, 56,128, 0, 0,127, 69,211,120, /* 0x0a40 */ 97, 41,251,120,145, 58, 0, 4, 65,158, 0, 24,127, 67,211,120,
/* 0x0a50 */ 75,255,251,165,127,195,243,120,127,100,219,120,126,133, 7,180, /* 0x0a50 */ 56,128, 0, 12, 56,160, 0, 5, 75,255,249,117, 96, 0, 0, 0,
/* 0x0a60 */ 75,255,249,109, 96, 0, 0, 0, 47,163, 0, 0, 64,222,254,180, /* 0x0a60 */ 232, 97, 0,152, 56,128, 0, 0,127, 69,211,120, 75,255,251,137,
/* 0x0a70 */ 127,189,176, 64, 64,156, 0, 44,127,163,235,120,124,157,176, 80, /* 0x0a70 */ 127,195,243,120,127,100,219,120,126,133, 7,180, 75,255,249, 81,
/* 0x0a80 */ 126,133, 7,180, 56,192, 0, 50, 56,224,255,255, 57, 0, 0, 0, /* 0x0a80 */ 96, 0, 0, 0, 47,163, 0, 0, 64,222,254,184,127,189,176, 64,
/* 0x0a90 */ 75,255,248,245, 96, 0, 0, 0,127,189, 24, 0, 64,222,254,132, /* 0x0a90 */ 64,156, 0, 44,127,163,235,120,124,157,176, 80,126,133, 7,180,
/* 0x0aa0 */ 59, 57, 0, 1, 58, 82, 0, 56,127, 57, 7,180, 75,255,253, 64, /* 0x0aa0 */ 56,192, 0, 50, 56,224,255,255, 57, 0, 0, 0, 75,255,248,217,
/* 0x0ab0 */ 47,181, 0, 0, 65,158, 0, 8,251,245, 0, 0, 56, 33, 1, 48, /* 0x0ab0 */ 96, 0, 0, 0,127,189, 24, 0, 64,222,254,136, 59, 57, 0, 1,
/* 0x0ac0 */ 232,124, 0, 24,124,127, 26, 20,129,129, 0, 8,125,144,129, 32, /* 0x0ac0 */ 58, 82, 0, 56,127, 57, 7,180, 75,255,253, 40, 47,181, 0, 0,
/* 0x0ad0 */ 72, 0, 1,228,233, 33, 0,144,127, 73, 66, 20, 59, 90, 0, 24, /* 0x0ad0 */ 65,158, 0, 8,251,245, 0, 0, 56, 33, 1, 48,232,124, 0, 24,
/* 0x0ae0 */ 75,255,255, 28, 0, 0, 0, 0, 0, 0, 0, 3,128, 18, 0, 0, /* 0x0ae0 */ 124,127, 26, 20,129,129, 0, 8,125,144,129, 32, 72, 0, 1,228,
/* 0x0af0 */ 124, 8, 2,166, 72, 0, 1,153,248, 33,255, 17,125, 61, 75,120, /* 0x0af0 */ 233, 33, 0,144,127, 73, 66, 20, 59, 90, 0, 24, 75,255,255, 36,
/* 0x0b00 */ 129, 35, 0, 0,124,191, 43,120,124,218, 51,120, 56,192, 0, 0, /* 0x0b00 */ 0, 0, 0, 0, 0, 0, 0, 3,128, 18, 0, 0,124, 8, 2,166,
/* 0x0b10 */ 125, 88, 83,120,249, 33, 0,144,248,161, 0,152,124,229, 59,120, /* 0x0b10 */ 72, 0, 1,153,248, 33,255, 17,125, 61, 75,120,129, 35, 0, 0,
/* 0x0b20 */ 59,159, 0, 64,129, 35, 0, 4,248, 97, 0,120, 59,192, 0, 0, /* 0x0b20 */ 124,191, 43,120,124,218, 51,120, 56,192, 0, 0,125, 88, 83,120,
/* 0x0b30 */ 248, 97, 0,136,248,129, 0,128, 57, 41, 0, 12,248,225, 0,160, /* 0x0b30 */ 249, 33, 0,144,248,161, 0,152,124,229, 59,120, 59,159, 0, 64,
/* 0x0b40 */ 249, 1, 0,168,249, 33, 0,112, 56, 97, 0,112, 56,129, 0,144, /* 0x0b40 */ 129, 35, 0, 4,248, 97, 0,120, 59,192, 0, 0,248, 97, 0,136,
/* 0x0b50 */ 75,255,249, 5,232,225, 0,160,233, 1, 0,168, 56,129, 0,128, /* 0x0b50 */ 248,129, 0,128, 57, 41, 0, 12,248,225, 0,160,249, 1, 0,168,
/* 0x0b60 */ 56,160, 0, 0,127, 70,211,120,127,169,235,120,127, 10,195,120, /* 0x0b60 */ 249, 33, 0,112, 56, 97, 0,112, 56,129, 0,144, 75,255,248,233,
/* 0x0b70 */ 127,227,251,120, 75,255,250,217, 56,128, 0, 9,124,123, 27,120, /* 0x0b70 */ 232,225, 0,160,233, 1, 0,168, 56,129, 0,128, 56,160, 0, 0,
/* 0x0b80 */ 127, 67,211,120,127,101,219,120, 75,255,250,109,161, 63, 0, 56, /* 0x0b80 */ 127, 70,211,120,127,169,235,120,127, 10,195,120,127,227,251,120,
/* 0x0b90 */ 127,137,240, 64, 64,157, 0,184,129, 60, 0, 0, 47,137, 0, 3, /* 0x0b90 */ 75,255,250,189, 56,128, 0, 9,124,123, 27,120,127, 67,211,120,
/* 0x0ba0 */ 64,158, 0,156,232,124, 0, 16,233, 61, 0, 0, 56,128, 0, 0, /* 0x0ba0 */ 127,101,219,120, 75,255,250, 81,161, 63, 0, 56,127,137,240, 64,
/* 0x0bb0 */ 56,160, 0, 0,124, 99, 74, 20, 75,255,248, 5, 96, 0, 0, 0, /* 0x0bb0 */ 64,157, 0,184,129, 60, 0, 0, 47,137, 0, 3, 64,158, 0,156,
/* 0x0bc0 */ 47,131, 0, 0,124,121, 27,120, 64,252, 0, 16, 56, 96, 0,127, /* 0x0bc0 */ 232,124, 0, 16,233, 61, 0, 0, 56,128, 0, 0, 56,160, 0, 0,
/* 0x0bd0 */ 75,255,247,205, 96, 0, 0, 0,127,228,251,120, 56,160, 4, 0, /* 0x0bd0 */ 124, 99, 74, 20, 75,255,247,233, 96, 0, 0, 0, 47,131, 0, 0,
/* 0x0be0 */ 75,255,247,213, 96, 0, 0, 0, 47,163, 4, 0, 64,222,255,224, /* 0x0be0 */ 124,121, 27,120, 64,252, 0, 16, 56, 96, 0,127, 75,255,247,177,
/* 0x0bf0 */ 57, 32, 0, 0, 56,128, 0, 0,249, 61, 0, 0,127, 37,203,120, /* 0x0bf0 */ 96, 0, 0, 0,127,228,251,120, 56,160, 4, 0, 75,255,247,185,
/* 0x0c00 */ 56,192, 0, 0, 56,224, 0, 0, 57, 0, 0, 0,127,169,235,120, /* 0x0c00 */ 96, 0, 0, 0, 47,163, 4, 0, 64,222,255,224, 57, 32, 0, 0,
/* 0x0c10 */ 127, 10,195,120,127,227,251,120, 75,255,250, 53,232,189, 0, 0, /* 0x0c10 */ 56,128, 0, 0,249, 61, 0, 0,127, 37,203,120, 56,192, 0, 0,
/* 0x0c20 */ 56,128, 0, 7,124,123, 27,120,127, 67,211,120, 75,255,249,201, /* 0x0c20 */ 56,224, 0, 0, 57, 0, 0, 0,127,169,235,120,127, 10,195,120,
/* 0x0c30 */ 127, 35,203,120, 75,255,247,145, 96, 0, 0, 0, 59,222, 0, 1, /* 0x0c30 */ 127,227,251,120, 75,255,250, 25,232,189, 0, 0, 56,128, 0, 7,
/* 0x0c40 */ 59,156, 0, 56,123,222, 0, 32, 75,255,255, 68, 56, 33, 0,240, /* 0x0c40 */ 124,123, 27,120,127, 67,211,120, 75,255,249,173,127, 35,203,120,
/* 0x0c50 */ 127, 99,219,120, 72, 0, 0,136, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x0c50 */ 75,255,247,117, 96, 0, 0, 0, 59,222, 0, 1, 59,156, 0, 56,
/* 0x0c60 */ 128, 8, 0, 0,249,193,255,112,249,225,255,120,250, 1,255,128, /* 0x0c60 */ 123,222, 0, 32, 75,255,255, 68, 56, 33, 0,240,127, 99,219,120,
/* 0x0c70 */ 250, 33,255,136,250, 65,255,144,250, 97,255,152,250,129,255,160, /* 0x0c70 */ 72, 0, 0,136, 0, 0, 0, 0, 0, 0, 0, 1,128, 8, 0, 0,
/* 0x0c80 */ 250,161,255,168,250,193,255,176,250,225,255,184,251, 1,255,192, /* 0x0c80 */ 249,193,255,112,249,225,255,120,250, 1,255,128,250, 33,255,136,
/* 0x0c90 */ 251, 33,255,200,251, 65,255,208,251, 97,255,216,251,129,255,224, /* 0x0c90 */ 250, 65,255,144,250, 97,255,152,250,129,255,160,250,161,255,168,
/* 0x0ca0 */ 251,161,255,232,251,193,255,240,251,225,255,248,248, 1, 0, 16, /* 0x0ca0 */ 250,193,255,176,250,225,255,184,251, 1,255,192,251, 33,255,200,
/* 0x0cb0 */ 78,128, 0, 32,233,193,255,112,233,225,255,120,234, 1,255,128, /* 0x0cb0 */ 251, 65,255,208,251, 97,255,216,251,129,255,224,251,161,255,232,
/* 0x0cc0 */ 234, 33,255,136,234, 65,255,144,234, 97,255,152,234,129,255,160, /* 0x0cc0 */ 251,193,255,240,251,225,255,248,248, 1, 0, 16, 78,128, 0, 32,
/* 0x0cd0 */ 234,161,255,168,234,193,255,176,234,225,255,184,235, 1,255,192, /* 0x0cd0 */ 233,193,255,112,233,225,255,120,234, 1,255,128,234, 33,255,136,
/* 0x0ce0 */ 235, 33,255,200,235, 65,255,208,235, 97,255,216,235,129,255,224, /* 0x0ce0 */ 234, 65,255,144,234, 97,255,152,234,129,255,160,234,161,255,168,
/* 0x0cf0 */ 232, 1, 0, 16,235,161,255,232,124, 8, 3,166,235,193,255,240, /* 0x0cf0 */ 234,193,255,176,234,225,255,184,235, 1,255,192,235, 33,255,200,
/* 0x0d00 */ 235,225,255,248, 78,128, 0, 32, 0, 0, 0, 0, 0, 16, 3,228, /* 0x0d00 */ 235, 65,255,208,235, 97,255,216,235,129,255,224,232, 1, 0, 16,
/* 0x0d10 */ 0, 0, 0, 0, 0, 16,141, 8, 0, 0, 0, 0, 0, 16, 4, 84, /* 0x0d10 */ 235,161,255,232,124, 8, 3,166,235,193,255,240,235,225,255,248,
/* 0x0d20 */ 0, 0, 0, 0, 0, 16,141, 8, 0, 0, 0, 0, 0, 16, 5,244, /* 0x0d20 */ 78,128, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 3,228,
/* 0x0d30 */ 0, 0, 0, 0, 0, 16,141, 8, 0, 0, 0, 0, 0, 16, 6, 76, /* 0x0d30 */ 0, 0, 0, 0, 0, 16,141, 40, 0, 0, 0, 0, 0, 16, 4, 84,
/* 0x0d40 */ 0, 0, 0, 0, 0, 16,141, 8, 0, 0, 0, 0, 0, 16, 10,240, /* 0x0d40 */ 0, 0, 0, 0, 0, 16,141, 40, 0, 0, 0, 0, 0, 16, 5,244,
/* 0x0d50 */ 0, 0, 0, 0, 0, 16,141, 8 /* 0x0d50 */ 0, 0, 0, 0, 0, 16,141, 40, 0, 0, 0, 0, 0, 16, 6, 76,
/* 0x0d60 */ 0, 0, 0, 0, 0, 16,141, 40, 0, 0, 0, 0, 0, 16, 11, 12,
/* 0x0d70 */ 0, 0, 0, 0, 0, 16,141, 40
}; };
+103 -102
View File
@@ -1,5 +1,5 @@
/* powerpc64le-linux.elf-fold.h /* powerpc64le-linux.elf-fold.h
created from powerpc64le-linux.elf-fold.bin, 3411 (0xd53) bytes created from powerpc64le-linux.elf-fold.bin, 3435 (0xd6b) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@@ -31,21 +31,21 @@
*/ */
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_SIZE 3411 #define STUB_POWERPC64LE_LINUX_ELF_FOLD_SIZE 3435
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_ADLER32 0xaf5a969c #define STUB_POWERPC64LE_LINUX_ELF_FOLD_ADLER32 0x51c2a4e7
#define STUB_POWERPC64LE_LINUX_ELF_FOLD_CRC32 0x1dfc8e06 #define STUB_POWERPC64LE_LINUX_ELF_FOLD_CRC32 0x8f3b3508
unsigned char stub_powerpc64le_linux_elf_fold[3411] = { unsigned char stub_powerpc64le_linux_elf_fold[3435] = {
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 2, 0, 21, 0, 1, 0, 0, 0, 8, 13, 16, 0, 0, 0, 0, 0, /* 0x0010 */ 2, 0, 21, 0, 1, 0, 0, 0, 32, 13, 16, 0, 0, 0, 0, 0,
/* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0020 */ 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0030 */ 1, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0, /* 0x0030 */ 1, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0,
/* 0x0040 */ 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0040 */ 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, /* 0x0050 */ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
/* 0x0060 */ 4, 13, 0, 0, 0, 0, 0, 0, 4, 13, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 32, 13, 0, 0, 0, 0, 0, 0, 32, 13, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, /* 0x0070 */ 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0,
/* 0x0080 */ 8, 13, 0, 0, 0, 0, 0, 0, 8, 13, 16, 0, 0, 0, 0, 0, /* 0x0080 */ 32, 13, 0, 0, 0, 0, 0, 0, 32, 13, 16, 0, 0, 0, 0, 0,
/* 0x0090 */ 8, 13, 16, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, /* 0x0090 */ 32, 13, 16, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0,
/* 0x00a0 */ 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* 0x00a0 */ 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
/* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,255, 96, 56, /* 0x00b0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,255, 96, 56,
/* 0x00c0 */ 164, 77, 99,120, 32, 0,128, 78, 0, 0, 0, 96,125, 0, 0, 72, /* 0x00c0 */ 164, 77, 99,120, 32, 0,128, 78, 0, 0, 0, 96,125, 0, 0, 72,
@@ -76,7 +76,7 @@ unsigned char stub_powerpc64le_linux_elf_fold[3411] = {
/* 0x0250 */ 120,187,228,126,144, 0,161, 56,120,211, 70,127,120,251,231,127, /* 0x0250 */ 120,187,228,126,144, 0,161, 56,120,211, 70,127,120,251,231,127,
/* 0x0260 */ 120,179,200,126, 0, 0, 0, 56,112, 0,225,248,112, 0,225, 56, /* 0x0260 */ 120,179,200,126, 0, 0, 0, 56,112, 0,225,248,112, 0,225, 56,
/* 0x0270 */ 120, 0, 1,248,128, 0, 1,249,128, 0, 1, 57,136, 0, 1,248, /* 0x0270 */ 120, 0, 1,248,128, 0, 1,249,128, 0, 1, 57,136, 0, 1,248,
/* 0x0280 */ 120,243,202,127,105, 8, 0, 72,144, 8, 33, 56,120,171,162,126, /* 0x0280 */ 120,243,202,127,133, 8, 0, 72,144, 8, 33, 56,120,171,162,126,
/* 0x0290 */ 7, 0, 96,112, 36, 0,130, 64, 0, 0, 3,128, 0, 0, 0, 40, /* 0x0290 */ 7, 0, 96,112, 36, 0,130, 64, 0, 0, 3,128, 0, 0, 0, 40,
/* 0x02a0 */ 24, 0,130, 64,136, 1, 1,232, 8, 0, 67,232, 20, 2, 66,124, /* 0x02a0 */ 24, 0,130, 64,136, 1, 1,232, 8, 0, 67,232, 20, 2, 66,124,
/* 0x02b0 */ 0, 0, 99,232, 20, 2, 99,124, 0, 0,117,248,120, 27,127,124, /* 0x02b0 */ 0, 0, 99,232, 20, 2, 99,124, 0, 0,117,248,120, 27,127,124,
@@ -106,7 +106,7 @@ unsigned char stub_powerpc64le_linux_elf_fold[3411] = {
/* 0x0430 */ 20, 74, 74,125, 8, 0, 67,249, 0, 0, 67,233, 80, 80, 41,125, /* 0x0430 */ 20, 74, 74,125, 8, 0, 67,249, 0, 0, 67,233, 80, 80, 41,125,
/* 0x0440 */ 0, 0, 35,249, 32, 0,128, 78, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x0440 */ 0, 0, 35,249, 32, 0,128, 78, 0, 0, 0, 0, 0, 0, 0, 1,
/* 0x0450 */ 128, 0, 0, 0, 38, 0,128,125,166, 2, 8,124, 8, 0,129,145, /* 0x0450 */ 128, 0, 0, 0, 38, 0,128,125,166, 2, 8,124, 8, 0,129,145,
/* 0x0460 */ 57, 8, 0, 72, 81,255, 33,248,120, 27,126,124,120, 35,159,124, /* 0x0460 */ 85, 8, 0, 72, 81,255, 33,248,120, 27,126,124,120, 35,159,124,
/* 0x0470 */ 120, 43,189,124,120, 51,220,124, 0, 0, 38, 46, 0, 0, 63,233, /* 0x0470 */ 120, 43,189,124,120, 51,220,124, 0, 0, 38, 46, 0, 0, 63,233,
/* 0x0480 */ 0, 0,169, 47, 84, 1,158, 65,120,243,195,127,112, 0,129, 56, /* 0x0480 */ 0, 0,169, 47, 84, 1,158, 65,120,243,195,127,112, 0,129, 56,
/* 0x0490 */ 12, 0,160, 56, 81,255,255, 75,112, 0, 65,129,116, 0, 33,129, /* 0x0490 */ 12, 0,160, 56, 81,255,255, 75,112, 0, 65,129,116, 0, 33,129,
@@ -130,14 +130,14 @@ unsigned char stub_powerpc64le_linux_elf_fold[3411] = {
/* 0x05b0 */ 120, 75, 37,125, 49,254,255, 75,112, 0, 1,129, 8, 0, 95,233, /* 0x05b0 */ 120, 75, 37,125, 49,254,255, 75,112, 0, 1,129, 8, 0, 95,233,
/* 0x05c0 */ 0, 0, 63,233, 20, 66, 74,125, 80, 72, 40,125, 8, 0, 95,249, /* 0x05c0 */ 0, 0, 63,233, 20, 66, 74,125, 80, 72, 40,125, 8, 0, 95,249,
/* 0x05d0 */ 0, 0, 63,249,168,254,255, 75,176, 0, 33, 56, 8, 0,129,129, /* 0x05d0 */ 0, 0, 63,249,168,254,255, 75,176, 0, 33, 56, 8, 0,129,129,
/* 0x05e0 */ 32,129,144,125, 4, 7, 0, 72, 0, 0, 0, 0, 0, 0, 0, 3, /* 0x05e0 */ 32,129,144,125, 32, 7, 0, 72, 0, 0, 0, 0, 0, 0, 0, 3,
/* 0x05f0 */ 128, 4, 0, 0, 0, 0, 35, 44, 32, 0,130, 77,225, 7,105,120, /* 0x05f0 */ 128, 4, 0, 0, 0, 0, 35, 44, 32, 0,130, 77,225, 7,105,120,
/* 0x0600 */ 32, 0,130, 76, 0, 0, 36, 47, 0, 0, 67,233, 64, 32,170,127, /* 0x0600 */ 32, 0,130, 76, 0, 0, 36, 47, 0, 0, 67,233, 64, 32,170,127,
/* 0x0610 */ 16, 0,158, 64, 0, 0,131,248, 8, 0,163,248, 32, 0,128, 78, /* 0x0610 */ 16, 0,158, 64, 0, 0,131,248, 8, 0,163,248, 32, 0,128, 78,
/* 0x0620 */ 1, 0,170, 43, 12, 0,158, 64, 16, 0,154, 65,232,255,255, 75, /* 0x0620 */ 1, 0,170, 43, 12, 0,158, 64, 16, 0,154, 65,232,255,255, 75,
/* 0x0630 */ 0, 0,170, 47, 32, 0,158, 77, 16, 0, 99, 56,204,255,255, 75, /* 0x0630 */ 0, 0,170, 47, 32, 0,158, 77, 16, 0, 99, 56,204,255,255, 75,
/* 0x0640 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0,128,125, /* 0x0640 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0,128,125,
/* 0x0650 */ 166, 2, 8,124, 8, 0,129,145, 9, 6, 0, 72,120, 75, 53,125, /* 0x0650 */ 166, 2, 8,124, 8, 0,129,145, 37, 6, 0, 72,120, 75, 53,125,
/* 0x0660 */ 32, 0, 35,233, 0, 0, 36, 46,209,254, 33,248,120, 67, 15,125, /* 0x0660 */ 32, 0, 35,233, 0, 0, 36, 46,209,254, 33,248,120, 67, 15,125,
/* 0x0670 */ 16, 0, 3,161,120, 83, 94,125,120, 27,124,124,120, 43,177,124, /* 0x0670 */ 16, 0, 3,161,120, 83, 94,125,120, 27,124,124,120, 43,177,124,
/* 0x0680 */ 120, 51,216,124, 0, 0, 85,233,120, 59,240,124, 20, 74, 67,126, /* 0x0680 */ 120, 51,216,124, 0, 0, 85,233,120, 59,240,124, 20, 74, 67,126,
@@ -161,93 +161,94 @@ unsigned char stub_powerpc64le_linux_elf_fold[3411] = {
/* 0x07a0 */ 0, 0,160, 56,180, 7,198,124,255,255,224, 56, 0, 0, 0, 57, /* 0x07a0 */ 0, 0,160, 56,180, 7,198,124,255,255,224, 56, 0, 0, 0, 57,
/* 0x07b0 */ 213,251,255, 75, 0, 0, 0, 96, 80, 24,255,127,120, 0, 63, 57, /* 0x07b0 */ 213,251,255, 75, 0, 0, 0, 96, 80, 24,255,127,120, 0, 63, 57,
/* 0x07c0 */ 248,240,211,127,144, 0, 33,249,248,240,222,127,164, 7, 9,123, /* 0x07c0 */ 248,240,211,127,144, 0, 33,249,248,240,222,127,164, 7, 9,123,
/* 0x07d0 */ 136, 0,193,251,152, 0, 33,249, 1, 0,224, 62, 0, 0, 32, 59, /* 0x07d0 */ 136, 0,193,251,152, 0, 33,249, 1, 0,224, 62,128, 78,192, 61,
/* 0x07e0 */ 228,131,247,122, 1, 0,247, 98, 0, 0,192, 57, 56, 0, 92,161, /* 0x07e0 */ 228,131,247,122, 0, 0, 32, 59, 1, 0,247, 98, 32, 0,206, 97,
/* 0x07f0 */ 0,200,138,127,184, 2,157, 64, 0, 0, 82,129, 36, 0,146, 65, /* 0x07f0 */ 56, 0, 92,161, 0,200,138,127,208, 2,157, 64, 0, 0, 82,129,
/* 0x0800 */ 6, 0,138, 47, 28, 0,158, 64, 16, 0,178,232,120,195, 3,127, /* 0x0800 */ 36, 0,146, 65, 6, 0,138, 47, 28, 0,158, 64, 16, 0,178,232,
/* 0x0810 */ 3, 0,128, 56, 20, 42,191,124,221,253,255, 75,128, 2, 0, 72, /* 0x0810 */ 120,195, 3,127, 3, 0,128, 56, 20, 42,191,124,217,253,255, 75,
/* 0x0820 */ 1, 0,138, 47,120, 2,158, 64, 4, 0, 82,131, 81,115, 32, 61, /* 0x0820 */ 152, 2, 0, 72, 1, 0,138, 47,144, 2,158, 64, 4, 0, 82,131,
/* 0x0830 */ 64, 98, 41, 97,250, 22, 90, 87, 48,212, 58,125,126, 7, 84, 87, /* 0x0830 */ 81,115, 32, 61, 64, 98, 41, 97,250, 22, 90, 87, 48,212, 58,125,
/* 0x0840 */ 76, 0,146, 65, 8, 0, 82,233, 0, 0,170, 47, 64, 0,158, 64, /* 0x0840 */ 126, 7, 84, 87, 76, 0,146, 65, 8, 0, 82,233, 0, 0,170, 47,
/* 0x0850 */ 32, 0, 92,233, 16, 0,178,232,120,195, 3,127, 3, 0,128, 56, /* 0x0850 */ 64, 0,158, 64, 32, 0, 92,233, 16, 0,178,232,120,195, 3,127,
/* 0x0860 */ 20, 82, 95,125, 20, 42,170,124,141,253,255, 75, 56, 0,188,160, /* 0x0860 */ 3, 0,128, 56, 20, 82, 95,125, 20, 42,170,124,137,253,255, 75,
/* 0x0870 */ 120,195, 3,127, 5, 0,128, 56,125,253,255, 75, 54, 0,188,160, /* 0x0870 */ 56, 0,188,160,120,195, 3,127, 5, 0,128, 56,121,253,255, 75,
/* 0x0880 */ 120,195, 3,127, 4, 0,128, 56,109,253,255, 75, 16, 0,210,235, /* 0x0880 */ 54, 0,188,160,120,195, 3,127, 4, 0,128, 56,105,253,255, 75,
/* 0x0890 */ 32, 0,114,235, 40, 0,210,234,136, 0, 33,233, 20,242,223,127, /* 0x0890 */ 16, 0,210,235, 32, 0,114,235, 40, 0,210,234,136, 0, 33,233,
/* 0x08a0 */ 112, 0, 97,251, 56,152,202,127, 20,218,190,127,120, 0,193,251, /* 0x08a0 */ 20,242,223,127,112, 0, 97,251, 56,152,200,127, 20,218,190,127,
/* 0x08b0 */ 32, 0, 74,121, 20,178,222,126, 20,218,106,127, 80,240,202,127, /* 0x08b0 */ 120, 0,193,251, 32, 0, 8,121, 20,178,222,126, 20,218,104,127,
/* 0x08c0 */ 20,218, 30,125,208, 0, 8,125, 56, 72, 8,125, 20,218,104,127, /* 0x08c0 */ 80,240,200,127, 20,218, 94,125,208, 0, 74,125, 56, 72, 74,125,
/* 0x08d0 */ 12, 0,146, 64, 0, 0,160, 56, 8, 0, 0, 72, 2, 0,160, 56, /* 0x08d0 */ 20,218,106,127, 12, 0,146, 64, 0, 0,160, 56, 8, 0, 0, 72,
/* 0x08e0 */ 120,163,165,124,180, 7,165,124, 16, 0,146, 64,120,139, 39,126, /* 0x08e0 */ 2, 0,160, 56,120,163,165,124, 16, 0,146, 64,255,255, 64, 57,
/* 0x08f0 */ 18, 0,192, 56, 12, 0, 0, 72, 50, 0,192, 56,255,255,224, 56, /* 0x08f0 */ 32, 0, 74,121, 16, 0, 0, 72,255,255, 64, 61,251,255, 74, 97,
/* 0x0900 */ 8, 0, 18,233,120,243,195,127,120,219,100,127, 80, 64, 10,125, /* 0x0900 */ 32, 0, 74,121, 56, 40, 69,125, 16, 0,146, 65, 50, 0,192, 56,
/* 0x0910 */ 117,250,255, 75, 0, 0, 0, 96, 0, 24,190,127, 16, 0,254, 65, /* 0x0910 */ 255,255,224, 56, 12, 0, 0, 72,120,139, 39,126, 18, 0,192, 56,
/* 0x0920 */ 127, 0, 96, 56,121,250,255, 75, 0, 0, 0, 96, 24, 0,146, 65, /* 0x0920 */ 8, 0, 82,233,120,243,195,127,120,219,100,127, 80, 80, 8,125,
/* 0x0930 */ 128, 0, 97,232,112, 0,129, 56,120,131, 5,126,120,123,230,125, /* 0x0930 */ 85,250,255, 75, 0, 0, 0, 96, 0, 24,190,127, 16, 0,254, 65,
/* 0x0940 */ 21,251,255, 75,227,255, 73,123, 48, 0,130, 65,208, 0, 93,125, /* 0x0940 */ 127, 0, 96, 56, 89,250,255, 75, 0, 0, 0, 96, 24, 0,146, 65,
/* 0x0950 */ 255,255, 29, 57, 56,152, 74,125, 33, 0, 74,121, 12, 0,130, 64, /* 0x0950 */ 128, 0, 97,232,112, 0,129, 56,120,131, 5,126,120,123,230,125,
/* 0x0960 */ 20, 82,189,127, 20, 0, 0, 72,166, 3, 73,125, 1, 0,200,157, /* 0x0960 */ 245,250,255, 75,227,255, 73,123, 52, 0,130, 65,208, 0, 93,125,
/* 0x0970 */ 252,255, 0, 66,236,255,255, 75,244, 0,146, 65, 0, 0, 82,233, /* 0x0970 */ 255,255, 29, 57, 56,152, 74,125, 33, 0, 74,121, 12, 0,130, 64,
/* 0x0980 */ 192, 7, 74,121, 0,184,170,127,200, 0,158, 64, 40, 0, 82,235, /* 0x0980 */ 20, 82,189,127, 24, 0, 0, 72,166, 3, 73,125, 0, 0,224, 56,
/* 0x0990 */ 32, 0, 82,233, 16, 0, 18,233, 0, 80,186,127, 36, 0,158, 64, /* 0x0990 */ 1, 0,232,156,252,255, 0, 66,232,255,255, 75,236, 0,146, 65,
/* 0x09a0 */ 20, 66, 90,127, 20,250, 90,127,208, 0, 90,125, 56,152, 74,125, /* 0x09a0 */ 0, 0, 82,233,192, 7, 74,121, 0,184,170,127,192, 0,158, 64,
/* 0x09b0 */ 15, 0,138, 43, 12, 0,157, 64, 0, 0, 64, 57, 60, 0, 0, 72, /* 0x09b0 */ 40, 0, 82,235, 32, 0, 82,233, 16, 0, 18,233, 0, 80,186,127,
/* 0x09c0 */ 8, 0, 82,233, 0, 0,170, 47, 8, 1,158, 65, 0, 0, 96, 56, /* 0x09c0 */ 36, 0,158, 64, 20, 66, 90,127, 20,250, 90,127,208, 0, 90,125,
/* 0x09d0 */ 0, 16,128, 56, 3, 0,160, 56, 34, 0,192, 56,255,255,224, 56, /* 0x09d0 */ 56,152, 74,125, 15, 0,138, 43, 12, 0,157, 64, 0, 0, 64, 57,
/* 0x09e0 */ 0, 0, 0, 57,161,249,255, 75, 0, 0, 0, 96,121, 27,122,124, /* 0x09e0 */ 60, 0, 0, 72, 8, 0, 82,233, 0, 0,170, 47, 0, 1,158, 65,
/* 0x09f0 */ 96, 0,130, 65, 1, 0, 64, 57, 0, 68, 32, 61, 0, 0,170, 47, /* 0x09f0 */ 0, 0, 96, 56, 0, 16,128, 56, 3, 0,160, 56, 34, 0,192, 56,
/* 0x0a00 */ 2, 0, 41, 97, 0, 0, 58,145,236,127, 32, 61,120,251, 41, 97, /* 0x0a00 */ 255,255,224, 56, 0, 0, 0, 57,125,249,255, 75, 0, 0, 0, 96,
/* 0x0a10 */ 4, 0, 58,145,128, 56, 32, 61, 8, 0, 58,145,128, 78, 32, 61, /* 0x0a10 */ 121, 27,122,124, 88, 0,130, 65, 1, 0, 64, 57, 0, 68, 32, 61,
/* 0x0a20 */ 32, 0, 41, 97, 12, 0, 58,145, 24, 0,158, 65,120,211, 67,127, /* 0x0a20 */ 128, 56, 0, 61, 12, 0,218,145, 2, 0, 41, 97, 0, 0,170, 47,
/* 0x0a30 */ 12, 0,128, 56, 5, 0,160, 56,149,249,255, 75, 0, 0, 0, 96, /* 0x0a30 */ 8, 0, 26,145, 0, 0, 58,145,236,127, 32, 61,120,251, 41, 97,
/* 0x0a40 */ 152, 0, 97,232, 0, 0,128, 56,120,211, 69,127,169,251,255, 75, /* 0x0a40 */ 4, 0, 58,145, 24, 0,158, 65,120,211, 67,127, 12, 0,128, 56,
/* 0x0a50 */ 120,243,195,127,120,219,100,127,180, 7,133,126,113,249,255, 75, /* 0x0a50 */ 5, 0,160, 56,121,249,255, 75, 0, 0, 0, 96,152, 0, 97,232,
/* 0x0a60 */ 0, 0, 0, 96, 0, 0,163, 47,184,254,222, 64, 64,176,189,127, /* 0x0a60 */ 0, 0,128, 56,120,211, 69,127,141,251,255, 75,120,243,195,127,
/* 0x0a70 */ 44, 0,156, 64,120,235,163,127, 80,176,157,124,180, 7,133,126, /* 0x0a70 */ 120,219,100,127,180, 7,133,126, 85,249,255, 75, 0, 0, 0, 96,
/* 0x0a80 */ 50, 0,192, 56,255,255,224, 56, 0, 0, 0, 57,249,248,255, 75, /* 0x0a80 */ 0, 0,163, 47,188,254,222, 64, 64,176,189,127, 44, 0,156, 64,
/* 0x0a90 */ 0, 0, 0, 96, 0, 24,189,127,136,254,222, 64, 1, 0, 57, 59, /* 0x0a90 */ 120,235,163,127, 80,176,157,124,180, 7,133,126, 50, 0,192, 56,
/* 0x0aa0 */ 56, 0, 82, 58,180, 7, 57,127, 68,253,255, 75, 0, 0,181, 47, /* 0x0aa0 */ 255,255,224, 56, 0, 0, 0, 57,221,248,255, 75, 0, 0, 0, 96,
/* 0x0ab0 */ 8, 0,158, 65, 0, 0,245,251, 48, 1, 33, 56, 24, 0,124,232, /* 0x0ab0 */ 0, 24,189,127,140,254,222, 64, 1, 0, 57, 59, 56, 0, 82, 58,
/* 0x0ac0 */ 20, 26,127,124, 8, 0,129,129, 32,129,144,125,228, 1, 0, 72, /* 0x0ac0 */ 180, 7, 57,127, 44,253,255, 75, 0, 0,181, 47, 8, 0,158, 65,
/* 0x0ad0 */ 144, 0, 33,233, 20, 66, 73,127, 24, 0, 90, 59, 28,255,255, 75, /* 0x0ad0 */ 0, 0,245,251, 48, 1, 33, 56, 24, 0,124,232, 20, 26,127,124,
/* 0x0ae0 */ 0, 0, 0, 0, 0, 0, 0, 3,128, 18, 0, 0,166, 2, 8,124, /* 0x0ae0 */ 8, 0,129,129, 32,129,144,125,228, 1, 0, 72,144, 0, 33,233,
/* 0x0af0 */ 153, 1, 0, 72, 17,255, 33,248,120, 75, 61,125, 0, 0, 35,129, /* 0x0af0 */ 20, 66, 73,127, 24, 0, 90, 59, 36,255,255, 75, 0, 0, 0, 0,
/* 0x0b00 */ 120, 43,191,124,120, 51,218,124, 0, 0,192, 56,120, 83, 88,125, /* 0x0b00 */ 0, 0, 0, 3,128, 18, 0, 0,166, 2, 8,124,153, 1, 0, 72,
/* 0x0b10 */ 144, 0, 33,249,152, 0,161,248,120, 59,229,124, 64, 0,159, 59, /* 0x0b10 */ 17,255, 33,248,120, 75, 61,125, 0, 0, 35,129,120, 43,191,124,
/* 0x0b20 */ 4, 0, 35,129,120, 0, 97,248, 0, 0,192, 59,136, 0, 97,248, /* 0x0b20 */ 120, 51,218,124, 0, 0,192, 56,120, 83, 88,125,144, 0, 33,249,
/* 0x0b30 */ 128, 0,129,248, 12, 0, 41, 57,160, 0,225,248,168, 0, 1,249, /* 0x0b30 */ 152, 0,161,248,120, 59,229,124, 64, 0,159, 59, 4, 0, 35,129,
/* 0x0b40 */ 112, 0, 33,249,112, 0, 97, 56,144, 0,129, 56, 9,249,255, 75, /* 0x0b40 */ 120, 0, 97,248, 0, 0,192, 59,136, 0, 97,248,128, 0,129,248,
/* 0x0b50 */ 160, 0,225,232,168, 0, 1,233,128, 0,129, 56, 0, 0,160, 56, /* 0x0b50 */ 12, 0, 41, 57,160, 0,225,248,168, 0, 1,249,112, 0, 33,249,
/* 0x0b60 */ 120,211, 70,127,120,235,169,127,120,195, 10,127,120,251,227,127, /* 0x0b60 */ 112, 0, 97, 56,144, 0,129, 56,237,248,255, 75,160, 0,225,232,
/* 0x0b70 */ 221,250,255, 75, 9, 0,128, 56,120, 27,123,124,120,211, 67,127, /* 0x0b70 */ 168, 0, 1,233,128, 0,129, 56, 0, 0,160, 56,120,211, 70,127,
/* 0x0b80 */ 120,219,101,127,113,250,255, 75, 56, 0, 63,161, 64,240,137,127, /* 0x0b80 */ 120,235,169,127,120,195, 10,127,120,251,227,127,193,250,255, 75,
/* 0x0b90 */ 184, 0,157, 64, 0, 0, 60,129, 3, 0,137, 47,156, 0,158, 64, /* 0x0b90 */ 9, 0,128, 56,120, 27,123,124,120,211, 67,127,120,219,101,127,
/* 0x0ba0 */ 16, 0,124,232, 0, 0, 61,233, 0, 0,128, 56, 0, 0,160, 56, /* 0x0ba0 */ 85,250,255, 75, 56, 0, 63,161, 64,240,137,127,184, 0,157, 64,
/* 0x0bb0 */ 20, 74, 99,124, 9,248,255, 75, 0, 0, 0, 96, 0, 0,131, 47, /* 0x0bb0 */ 0, 0, 60,129, 3, 0,137, 47,156, 0,158, 64, 16, 0,124,232,
/* 0x0bc0 */ 120, 27,121,124, 16, 0,252, 64,127, 0, 96, 56,209,247,255, 75, /* 0x0bc0 */ 0, 0, 61,233, 0, 0,128, 56, 0, 0,160, 56, 20, 74, 99,124,
/* 0x0bd0 */ 0, 0, 0, 96,120,251,228,127, 0, 4,160, 56,217,247,255, 75, /* 0x0bd0 */ 237,247,255, 75, 0, 0, 0, 96, 0, 0,131, 47,120, 27,121,124,
/* 0x0be0 */ 0, 0, 0, 96, 0, 4,163, 47,224,255,222, 64, 0, 0, 32, 57, /* 0x0be0 */ 16, 0,252, 64,127, 0, 96, 56,181,247,255, 75, 0, 0, 0, 96,
/* 0x0bf0 */ 0, 0,128, 56, 0, 0, 61,249,120,203, 37,127, 0, 0,192, 56, /* 0x0bf0 */ 120,251,228,127, 0, 4,160, 56,189,247,255, 75, 0, 0, 0, 96,
/* 0x0c00 */ 0, 0,224, 56, 0, 0, 0, 57,120,235,169,127,120,195, 10,127, /* 0x0c00 */ 0, 4,163, 47,224,255,222, 64, 0, 0, 32, 57, 0, 0,128, 56,
/* 0x0c10 */ 120,251,227,127, 57,250,255, 75, 0, 0,189,232, 7, 0,128, 56, /* 0x0c10 */ 0, 0, 61,249,120,203, 37,127, 0, 0,192, 56, 0, 0,224, 56,
/* 0x0c20 */ 120, 27,123,124,120,211, 67,127,205,249,255, 75,120,203, 35,127, /* 0x0c20 */ 0, 0, 0, 57,120,235,169,127,120,195, 10,127,120,251,227,127,
/* 0x0c30 */ 149,247,255, 75, 0, 0, 0, 96, 1, 0,222, 59, 56, 0,156, 59, /* 0x0c30 */ 29,250,255, 75, 0, 0,189,232, 7, 0,128, 56,120, 27,123,124,
/* 0x0c40 */ 32, 0,222,123, 68,255,255, 75,240, 0, 33, 56,120,219, 99,127, /* 0x0c40 */ 120,211, 67,127,177,249,255, 75,120,203, 35,127,121,247,255, 75,
/* 0x0c50 */ 136, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 1,128, 8, 0, 0, /* 0x0c50 */ 0, 0, 0, 96, 1, 0,222, 59, 56, 0,156, 59, 32, 0,222,123,
/* 0x0c60 */ 112,255,193,249,120,255,225,249,128,255, 1,250,136,255, 33,250, /* 0x0c60 */ 68,255,255, 75,240, 0, 33, 56,120,219, 99,127,136, 0, 0, 72,
/* 0x0c70 */ 144,255, 65,250,152,255, 97,250,160,255,129,250,168,255,161,250, /* 0x0c70 */ 0, 0, 0, 0, 0, 0, 0, 1,128, 8, 0, 0,112,255,193,249,
/* 0x0c80 */ 176,255,193,250,184,255,225,250,192,255, 1,251,200,255, 33,251, /* 0x0c80 */ 120,255,225,249,128,255, 1,250,136,255, 33,250,144,255, 65,250,
/* 0x0c90 */ 208,255, 65,251,216,255, 97,251,224,255,129,251,232,255,161,251, /* 0x0c90 */ 152,255, 97,250,160,255,129,250,168,255,161,250,176,255,193,250,
/* 0x0ca0 */ 240,255,193,251,248,255,225,251, 16, 0, 1,248, 32, 0,128, 78, /* 0x0ca0 */ 184,255,225,250,192,255, 1,251,200,255, 33,251,208,255, 65,251,
/* 0x0cb0 */ 112,255,193,233,120,255,225,233,128,255, 1,234,136,255, 33,234, /* 0x0cb0 */ 216,255, 97,251,224,255,129,251,232,255,161,251,240,255,193,251,
/* 0x0cc0 */ 144,255, 65,234,152,255, 97,234,160,255,129,234,168,255,161,234, /* 0x0cc0 */ 248,255,225,251, 16, 0, 1,248, 32, 0,128, 78,112,255,193,233,
/* 0x0cd0 */ 176,255,193,234,184,255,225,234,192,255, 1,235,200,255, 33,235, /* 0x0cd0 */ 120,255,225,233,128,255, 1,234,136,255, 33,234,144,255, 65,234,
/* 0x0ce0 */ 208,255, 65,235,216,255, 97,235,224,255,129,235, 16, 0, 1,232, /* 0x0ce0 */ 152,255, 97,234,160,255,129,234,168,255,161,234,176,255,193,234,
/* 0x0cf0 */ 232,255,161,235,166, 3, 8,124,240,255,193,235,248,255,225,235, /* 0x0cf0 */ 184,255,225,234,192,255, 1,235,200,255, 33,235,208,255, 65,235,
/* 0x0d00 */ 32, 0,128, 78, 0, 0, 0, 0,228, 3, 16, 0, 0, 0, 0, 0, /* 0x0d00 */ 216,255, 97,235,224,255,129,235, 16, 0, 1,232,232,255,161,235,
/* 0x0d10 */ 8,141, 16, 0, 0, 0, 0, 0, 84, 4, 16, 0, 0, 0, 0, 0, /* 0x0d10 */ 166, 3, 8,124,240,255,193,235,248,255,225,235, 32, 0,128, 78,
/* 0x0d20 */ 8,141, 16, 0, 0, 0, 0, 0,244, 5, 16, 0, 0, 0, 0, 0, /* 0x0d20 */ 228, 3, 16, 0, 0, 0, 0, 0, 32,141, 16, 0, 0, 0, 0, 0,
/* 0x0d30 */ 8,141, 16, 0, 0, 0, 0, 0, 76, 6, 16, 0, 0, 0, 0, 0, /* 0x0d30 */ 84, 4, 16, 0, 0, 0, 0, 0, 32,141, 16, 0, 0, 0, 0, 0,
/* 0x0d40 */ 8,141, 16, 0, 0, 0, 0, 0,236, 10, 16, 0, 0, 0, 0, 0, /* 0x0d40 */ 244, 5, 16, 0, 0, 0, 0, 0, 32,141, 16, 0, 0, 0, 0, 0,
/* 0x0d50 */ 8,141, 16 /* 0x0d50 */ 76, 6, 16, 0, 0, 0, 0, 0, 32,141, 16, 0, 0, 0, 0, 0,
/* 0x0d60 */ 8, 11, 16, 0, 0, 0, 0, 0, 32,141, 16
}; };
+4 -1
View File
@@ -523,7 +523,10 @@ do_xmap(
DPRINTF("mmap addr=%%p mlen=%%p offset=%%p lo_frag=%%p prot=%%x\\n", DPRINTF("mmap addr=%%p mlen=%%p offset=%%p lo_frag=%%p prot=%%x\\n",
addr, mlen, phdr->p_offset - lo_frag, lo_frag, prot); addr, mlen, phdr->p_offset - lo_frag, lo_frag, prot);
if (addr != mmap(addr, mlen, prot | (xi ? PROT_WRITE : 0), if (addr != mmap(addr, mlen,
// If compressed, then we need PROT_WRITE to de-compress;
// but then SELinux 'execmod' requires no PROT_EXEC for now.
(prot | (xi ? PROT_WRITE : 0)) &~ (xi ? PROT_EXEC : 0),
MAP_FIXED | MAP_PRIVATE | (xi ? MAP_ANONYMOUS : 0), MAP_FIXED | MAP_PRIVATE | (xi ? MAP_ANONYMOUS : 0),
(xi ? -1 : fdi), phdr->p_offset - lo_frag) ) { (xi ? -1 : fdi), phdr->p_offset - lo_frag) ) {
err_exit(8); err_exit(8);
+7 -6
View File
@@ -38,12 +38,12 @@
#define lsrc r1 #define lsrc r1
#define dst r2 #define dst r2
#define ldst r3 /* Out: actually a reference: &len_dst */ #define ldst r3 /* Out: actually a reference: &len_dst */
#define meth [sp,#0] #define meth [sp,#0] /* as arg5 to f_exp: 32-bit unsigned */
// bkpt // debugging // bkpt // debugging
#define M_LZMA 14 #define M_LZMA 14
ldrb ip,meth; cmp ip,#M_LZMA; bne not_lzma ldr ip,meth; cmp ip,#M_LZMA; bne not_lzma
#if defined(LINUX_ARM_CACHEFLUSH)||defined(DARWIN_ARM_CACHEFLUSH) /*{*/ #if defined(LINUX_ARM_CACHEFLUSH)||defined(DARWIN_ARM_CACHEFLUSH) /*{*/
PUSH {dst,ldst, fp,lr} // dst,ldst for cache flush PUSH {dst,ldst, fp,lr} // dst,ldst for cache flush
@@ -125,8 +125,11 @@
mov r0,r4 // result value mov r0,r4 // result value
#endif /*}*/ #endif /*}*/
POP {fp,pc} POP {fp,pc} // RETURN!
1: not_lzma:
bkpt // we are lost
1: // fall through into lzma decoding subroutine
section LZMA_DEC20 section LZMA_DEC20
#include "lzma_d_cf.S" #include "lzma_d_cf.S"
@@ -141,7 +144,5 @@
section LZMA_DEC30 section LZMA_DEC30
not_lzma:
// vi:ts=8:et // vi:ts=8:et
+10 -10
View File
@@ -8,7 +8,7 @@ Linker script and memory map
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc) 0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
.text 0x00000000001000bc 0x874 .text 0x00000000001000bc 0x88c
*(.text) *(.text)
.text 0x00000000001000bc 0x199 tmp/amd64-linux.elf-fold.o .text 0x00000000001000bc 0x199 tmp/amd64-linux.elf-fold.o
0x0000000000100245 munmap 0x0000000000100245 munmap
@@ -21,20 +21,20 @@ Linker script and memory map
0x0000000000100249 mprotect 0x0000000000100249 mprotect
0x000000000010023d close 0x000000000010023d close
*fill* 0x0000000000100255 0x3 00 *fill* 0x0000000000100255 0x3 00
.text 0x0000000000100258 0x6d7 tmp/amd64-linux.elf-main.o .text 0x0000000000100258 0x6ee tmp/amd64-linux.elf-main.o
0x00000000001007e7 upx_main 0x00000000001007fe upx_main
*(.data) *(.data)
*fill* 0x000000000010092f 0x1 00 *fill* 0x0000000000100946 0x2 00
.data 0x0000000000100930 0x0 tmp/amd64-linux.elf-fold.o .data 0x0000000000100948 0x0 tmp/amd64-linux.elf-fold.o
.data 0x0000000000100930 0x0 tmp/amd64-linux.elf-main.o .data 0x0000000000100948 0x0 tmp/amd64-linux.elf-main.o
.data .data
.bss 0x0000000000100930 0x0 .bss 0x0000000000100948 0x0
.bss 0x0000000000100930 0x0 tmp/amd64-linux.elf-fold.o .bss 0x0000000000100948 0x0 tmp/amd64-linux.elf-fold.o
.bss 0x0000000000100930 0x0 tmp/amd64-linux.elf-main.o .bss 0x0000000000100948 0x0 tmp/amd64-linux.elf-main.o
.rela.dyn 0x0000000000100930 0x0 .rela.dyn 0x0000000000100948 0x0
.rela.text 0x0000000000000000 0x0 tmp/amd64-linux.elf-fold.o .rela.text 0x0000000000000000 0x0 tmp/amd64-linux.elf-fold.o
LOAD tmp/amd64-linux.elf-fold.o LOAD tmp/amd64-linux.elf-fold.o
LOAD tmp/amd64-linux.elf-main.o LOAD tmp/amd64-linux.elf-main.o
+8 -8
View File
@@ -8,12 +8,12 @@ Idx Name Size VMA LMA File off Algn Flags
3 NRV2E 0000012c 00000000 00000000 00000040 2**0 CONTENTS, RELOC, READONLY 3 NRV2E 0000012c 00000000 00000000 00000040 2**0 CONTENTS, RELOC, READONLY
4 NRV2D 00000118 00000000 00000000 0000016c 2**0 CONTENTS, RELOC, READONLY 4 NRV2D 00000118 00000000 00000000 0000016c 2**0 CONTENTS, RELOC, READONLY
5 NRV2B 000000dc 00000000 00000000 00000284 2**0 CONTENTS, RELOC, READONLY 5 NRV2B 000000dc 00000000 00000000 00000284 2**0 CONTENTS, RELOC, READONLY
6 LZMA_ELF00 000000a8 00000000 00000000 00000360 2**0 CONTENTS, RELOC, READONLY 6 LZMA_ELF00 000000ac 00000000 00000000 00000360 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000938 00000000 00000000 00000408 2**0 CONTENTS, RELOC, READONLY 7 LZMA_DEC20 00000938 00000000 00000000 0000040c 2**0 CONTENTS, RELOC, READONLY
8 LZMA_DEC10 00000478 00000000 00000000 00000d40 2**0 CONTENTS, RELOC, READONLY 8 LZMA_DEC10 00000478 00000000 00000000 00000d44 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 000011b8 2**0 CONTENTS, READONLY 9 LZMA_DEC30 00000000 00000000 00000000 000011bc 2**0 CONTENTS, READONLY
10 ELFMAINY 00000000 00000000 00000000 000011b8 2**0 CONTENTS, READONLY 10 ELFMAINY 00000000 00000000 00000000 000011bc 2**0 CONTENTS, READONLY
11 ELFMAINZ 000000f0 00000000 00000000 000011b8 2**2 CONTENTS, RELOC, READONLY 11 ELFMAINZ 000000f0 00000000 00000000 000011bc 2**2 CONTENTS, RELOC, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E 00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D 00000000 l d NRV2D 00000000 NRV2D
@@ -21,11 +21,11 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINZ 00000000 ELFMAINZ 00000000 l d ELFMAINZ 00000000 ELFMAINZ
00000000 l d ELFMAINX 00000000 ELFMAINX 00000000 l d ELFMAINX 00000000 ELFMAINX
00000000 l d NRV_HEAD 00000000 NRV_HEAD 00000000 l d NRV_HEAD 00000000 NRV_HEAD
00000000 l d NRV_TAIL 00000000 NRV_TAIL 00000000 l d NRV_TAIL 00000000 NRV_TAIL
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINY 00000000 ELFMAINY 00000000 l d ELFMAINY 00000000 ELFMAINY
00000000 *UND* 00000000 MFLG 00000000 *UND* 00000000 MFLG
00000004 g ELFMAINX 00000000 _start 00000004 g ELFMAINX 00000000 _start
@@ -110,7 +110,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+8 -8
View File
@@ -8,12 +8,12 @@ Idx Name Size VMA LMA File off Algn Flags
3 NRV2D 00000130 00000000 00000000 00000184 2**0 CONTENTS, RELOC, READONLY 3 NRV2D 00000130 00000000 00000000 00000184 2**0 CONTENTS, RELOC, READONLY
4 NRV2B 000000f4 00000000 00000000 000002b4 2**0 CONTENTS, RELOC, READONLY 4 NRV2B 000000f4 00000000 00000000 000002b4 2**0 CONTENTS, RELOC, READONLY
5 NRV_TAIL 00000000 00000000 00000000 000003a8 2**0 CONTENTS, READONLY 5 NRV_TAIL 00000000 00000000 00000000 000003a8 2**0 CONTENTS, READONLY
6 LZMA_ELF00 000000bc 00000000 00000000 000003a8 2**0 CONTENTS, RELOC, READONLY 6 LZMA_ELF00 000000c0 00000000 00000000 000003a8 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000938 00000000 00000000 00000464 2**0 CONTENTS, RELOC, READONLY 7 LZMA_DEC20 00000938 00000000 00000000 00000468 2**0 CONTENTS, RELOC, READONLY
8 LZMA_DEC10 00000478 00000000 00000000 00000d9c 2**0 CONTENTS, RELOC, READONLY 8 LZMA_DEC10 00000478 00000000 00000000 00000da0 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 00001214 2**0 CONTENTS, READONLY 9 LZMA_DEC30 00000000 00000000 00000000 00001218 2**0 CONTENTS, READONLY
10 MACHMAINY 00000000 00000000 00000000 00001214 2**0 CONTENTS, READONLY 10 MACHMAINY 00000000 00000000 00000000 00001218 2**0 CONTENTS, READONLY
11 MACHMAINZ 00000184 00000000 00000000 00001214 2**0 CONTENTS, RELOC, READONLY 11 MACHMAINZ 00000184 00000000 00000000 00001218 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E 00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D 00000000 l d NRV2D 00000000 NRV2D
@@ -21,11 +21,11 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d MACHMAINZ 00000000 MACHMAINZ 00000000 l d MACHMAINZ 00000000 MACHMAINZ
00000000 l d MACHMAINX 00000000 MACHMAINX 00000000 l d MACHMAINX 00000000 MACHMAINX
00000000 l d NRV_HEAD 00000000 NRV_HEAD 00000000 l d NRV_HEAD 00000000 NRV_HEAD
00000000 l d NRV_TAIL 00000000 NRV_TAIL 00000000 l d NRV_TAIL 00000000 NRV_TAIL
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d MACHMAINY 00000000 MACHMAINY 00000000 l d MACHMAINY 00000000 MACHMAINY
00000000 g MACHMAINX 00000000 _start 00000000 g MACHMAINX 00000000 _start
00000000 g F NRV2E 00000144 ucl_nrv2e_decompress_8 00000000 g F NRV2E 00000144 ucl_nrv2e_decompress_8
@@ -106,7 +106,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+8 -8
View File
@@ -8,12 +8,12 @@ Idx Name Size VMA LMA File off Algn Flags
3 NRV2E 0000013c 00000000 00000000 00000040 2**0 CONTENTS, RELOC, READONLY 3 NRV2E 0000013c 00000000 00000000 00000040 2**0 CONTENTS, RELOC, READONLY
4 NRV2D 00000128 00000000 00000000 0000017c 2**0 CONTENTS, RELOC, READONLY 4 NRV2D 00000128 00000000 00000000 0000017c 2**0 CONTENTS, RELOC, READONLY
5 NRV2B 000000ec 00000000 00000000 000002a4 2**0 CONTENTS, RELOC, READONLY 5 NRV2B 000000ec 00000000 00000000 000002a4 2**0 CONTENTS, RELOC, READONLY
6 LZMA_ELF00 000000b8 00000000 00000000 00000390 2**0 CONTENTS, RELOC, READONLY 6 LZMA_ELF00 000000bc 00000000 00000000 00000390 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000938 00000000 00000000 00000448 2**0 CONTENTS, RELOC, READONLY 7 LZMA_DEC20 00000938 00000000 00000000 0000044c 2**0 CONTENTS, RELOC, READONLY
8 LZMA_DEC10 00000478 00000000 00000000 00000d80 2**0 CONTENTS, RELOC, READONLY 8 LZMA_DEC10 00000478 00000000 00000000 00000d84 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 000011f8 2**0 CONTENTS, READONLY 9 LZMA_DEC30 00000000 00000000 00000000 000011fc 2**0 CONTENTS, READONLY
10 ELFMAINY 00000000 00000000 00000000 000011f8 2**0 CONTENTS, READONLY 10 ELFMAINY 00000000 00000000 00000000 000011fc 2**0 CONTENTS, READONLY
11 ELFMAINZ 00000104 00000000 00000000 000011f8 2**2 CONTENTS, RELOC, READONLY 11 ELFMAINZ 00000104 00000000 00000000 000011fc 2**2 CONTENTS, RELOC, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E 00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D 00000000 l d NRV2D 00000000 NRV2D
@@ -21,11 +21,11 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINZ 00000000 ELFMAINZ 00000000 l d ELFMAINZ 00000000 ELFMAINZ
00000000 l d ELFMAINX 00000000 ELFMAINX 00000000 l d ELFMAINX 00000000 ELFMAINX
00000000 l d NRV_HEAD 00000000 NRV_HEAD 00000000 l d NRV_HEAD 00000000 NRV_HEAD
00000000 l d NRV_TAIL 00000000 NRV_TAIL 00000000 l d NRV_TAIL 00000000 NRV_TAIL
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINY 00000000 ELFMAINY 00000000 l d ELFMAINY 00000000 ELFMAINY
00000000 *UND* 00000000 MFLG 00000000 *UND* 00000000 MFLG
00000004 g ELFMAINX 00000000 _start 00000004 g ELFMAINX 00000000 _start
@@ -110,7 +110,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+7 -7
View File
@@ -13,11 +13,11 @@ Idx Name Size VMA LMA File off Algn Flags
8 NRV2B 000000c4 00000000 00000000 000000ec 2**0 CONTENTS, RELOC, READONLY 8 NRV2B 000000c4 00000000 00000000 000000ec 2**0 CONTENTS, RELOC, READONLY
9 NRV2D 00000100 00000000 00000000 000001b0 2**0 CONTENTS, RELOC, READONLY 9 NRV2D 00000100 00000000 00000000 000001b0 2**0 CONTENTS, RELOC, READONLY
10 NRV2E 00000114 00000000 00000000 000002b0 2**0 CONTENTS, RELOC, READONLY 10 NRV2E 00000114 00000000 00000000 000002b0 2**0 CONTENTS, RELOC, READONLY
11 LZMA_ELF00 0000008c 00000000 00000000 000003c4 2**0 CONTENTS, RELOC, READONLY 11 LZMA_ELF00 00000090 00000000 00000000 000003c4 2**0 CONTENTS, RELOC, READONLY
12 LZMA_DEC20 00000938 00000000 00000000 00000450 2**0 CONTENTS, RELOC, READONLY 12 LZMA_DEC20 00000938 00000000 00000000 00000454 2**0 CONTENTS, RELOC, READONLY
13 LZMA_DEC10 00000478 00000000 00000000 00000d88 2**0 CONTENTS, RELOC, READONLY 13 LZMA_DEC10 00000478 00000000 00000000 00000d8c 2**0 CONTENTS, RELOC, READONLY
14 LZMA_DEC30 00000000 00000000 00000000 00001200 2**0 CONTENTS, READONLY 14 LZMA_DEC30 00000000 00000000 00000000 00001204 2**0 CONTENTS, READONLY
15 UPX1HEAD 00000020 00000000 00000000 00001200 2**0 CONTENTS, READONLY 15 UPX1HEAD 00000020 00000000 00000000 00001204 2**0 CONTENTS, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d LINUX000 00000000 LINUX000 00000000 l d LINUX000 00000000 LINUX000
00000000 l d ctok32.00 00000000 ctok32.00 00000000 l d ctok32.00 00000000 ctok32.00
@@ -29,11 +29,11 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d LINUX010 00000000 LINUX010 00000000 l d LINUX010 00000000 LINUX010
00000000 l d LINUX020 00000000 LINUX020 00000000 l d LINUX020 00000000 LINUX020
00000000 l d ctok32.50 00000000 ctok32.50 00000000 l d ctok32.50 00000000 ctok32.50
00000000 l d ctok32.51 00000000 ctok32.51 00000000 l d ctok32.51 00000000 ctok32.51
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d UPX1HEAD 00000000 UPX1HEAD 00000000 l d UPX1HEAD 00000000 UPX1HEAD
00000000 *UND* 00000000 METHOD 00000000 *UND* 00000000 METHOD
00000000 *UND* 00000000 COMPRESSED_LENGTH 00000000 *UND* 00000000 COMPRESSED_LENGTH
@@ -133,7 +133,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+7 -7
View File
@@ -13,11 +13,11 @@ Idx Name Size VMA LMA File off Algn Flags
8 NRV2B 000000c4 00000000 00000000 000000ec 2**0 CONTENTS, RELOC, READONLY 8 NRV2B 000000c4 00000000 00000000 000000ec 2**0 CONTENTS, RELOC, READONLY
9 NRV2D 00000100 00000000 00000000 000001b0 2**0 CONTENTS, RELOC, READONLY 9 NRV2D 00000100 00000000 00000000 000001b0 2**0 CONTENTS, RELOC, READONLY
10 NRV2E 00000114 00000000 00000000 000002b0 2**0 CONTENTS, RELOC, READONLY 10 NRV2E 00000114 00000000 00000000 000002b0 2**0 CONTENTS, RELOC, READONLY
11 LZMA_ELF00 0000008c 00000000 00000000 000003c4 2**0 CONTENTS, RELOC, READONLY 11 LZMA_ELF00 00000090 00000000 00000000 000003c4 2**0 CONTENTS, RELOC, READONLY
12 LZMA_DEC20 00000938 00000000 00000000 00000450 2**0 CONTENTS, RELOC, READONLY 12 LZMA_DEC20 00000938 00000000 00000000 00000454 2**0 CONTENTS, RELOC, READONLY
13 LZMA_DEC10 00000478 00000000 00000000 00000d88 2**0 CONTENTS, RELOC, READONLY 13 LZMA_DEC10 00000478 00000000 00000000 00000d8c 2**0 CONTENTS, RELOC, READONLY
14 LZMA_DEC30 00000000 00000000 00000000 00001200 2**0 CONTENTS, READONLY 14 LZMA_DEC30 00000000 00000000 00000000 00001204 2**0 CONTENTS, READONLY
15 UPX1HEAD 00000020 00000000 00000000 00001200 2**0 CONTENTS, READONLY 15 UPX1HEAD 00000020 00000000 00000000 00001204 2**0 CONTENTS, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d LINUX000 00000000 LINUX000 00000000 l d LINUX000 00000000 LINUX000
00000000 l d ctok32.00 00000000 ctok32.00 00000000 l d ctok32.00 00000000 ctok32.00
@@ -29,11 +29,11 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d LINUX010 00000000 LINUX010 00000000 l d LINUX010 00000000 LINUX010
00000000 l d LINUX020 00000000 LINUX020 00000000 l d LINUX020 00000000 LINUX020
00000000 l d ctok32.50 00000000 ctok32.50 00000000 l d ctok32.50 00000000 ctok32.50
00000000 l d ctok32.51 00000000 ctok32.51 00000000 l d ctok32.51 00000000 ctok32.51
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d UPX1HEAD 00000000 UPX1HEAD 00000000 l d UPX1HEAD 00000000 UPX1HEAD
00000000 *UND* 00000000 METHOD 00000000 *UND* 00000000 METHOD
00000000 *UND* 00000000 COMPRESSED_LENGTH 00000000 *UND* 00000000 COMPRESSED_LENGTH
@@ -133,7 +133,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+8 -8
View File
@@ -8,12 +8,12 @@ Idx Name Size VMA LMA File off Algn Flags
3 NRV2E 0000013c 00000000 00000000 00000048 2**0 CONTENTS, RELOC, READONLY 3 NRV2E 0000013c 00000000 00000000 00000048 2**0 CONTENTS, RELOC, READONLY
4 NRV2D 00000128 00000000 00000000 00000184 2**0 CONTENTS, RELOC, READONLY 4 NRV2D 00000128 00000000 00000000 00000184 2**0 CONTENTS, RELOC, READONLY
5 NRV2B 000000ec 00000000 00000000 000002ac 2**0 CONTENTS, RELOC, READONLY 5 NRV2B 000000ec 00000000 00000000 000002ac 2**0 CONTENTS, RELOC, READONLY
6 LZMA_ELF00 000000b8 00000000 00000000 00000398 2**0 CONTENTS, RELOC, READONLY 6 LZMA_ELF00 000000bc 00000000 00000000 00000398 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000938 00000000 00000000 00000450 2**0 CONTENTS, RELOC, READONLY 7 LZMA_DEC20 00000938 00000000 00000000 00000454 2**0 CONTENTS, RELOC, READONLY
8 LZMA_DEC10 00000478 00000000 00000000 00000d88 2**0 CONTENTS, RELOC, READONLY 8 LZMA_DEC10 00000478 00000000 00000000 00000d8c 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 00001200 2**0 CONTENTS, READONLY 9 LZMA_DEC30 00000000 00000000 00000000 00001204 2**0 CONTENTS, READONLY
10 ELFMAINY 0000003e 00000000 00000000 00001200 2**0 CONTENTS, READONLY 10 ELFMAINY 0000003e 00000000 00000000 00001204 2**0 CONTENTS, READONLY
11 ELFMAINZ 00000310 00000000 00000000 0000123e 2**0 CONTENTS, RELOC, READONLY 11 ELFMAINZ 00000310 00000000 00000000 00001242 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E 00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D 00000000 l d NRV2D 00000000 NRV2D
@@ -21,11 +21,11 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINZ 00000000 ELFMAINZ 00000000 l d ELFMAINZ 00000000 ELFMAINZ
00000000 l d ELFMAINX 00000000 ELFMAINX 00000000 l d ELFMAINX 00000000 ELFMAINX
00000000 l d NRV_HEAD 00000000 NRV_HEAD 00000000 l d NRV_HEAD 00000000 NRV_HEAD
00000000 l d NRV_TAIL 00000000 NRV_TAIL 00000000 l d NRV_TAIL 00000000 NRV_TAIL
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINY 00000000 ELFMAINY 00000000 l d ELFMAINY 00000000 ELFMAINY
00000000 g ELFMAINX 00000000 _start 00000000 g ELFMAINX 00000000 _start
00000000 g F NRV2E 0000013c ucl_nrv2e_decompress_8 00000000 g F NRV2E 0000013c ucl_nrv2e_decompress_8
@@ -106,7 +106,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+8 -8
View File
@@ -8,12 +8,12 @@ Idx Name Size VMA LMA File off Algn Flags
3 NRV2E 0000013c 00000000 00000000 000000d4 2**0 CONTENTS, RELOC, READONLY 3 NRV2E 0000013c 00000000 00000000 000000d4 2**0 CONTENTS, RELOC, READONLY
4 NRV2D 00000128 00000000 00000000 00000210 2**0 CONTENTS, RELOC, READONLY 4 NRV2D 00000128 00000000 00000000 00000210 2**0 CONTENTS, RELOC, READONLY
5 NRV2B 000000ec 00000000 00000000 00000338 2**0 CONTENTS, RELOC, READONLY 5 NRV2B 000000ec 00000000 00000000 00000338 2**0 CONTENTS, RELOC, READONLY
6 LZMA_ELF00 000000b8 00000000 00000000 00000424 2**0 CONTENTS, RELOC, READONLY 6 LZMA_ELF00 000000bc 00000000 00000000 00000424 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000938 00000000 00000000 000004dc 2**0 CONTENTS, RELOC, READONLY 7 LZMA_DEC20 00000938 00000000 00000000 000004e0 2**0 CONTENTS, RELOC, READONLY
8 LZMA_DEC10 00000478 00000000 00000000 00000e14 2**0 CONTENTS, RELOC, READONLY 8 LZMA_DEC10 00000478 00000000 00000000 00000e18 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 0000128c 2**0 CONTENTS, READONLY 9 LZMA_DEC30 00000000 00000000 00000000 00001290 2**0 CONTENTS, READONLY
10 ELFMAINY 0000003e 00000000 00000000 0000128c 2**0 CONTENTS, READONLY 10 ELFMAINY 0000003e 00000000 00000000 00001290 2**0 CONTENTS, READONLY
11 ELFMAINZ 00000184 00000000 00000000 000012cc 2**2 CONTENTS, RELOC, READONLY 11 ELFMAINZ 00000184 00000000 00000000 000012d0 2**2 CONTENTS, RELOC, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l ELFMAINX 00000000 .real_start_ofELFMAINX 00000000 l ELFMAINX 00000000 .real_start_ofELFMAINX
00000000 l d NRV2E 00000000 NRV2E 00000000 l d NRV2E 00000000 NRV2E
@@ -22,12 +22,12 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINZ 00000000 ELFMAINZ 00000000 l d ELFMAINZ 00000000 ELFMAINZ
00000000 l ELFMAINZ 00000000 .real_start_ofELFMAINZ 00000000 l ELFMAINZ 00000000 .real_start_ofELFMAINZ
00000000 l d ELFMAINX 00000000 ELFMAINX 00000000 l d ELFMAINX 00000000 ELFMAINX
00000000 l d NRV_HEAD 00000000 NRV_HEAD 00000000 l d NRV_HEAD 00000000 NRV_HEAD
00000000 l d NRV_TAIL 00000000 NRV_TAIL 00000000 l d NRV_TAIL 00000000 NRV_TAIL
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINY 00000000 ELFMAINY 00000000 l d ELFMAINY 00000000 ELFMAINY
00000000 g ELFMAINX 00000000 _start 00000000 g ELFMAINX 00000000 _start
00000000 g F NRV2E 0000013c ucl_nrv2e_decompress_8 00000000 g F NRV2E 0000013c ucl_nrv2e_decompress_8
@@ -112,7 +112,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+14 -14
View File
@@ -8,7 +8,7 @@ Linker script and memory map
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc) 0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
.text 0x00000000001000bc 0xa0c .text 0x00000000001000bc 0xa1c
*(.text) *(.text)
.text 0x00000000001000bc 0x268 tmp/arm64-linux.elf-fold.o .text 0x00000000001000bc 0x268 tmp/arm64-linux.elf-fold.o
0x0000000000100258 my_bkpt 0x0000000000100258 my_bkpt
@@ -26,26 +26,26 @@ Linker script and memory map
0x00000000001002ec readlink 0x00000000001002ec readlink
0x00000000001002f4 open 0x00000000001002f4 open
0x0000000000100310 __clear_cache 0x0000000000100310 __clear_cache
.text 0x0000000000100324 0x7a4 tmp/arm64-linux.elf-main.o .text 0x0000000000100324 0x7b4 tmp/arm64-linux.elf-main.o
0x0000000000100960 upx_main 0x0000000000100970 upx_main
*(.data) *(.data)
.data 0x0000000000100ac8 0x0 tmp/arm64-linux.elf-fold.o .data 0x0000000000100ad8 0x0 tmp/arm64-linux.elf-fold.o
.data 0x0000000000100ac8 0x0 tmp/arm64-linux.elf-main.o .data 0x0000000000100ad8 0x0 tmp/arm64-linux.elf-main.o
.iplt 0x0000000000100ac8 0x0 .iplt 0x0000000000100ad8 0x0
.iplt 0x0000000000100ac8 0x0 tmp/arm64-linux.elf-fold.o .iplt 0x0000000000100ad8 0x0 tmp/arm64-linux.elf-fold.o
.rela.dyn 0x0000000000100ac8 0x0 .rela.dyn 0x0000000000100ad8 0x0
.rela.iplt 0x0000000000100ac8 0x0 tmp/arm64-linux.elf-fold.o .rela.iplt 0x0000000000100ad8 0x0 tmp/arm64-linux.elf-fold.o
.data .data
LOAD tmp/arm64-linux.elf-fold.o LOAD tmp/arm64-linux.elf-fold.o
LOAD tmp/arm64-linux.elf-main.o LOAD tmp/arm64-linux.elf-main.o
OUTPUT(tmp/arm64-linux.elf-fold.bin elf64-littleaarch64) OUTPUT(tmp/arm64-linux.elf-fold.bin elf64-littleaarch64)
.igot.plt 0x0000000000100ac8 0x0 .igot.plt 0x0000000000100ad8 0x0
.igot.plt 0x0000000000100ac8 0x0 tmp/arm64-linux.elf-fold.o .igot.plt 0x0000000000100ad8 0x0 tmp/arm64-linux.elf-fold.o
.bss 0x0000000000100ac8 0x0 .bss 0x0000000000100ad8 0x0
.bss 0x0000000000100ac8 0x0 tmp/arm64-linux.elf-fold.o .bss 0x0000000000100ad8 0x0 tmp/arm64-linux.elf-fold.o
.bss 0x0000000000100ac8 0x0 tmp/arm64-linux.elf-main.o .bss 0x0000000000100ad8 0x0 tmp/arm64-linux.elf-main.o
+8 -8
View File
@@ -8,12 +8,12 @@ Idx Name Size VMA LMA File off Algn Flags
3 NRV2E 0000012c 00000000 00000000 00000040 2**0 CONTENTS, RELOC, READONLY 3 NRV2E 0000012c 00000000 00000000 00000040 2**0 CONTENTS, RELOC, READONLY
4 NRV2D 00000118 00000000 00000000 0000016c 2**0 CONTENTS, RELOC, READONLY 4 NRV2D 00000118 00000000 00000000 0000016c 2**0 CONTENTS, RELOC, READONLY
5 NRV2B 000000dc 00000000 00000000 00000284 2**0 CONTENTS, RELOC, READONLY 5 NRV2B 000000dc 00000000 00000000 00000284 2**0 CONTENTS, RELOC, READONLY
6 LZMA_ELF00 000000a8 00000000 00000000 00000360 2**0 CONTENTS, RELOC, READONLY 6 LZMA_ELF00 000000ac 00000000 00000000 00000360 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000938 00000000 00000000 00000408 2**0 CONTENTS, RELOC, READONLY 7 LZMA_DEC20 00000938 00000000 00000000 0000040c 2**0 CONTENTS, RELOC, READONLY
8 LZMA_DEC10 00000478 00000000 00000000 00000d40 2**0 CONTENTS, RELOC, READONLY 8 LZMA_DEC10 00000478 00000000 00000000 00000d44 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 000011b8 2**0 CONTENTS, READONLY 9 LZMA_DEC30 00000000 00000000 00000000 000011bc 2**0 CONTENTS, READONLY
10 ELFMAINY 00000000 00000000 00000000 000011b8 2**0 CONTENTS, READONLY 10 ELFMAINY 00000000 00000000 00000000 000011bc 2**0 CONTENTS, READONLY
11 ELFMAINZ 000000f0 00000000 00000000 000011b8 2**2 CONTENTS, RELOC, READONLY 11 ELFMAINZ 000000f0 00000000 00000000 000011bc 2**2 CONTENTS, RELOC, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E 00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D 00000000 l d NRV2D 00000000 NRV2D
@@ -21,11 +21,11 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINZ 00000000 ELFMAINZ 00000000 l d ELFMAINZ 00000000 ELFMAINZ
00000000 l d ELFMAINX 00000000 ELFMAINX 00000000 l d ELFMAINX 00000000 ELFMAINX
00000000 l d NRV_HEAD 00000000 NRV_HEAD 00000000 l d NRV_HEAD 00000000 NRV_HEAD
00000000 l d NRV_TAIL 00000000 NRV_TAIL 00000000 l d NRV_TAIL 00000000 NRV_TAIL
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d ELFMAINY 00000000 ELFMAINY 00000000 l d ELFMAINY 00000000 ELFMAINY
00000000 *UND* 00000000 MFLG 00000000 *UND* 00000000 MFLG
00000004 g ELFMAINX 00000000 _start 00000004 g ELFMAINX 00000000 _start
@@ -110,7 +110,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+7 -7
View File
@@ -13,11 +13,11 @@ Idx Name Size VMA LMA File off Algn Flags
8 NRV2B 000000c4 00000000 00000000 000000ec 2**0 CONTENTS, RELOC, READONLY 8 NRV2B 000000c4 00000000 00000000 000000ec 2**0 CONTENTS, RELOC, READONLY
9 NRV2D 00000100 00000000 00000000 000001b0 2**0 CONTENTS, RELOC, READONLY 9 NRV2D 00000100 00000000 00000000 000001b0 2**0 CONTENTS, RELOC, READONLY
10 NRV2E 00000114 00000000 00000000 000002b0 2**0 CONTENTS, RELOC, READONLY 10 NRV2E 00000114 00000000 00000000 000002b0 2**0 CONTENTS, RELOC, READONLY
11 LZMA_ELF00 0000008c 00000000 00000000 000003c4 2**0 CONTENTS, RELOC, READONLY 11 LZMA_ELF00 00000090 00000000 00000000 000003c4 2**0 CONTENTS, RELOC, READONLY
12 LZMA_DEC20 00000938 00000000 00000000 00000450 2**0 CONTENTS, RELOC, READONLY 12 LZMA_DEC20 00000938 00000000 00000000 00000454 2**0 CONTENTS, RELOC, READONLY
13 LZMA_DEC10 00000478 00000000 00000000 00000d88 2**0 CONTENTS, RELOC, READONLY 13 LZMA_DEC10 00000478 00000000 00000000 00000d8c 2**0 CONTENTS, RELOC, READONLY
14 LZMA_DEC30 00000000 00000000 00000000 00001200 2**0 CONTENTS, READONLY 14 LZMA_DEC30 00000000 00000000 00000000 00001204 2**0 CONTENTS, READONLY
15 UPX1HEAD 00000020 00000000 00000000 00001200 2**0 CONTENTS, READONLY 15 UPX1HEAD 00000020 00000000 00000000 00001204 2**0 CONTENTS, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d LINUX000 00000000 LINUX000 00000000 l d LINUX000 00000000 LINUX000
00000000 l d ctok32.00 00000000 ctok32.00 00000000 l d ctok32.00 00000000 ctok32.00
@@ -29,11 +29,11 @@ SYMBOL TABLE:
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00 00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20 00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10 00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d LINUX010 00000000 LINUX010 00000000 l d LINUX010 00000000 LINUX010
00000000 l d LINUX020 00000000 LINUX020 00000000 l d LINUX020 00000000 LINUX020
00000000 l d ctok32.50 00000000 ctok32.50 00000000 l d ctok32.50 00000000 ctok32.50
00000000 l d ctok32.51 00000000 ctok32.51 00000000 l d ctok32.51 00000000 ctok32.51
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d UPX1HEAD 00000000 UPX1HEAD 00000000 l d UPX1HEAD 00000000 UPX1HEAD
00000000 *UND* 00000000 METHOD 00000000 *UND* 00000000 METHOD
00000000 *UND* 00000000 COMPRESSED_LENGTH 00000000 *UND* 00000000 COMPRESSED_LENGTH
@@ -133,7 +133,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LZMA_ELF00]: RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30 00000008 R_ARM_PC24 LZMA_ELF00
0000004c R_ARM_PC24 LZMA_ELF00 0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00 00000080 R_ARM_PC24 LZMA_ELF00
+30 -30
View File
@@ -9,7 +9,7 @@ Linker script and memory map
TARGET(elf64-powerpc) TARGET(elf64-powerpc)
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc) 0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
.text 0x00000000001000bc 0xba8 .text 0x00000000001000bc 0xbc4
*(.text) *(.text)
.text 0x00000000001000bc 0x328 tmp/powerpc64-linux.elf-fold.o .text 0x00000000001000bc 0x328 tmp/powerpc64-linux.elf-fold.o
0x00000000001000bc get_page_mask 0x00000000001000bc get_page_mask
@@ -23,47 +23,47 @@ TARGET(elf64-powerpc)
0x00000000001003cc mprotect 0x00000000001003cc mprotect
0x00000000001003d4 munmap 0x00000000001003d4 munmap
0x00000000001003dc my_bkpt 0x00000000001003dc my_bkpt
.text 0x00000000001003e4 0x880 tmp/powerpc64-linux.elf-main.o .text 0x00000000001003e4 0x89c tmp/powerpc64-linux.elf-main.o
*(.data) *(.data)
.data 0x0000000000100c64 0x0 tmp/powerpc64-linux.elf-fold.o .data 0x0000000000100c80 0x0 tmp/powerpc64-linux.elf-fold.o
.data 0x0000000000100c64 0x0 tmp/powerpc64-linux.elf-main.o .data 0x0000000000100c80 0x0 tmp/powerpc64-linux.elf-main.o
.sfpr 0x0000000000100c64 0xa4 .sfpr 0x0000000000100c80 0xa4
.sfpr 0x0000000000100c64 0xa4 linker stubs .sfpr 0x0000000000100c80 0xa4 linker stubs
0x0000000000100c64 _savegpr0_14 0x0000000000100c80 _savegpr0_14
0x0000000000100c8c _savegpr0_24 0x0000000000100ca8 _savegpr0_24
0x0000000000100c9c _savegpr0_28 0x0000000000100cb8 _savegpr0_28
0x0000000000100cb4 _restgpr0_14 0x0000000000100cd0 _restgpr0_14
0x0000000000100cdc _restgpr0_24 0x0000000000100cf8 _restgpr0_24
0x0000000000100cec _restgpr0_28 0x0000000000100d08 _restgpr0_28
.glink 0x0000000000100d08 0x0 .glink 0x0000000000100d28 0x0
.glink 0x0000000000100d08 0x0 linker stubs .glink 0x0000000000100d28 0x0 linker stubs
.eh_frame 0x0000000000100d08 0x0 .eh_frame 0x0000000000100d24 0x0
.eh_frame 0x0000000000100d08 0x0 linker stubs .eh_frame 0x0000000000100d24 0x0 linker stubs
.rela.dyn 0x0000000000100d08 0x0 .rela.dyn 0x0000000000100d28 0x0
.rela.iplt 0x0000000000100d08 0x0 linker stubs .rela.iplt 0x0000000000100d28 0x0 linker stubs
.data .data
LOAD tmp/powerpc64-linux.elf-fold.o LOAD tmp/powerpc64-linux.elf-fold.o
LOAD tmp/powerpc64-linux.elf-main.o LOAD tmp/powerpc64-linux.elf-main.o
OUTPUT(tmp/powerpc64-linux.elf-fold.bin elf64-powerpc) OUTPUT(tmp/powerpc64-linux.elf-fold.bin elf64-powerpc)
.branch_lt 0x0000000000100d08 0x0 .branch_lt 0x0000000000100d28 0x0
.branch_lt 0x0000000000100d08 0x0 linker stubs .branch_lt 0x0000000000100d28 0x0 linker stubs
.toc 0x0000000000100d08 0x0 .toc 0x0000000000100d28 0x0
.toc 0x0000000000100d08 0x0 tmp/powerpc64-linux.elf-main.o .toc 0x0000000000100d28 0x0 tmp/powerpc64-linux.elf-main.o
.opd 0x0000000000100d08 0x58 .opd 0x0000000000100d28 0x58
.opd 0x0000000000100d08 0x58 tmp/powerpc64-linux.elf-main.o .opd 0x0000000000100d28 0x58 tmp/powerpc64-linux.elf-main.o
0x0000000000100d48 upx_main 0x0000000000100d68 upx_main
.iplt 0x0000000000100d60 0x0 .iplt 0x0000000000100d80 0x0
.iplt 0x0000000000100d60 0x0 linker stubs .iplt 0x0000000000100d80 0x0 linker stubs
.bss 0x0000000000100d60 0x0 .bss 0x0000000000100d80 0x0
.bss 0x0000000000100d60 0x0 tmp/powerpc64-linux.elf-fold.o .bss 0x0000000000100d80 0x0 tmp/powerpc64-linux.elf-fold.o
.bss 0x0000000000100d60 0x0 tmp/powerpc64-linux.elf-main.o .bss 0x0000000000100d80 0x0 tmp/powerpc64-linux.elf-main.o
+30 -30
View File
@@ -9,7 +9,7 @@ Linker script and memory map
TARGET(elf64-powerpcle) TARGET(elf64-powerpcle)
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc) 0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
.text 0x00000000001000bc 0xba4 .text 0x00000000001000bc 0xbc0
*(.text) *(.text)
.text 0x00000000001000bc 0x328 tmp/powerpc64le-linux.elf-fold.o .text 0x00000000001000bc 0x328 tmp/powerpc64le-linux.elf-fold.o
0x00000000001000bc get_page_mask 0x00000000001000bc get_page_mask
@@ -23,47 +23,47 @@ TARGET(elf64-powerpcle)
0x00000000001003cc mprotect 0x00000000001003cc mprotect
0x00000000001003d4 munmap 0x00000000001003d4 munmap
0x00000000001003dc my_bkpt 0x00000000001003dc my_bkpt
.text 0x00000000001003e4 0x87c tmp/powerpc64le-linux.elf-main.o .text 0x00000000001003e4 0x898 tmp/powerpc64le-linux.elf-main.o
*(.data) *(.data)
.data 0x0000000000100c60 0x0 tmp/powerpc64le-linux.elf-fold.o .data 0x0000000000100c7c 0x0 tmp/powerpc64le-linux.elf-fold.o
.data 0x0000000000100c60 0x0 tmp/powerpc64le-linux.elf-main.o .data 0x0000000000100c7c 0x0 tmp/powerpc64le-linux.elf-main.o
.sfpr 0x0000000000100c60 0xa4 .sfpr 0x0000000000100c7c 0xa4
.sfpr 0x0000000000100c60 0xa4 linker stubs .sfpr 0x0000000000100c7c 0xa4 linker stubs
0x0000000000100c60 _savegpr0_14 0x0000000000100c7c _savegpr0_14
0x0000000000100c88 _savegpr0_24 0x0000000000100ca4 _savegpr0_24
0x0000000000100c98 _savegpr0_28 0x0000000000100cb4 _savegpr0_28
0x0000000000100cb0 _restgpr0_14 0x0000000000100ccc _restgpr0_14
0x0000000000100cd8 _restgpr0_24 0x0000000000100cf4 _restgpr0_24
0x0000000000100ce8 _restgpr0_28 0x0000000000100d04 _restgpr0_28
.glink 0x0000000000100d08 0x0 .glink 0x0000000000100d20 0x0
.glink 0x0000000000100d08 0x0 linker stubs .glink 0x0000000000100d20 0x0 linker stubs
.eh_frame 0x0000000000100d04 0x0 .eh_frame 0x0000000000100d20 0x0
.eh_frame 0x0000000000100d04 0x0 linker stubs .eh_frame 0x0000000000100d20 0x0 linker stubs
.rela.dyn 0x0000000000100d08 0x0 .rela.dyn 0x0000000000100d20 0x0
.rela.iplt 0x0000000000100d08 0x0 linker stubs .rela.iplt 0x0000000000100d20 0x0 linker stubs
.data .data
LOAD tmp/powerpc64le-linux.elf-fold.o LOAD tmp/powerpc64le-linux.elf-fold.o
LOAD tmp/powerpc64le-linux.elf-main.o LOAD tmp/powerpc64le-linux.elf-main.o
OUTPUT(tmp/powerpc64le-linux.elf-fold.bin elf64-powerpcle) OUTPUT(tmp/powerpc64le-linux.elf-fold.bin elf64-powerpcle)
.branch_lt 0x0000000000100d08 0x0 .branch_lt 0x0000000000100d20 0x0
.branch_lt 0x0000000000100d08 0x0 linker stubs .branch_lt 0x0000000000100d20 0x0 linker stubs
.toc 0x0000000000100d08 0x0 .toc 0x0000000000100d20 0x0
.toc 0x0000000000100d08 0x0 tmp/powerpc64le-linux.elf-main.o .toc 0x0000000000100d20 0x0 tmp/powerpc64le-linux.elf-main.o
.opd 0x0000000000100d08 0x58 .opd 0x0000000000100d20 0x58
.opd 0x0000000000100d08 0x58 tmp/powerpc64le-linux.elf-main.o .opd 0x0000000000100d20 0x58 tmp/powerpc64le-linux.elf-main.o
0x0000000000100d48 upx_main 0x0000000000100d60 upx_main
.iplt 0x0000000000100d60 0x0 .iplt 0x0000000000100d78 0x0
.iplt 0x0000000000100d60 0x0 linker stubs .iplt 0x0000000000100d78 0x0 linker stubs
.bss 0x0000000000100d60 0x0 .bss 0x0000000000100d78 0x0
.bss 0x0000000000100d60 0x0 tmp/powerpc64le-linux.elf-fold.o .bss 0x0000000000100d78 0x0 tmp/powerpc64le-linux.elf-fold.o
.bss 0x0000000000100d60 0x0 tmp/powerpc64le-linux.elf-main.o .bss 0x0000000000100d78 0x0 tmp/powerpc64le-linux.elf-main.o
+12 -1
View File
@@ -29,7 +29,9 @@
#ifndef UPX_BPTR_H__ #ifndef UPX_BPTR_H__
#define UPX_BPTR_H__ 1 #define UPX_BPTR_H__ 1
#if WITH_SPAN >= 2
#error "this file is deprecated, please use xspan.h instead" #error "this file is deprecated, please use xspan.h instead"
#endif
/************************************************************************* /*************************************************************************
// BoundedPtr // BoundedPtr
@@ -38,6 +40,9 @@
template <class T> template <class T>
class BoundedPtr { class BoundedPtr {
public: public:
typedef T element_type;
typedef typename std::add_pointer<T>::type pointer;
~BoundedPtr() {} ~BoundedPtr() {}
BoundedPtr(void *base, size_t size_in_bytes, T *ptr = nullptr) BoundedPtr(void *base, size_t size_in_bytes, T *ptr = nullptr)
@@ -135,9 +140,15 @@ private:
// raw_bytes overload // raw_bytes overload
template <class T> template <class T>
inline T *raw_bytes(const BoundedPtr<T> &a, size_t size_in_bytes) { inline typename BoundedPtr<T>::pointer raw_bytes(const BoundedPtr<T> &a, size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes); return a.raw_bytes(size_in_bytes);
} }
template <class T>
inline typename BoundedPtr<T>::pointer raw_index_bytes(const BoundedPtr<T> &a, size_t index,
size_t size_in_bytes) {
typedef typename BoundedPtr<T>::element_type element_type;
return raw_bytes(a, mem_size(sizeof(element_type), index, size_in_bytes)) + index;
}
#endif /* already included */ #endif /* already included */
+5 -1
View File
@@ -35,6 +35,7 @@ int upx_doctest_check(int argc, char **argv) {
#if defined(DOCTEST_CONFIG_DISABLE) #if defined(DOCTEST_CONFIG_DISABLE)
UNUSED(argc); UNUSED(argc);
UNUSED(argv); UNUSED(argv);
return 0;
#else #else
const char *e = getenv("UPX_DEBUG_DOCTEST_DISABLE"); const char *e = getenv("UPX_DEBUG_DOCTEST_DISABLE");
if (e && e[0] && strcmp(e, "0") != 0) if (e && e[0] && strcmp(e, "0") != 0)
@@ -72,8 +73,8 @@ int upx_doctest_check(int argc, char **argv) {
return 1; return 1;
if (context.shouldExit()) if (context.shouldExit())
return 2; return 2;
#endif // DOCTEST_CONFIG_DISABLE
return 0; return 0;
#endif // DOCTEST_CONFIG_DISABLE
} }
int upx_doctest_check() { return upx_doctest_check(0, nullptr); } int upx_doctest_check() { return upx_doctest_check(0, nullptr); }
@@ -98,6 +99,9 @@ ACC_COMPILE_TIME_ASSERT_HEADER(bswap32(0x04030201) == 0x01020304)
ACC_COMPILE_TIME_ASSERT_HEADER(bswap64(0x0807060504030201ull) == 0x0102030405060708ull) ACC_COMPILE_TIME_ASSERT_HEADER(bswap64(0x0807060504030201ull) == 0x0102030405060708ull)
#endif #endif
ACC_COMPILE_TIME_ASSERT_HEADER(compile_time::string_len("") == 0)
ACC_COMPILE_TIME_ASSERT_HEADER(compile_time::string_len("a") == 1)
ACC_COMPILE_TIME_ASSERT_HEADER(compile_time::string_eq("", "")) ACC_COMPILE_TIME_ASSERT_HEADER(compile_time::string_eq("", ""))
ACC_COMPILE_TIME_ASSERT_HEADER(!compile_time::string_eq("a", "")) ACC_COMPILE_TIME_ASSERT_HEADER(!compile_time::string_eq("a", ""))
ACC_COMPILE_TIME_ASSERT_HEADER(!compile_time::string_eq("", "a")) ACC_COMPILE_TIME_ASSERT_HEADER(!compile_time::string_eq("", "a"))
+6
View File
@@ -128,6 +128,12 @@ inline typename MemBufferBase<T>::pointer raw_bytes(const MemBufferBase<T> &mbb,
size_t size_in_bytes) { size_t size_in_bytes) {
return mbb.raw_bytes(size_in_bytes); return mbb.raw_bytes(size_in_bytes);
} }
template <class T>
inline typename MemBufferBase<T>::pointer raw_index_bytes(const MemBufferBase<T> &mbb, size_t index,
size_t size_in_bytes) {
typedef typename MemBufferBase<T>::element_type element_type;
return raw_bytes(mbb, mem_size(sizeof(element_type), index, size_in_bytes)) + index;
}
// global operators // global operators
// rewrite "n + membuffer" to "membuffer + n" so that this will get checked above // rewrite "n + membuffer" to "membuffer + n" so that this will get checked above
+18
View File
@@ -96,6 +96,15 @@ TEST_CASE("basic xspan usage") {
CHECK(cs == bp); CHECK(cs == bp);
CHECK(x0 == z0p); CHECK(x0 == z0p);
CHECK(xp == z0s); CHECK(xp == z0s);
CHECK(raw_bytes(c0, 4) == buf);
CHECK(raw_index_bytes(c0, 1, 3) == buf + 1);
CHECK(raw_bytes(cp, 4) == buf);
CHECK(raw_index_bytes(cp, 1, 3) == buf + 1);
CHECK(raw_bytes(cs, 4) == buf);
CHECK(raw_index_bytes(cs, 1, 3) == buf + 1);
CHECK_THROWS(raw_bytes(cs, 5));
CHECK_THROWS(raw_index_bytes(cs, 1, 4));
} }
SUBCASE("SPAN_x_VAR") { SUBCASE("SPAN_x_VAR") {
@@ -127,6 +136,15 @@ TEST_CASE("basic xspan usage") {
CHECK(d0 == ds); CHECK(d0 == ds);
CHECK(x0 == z0p); CHECK(x0 == z0p);
CHECK(xp == z0s); CHECK(xp == z0s);
CHECK(raw_bytes(c0, 4) == buf);
CHECK(raw_index_bytes(c0, 1, 3) == buf + 1);
CHECK(raw_bytes(cp, 4) == buf);
CHECK(raw_index_bytes(cp, 1, 3) == buf + 1);
CHECK(raw_bytes(cs, 4) == buf);
CHECK(raw_index_bytes(cs, 1, 3) == buf + 1);
CHECK_THROWS(raw_bytes(cs, 5));
CHECK_THROWS(raw_index_bytes(cs, 1, 4));
} }
SUBCASE("xspan in class") { SUBCASE("xspan in class") {
+1
View File
@@ -61,6 +61,7 @@ using SPAN_NAMESPACE_NAME::PtrOrSpanOrNull;
using SPAN_NAMESPACE_NAME::Span; using SPAN_NAMESPACE_NAME::Span;
// util // util
using SPAN_NAMESPACE_NAME::raw_bytes; // overloaded for all classes using SPAN_NAMESPACE_NAME::raw_bytes; // overloaded for all classes
using SPAN_NAMESPACE_NAME::raw_index_bytes; // overloaded for all classes
#endif #endif
#endif // WITH_SPAN #endif // WITH_SPAN
+5
View File
@@ -110,6 +110,11 @@ SPAN_FWD_TU(void *) memmove(const C<T> &a, const E<U> &b, size_t n) {
} }
#endif #endif
template <class T>
inline void *memset(const C<T> &a, int c, size_t n) {
return memset(a.raw_bytes(n), c, n);
}
/************************************************************************* /*************************************************************************
// overloads for UPX extras // overloads for UPX extras
**************************************************************************/ **************************************************************************/
+20 -30
View File
@@ -143,34 +143,34 @@ struct Span_is_convertible
#if 1 #if 1
// char => char // char => char
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<char, char>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<char, char>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<char, const char>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<char, const char>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<const char, const char>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<const char, const char>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const char, char>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const char, char>::value))
// void => void // void => void
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<void, void>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<void, void>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<void, const void>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<void, const void>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<const void, const void>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<const void, const void>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const void, void>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const void, void>::value))
// char => void // char => void
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<char, void>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<char, void>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<char, const void>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<char, const void>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<const char, const void>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((Span_is_convertible<const char, const void>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const char, void>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const char, void>::value))
// void => char // void => char
ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<void, char>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<void, char>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<void, const char>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<void, const char>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const void, const char>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const void, const char>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const void, char>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const void, char>::value))
// char => int // char => int
ACC_COMPILE_TIME_ASSERT_HEADER(!(Span_is_convertible<char, int>::value)); ACC_COMPILE_TIME_ASSERT_HEADER(!(Span_is_convertible<char, int>::value))
ACC_COMPILE_TIME_ASSERT_HEADER(!(Span_is_convertible<char, const int>::value)); ACC_COMPILE_TIME_ASSERT_HEADER(!(Span_is_convertible<char, const int>::value))
ACC_COMPILE_TIME_ASSERT_HEADER(!(Span_is_convertible<const char, const int>::value)); ACC_COMPILE_TIME_ASSERT_HEADER(!(Span_is_convertible<const char, const int>::value))
ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const char, int>::value)); ACC_COMPILE_TIME_ASSERT_HEADER((!Span_is_convertible<const char, int>::value))
#endif #endif
/************************************************************************* /*************************************************************************
@@ -191,16 +191,6 @@ struct Span;
template <class T> template <class T>
struct Ptr; struct Ptr;
template <class T>
inline typename PtrOrSpanOrNull<T>::pointer raw_bytes(const PtrOrSpanOrNull<T> &a,
size_t size_in_bytes);
template <class T>
inline typename PtrOrSpan<T>::pointer raw_bytes(const PtrOrSpan<T> &a, size_t size_in_bytes);
template <class T>
inline typename Span<T>::pointer raw_bytes(const Span<T> &a, size_t size_in_bytes);
template <class T>
inline typename Ptr<T>::pointer raw_bytes(const Ptr<T> &a, size_t size_in_bytes);
class SpanInternalDummyArg; // not implemented class SpanInternalDummyArg; // not implemented
SPAN_NAMESPACE_END SPAN_NAMESPACE_END
+6
View File
@@ -196,6 +196,12 @@ template <class T>
inline typename Ptr<T>::pointer raw_bytes(const Ptr<T> &a, size_t size_in_bytes) { inline typename Ptr<T>::pointer raw_bytes(const Ptr<T> &a, size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes); return a.raw_bytes(size_in_bytes);
} }
template <class T>
inline typename Ptr<T>::pointer raw_index_bytes(const Ptr<T> &a, size_t index,
size_t size_in_bytes) {
typedef typename Ptr<T>::element_type element_type;
return raw_bytes(a, mem_size(sizeof(element_type), index, size_in_bytes)) + index;
}
/************************************************************************* /*************************************************************************
// //
+6
View File
@@ -96,6 +96,12 @@ inline typename PtrOrSpanOrNull<T>::pointer raw_bytes(const PtrOrSpanOrNull<T> &
size_t size_in_bytes) { size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes); return a.raw_bytes(size_in_bytes);
} }
template <class T>
inline typename PtrOrSpanOrNull<T>::pointer raw_index_bytes(const PtrOrSpanOrNull<T> &a,
size_t index, size_t size_in_bytes) {
typedef typename PtrOrSpanOrNull<T>::element_type element_type;
return raw_bytes(a, mem_size(sizeof(element_type), index, size_in_bytes)) + index;
}
/************************************************************************* /*************************************************************************
// //
+6
View File
@@ -122,6 +122,12 @@ template <class T>
inline typename PtrOrSpan<T>::pointer raw_bytes(const PtrOrSpan<T> &a, size_t size_in_bytes) { inline typename PtrOrSpan<T>::pointer raw_bytes(const PtrOrSpan<T> &a, size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes); return a.raw_bytes(size_in_bytes);
} }
template <class T>
inline typename PtrOrSpan<T>::pointer raw_index_bytes(const PtrOrSpan<T> &a, size_t index,
size_t size_in_bytes) {
typedef typename PtrOrSpan<T>::element_type element_type;
return raw_bytes(a, mem_size(sizeof(element_type), index, size_in_bytes)) + index;
}
/************************************************************************* /*************************************************************************
// //
+6
View File
@@ -122,6 +122,12 @@ template <class T>
inline typename Span<T>::pointer raw_bytes(const Span<T> &a, size_t size_in_bytes) { inline typename Span<T>::pointer raw_bytes(const Span<T> &a, size_t size_in_bytes) {
return a.raw_bytes(size_in_bytes); return a.raw_bytes(size_in_bytes);
} }
template <class T>
inline typename Span<T>::pointer raw_index_bytes(const Span<T> &a, size_t index,
size_t size_in_bytes) {
typedef typename Span<T>::element_type element_type;
return raw_bytes(a, mem_size(sizeof(element_type), index, size_in_bytes)) + index;
}
/************************************************************************* /*************************************************************************
// //
+5 -5
View File
@@ -1,8 +1,8 @@
#define UPX_VERSION_HEX 0x040000 /* 04.00.00 */ #define UPX_VERSION_HEX 0x040001 /* 04.00.01 */
#define UPX_VERSION_STRING "4.0.0" #define UPX_VERSION_STRING "4.0.1"
#define UPX_VERSION_STRING4 "4.00" #define UPX_VERSION_STRING4 "4.01"
#define UPX_VERSION_DATE "Oct 28th 2022" #define UPX_VERSION_DATE "Nov 16th 2022"
#define UPX_VERSION_DATE_ISO "2022-10-28" #define UPX_VERSION_DATE_ISO "2022-11-16"
#define UPX_VERSION_YEAR "2022" #define UPX_VERSION_YEAR "2022"
/* vim:set ts=4 sw=4 et: */ /* vim:set ts=4 sw=4 et: */
+9 -7
View File
@@ -68,6 +68,8 @@ void do_one_file(const char *iname, char *oname) {
else else
throwIOException(iname, errno); throwIOException(iname, errno);
} }
if (S_ISDIR(st.st_mode))
throwIOException("is a directory -- skipped");
if (!(S_ISREG(st.st_mode))) if (!(S_ISREG(st.st_mode)))
throwIOException("not a regular file -- skipped"); throwIOException("not a regular file -- skipped");
#if defined(__unix__) #if defined(__unix__)
@@ -114,13 +116,9 @@ void do_one_file(const char *iname, char *oname) {
throwIOException("data not written to a terminal; Use '-f' to force."); throwIOException("data not written to a terminal; Use '-f' to force.");
} else { } else {
char tname[ACC_FN_PATH_MAX + 1]; char tname[ACC_FN_PATH_MAX + 1];
if (opt->output_name) if (opt->output_name) {
strcpy(tname, opt->output_name); strcpy(tname, opt->output_name);
else { if (opt->force_overwrite || opt->force >= 2) {
if (!maketempname(tname, sizeof(tname), iname, ".upx"))
throwIOException("could not create a temporary file name");
}
if (opt->force >= 2) {
#if (HAVE_CHMOD) #if (HAVE_CHMOD)
r = chmod(tname, 0777); r = chmod(tname, 0777);
IGNORE_ERROR(r); IGNORE_ERROR(r);
@@ -128,8 +126,12 @@ void do_one_file(const char *iname, char *oname) {
r = unlink(tname); r = unlink(tname);
IGNORE_ERROR(r); IGNORE_ERROR(r);
} }
} else {
if (!maketempname(tname, sizeof(tname), iname, ".upx"))
throwIOException("could not create a temporary file name");
}
int flags = O_CREAT | O_WRONLY | O_BINARY; int flags = O_CREAT | O_WRONLY | O_BINARY;
if (opt->force) if (opt->force_overwrite || opt->force)
flags |= O_TRUNC; flags |= O_TRUNC;
else else
flags |= O_EXCL; flags |= O_EXCL;
+1 -1
Vendored
+1 -1
Submodule vendor/ucl updated: 7c71ac7c54...4b58d59219
Vendored
+1 -1