ooooo ooo ooooooooo. ooooooo ooooo `888' `8' `888 `Y88. `8888 d8' 888 8 888 .d88' Y888..8P 888 8 888ooo88P' `8888' 888 8 888 .8PY888. `88. .8' 888 d8' `888b `YbodP' o888o o888o o88888o The Ultimate Packer for eXecutables Copyright (c) 1996-1999 Markus Oberhumer & Laszlo Molnar http://cdata.tvnet.hu/~ml/upx.html http://wildsau.idv.uni-linz.ac.at/mfx/upx.html Table of Contents ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Abstract Disclaimer Introduction Usage Commands Options Notes for the supported executable formats Notes for dos/exe Notes for dos/com Notes for dos/sys Notes for djgpp2/coff Notes for watcom/le Notes for win32/pe Notes for rtm32/pe Notes for tmt/adam Thanks Copyright .__.. , , [__]|_ __-+-._. _. _.-+- | |[_)_) | [ (_](_. | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ UPX is a portable, extensible, high-performance executable packer for several different executable formats. It achieves an excellent compression ratio and offers *very* fast decompression. Your executables suffer no memory overhead or other drawbacks. While you may use UPX freely for both non-commercial and commercial executables (for details see the file LICENSE), we would highly appreciate if you credit UPX and ourselves in the documentation, possibly including a reference to the UPX home page. Thanks. .__ . | \* __ _.| _.*._ _ _ ._. |__/|_) (_.|(_]|[ | )(/,[ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This is a beta-test release, so DO NOT USE THIS VERSION EXCEPT FOR TESTING. Only compress backups of your executables. Be prepared for crashes and other nasty surprises. This version is not compatible with any previous or future release ! UPX comes with ABSOLUTELY NO WARRANTY; for details see the file LICENSE. Having said that, we think that UPX is quite stable. Indeed we have compressed lots of files without any problems. Also, the current version has undergone several months of beta testing. Please report all problems or suggestions to the authors. Thanks. ._. , . , | ._ -+-._. _ _|. . _.-+-* _ ._ _|_[ ) | [ (_)(_](_|(_. | |(_)[ ) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ UPX is a versatile executable packer with the following features: - excellent compression ratio: compresses better than zip/gzip, use UPX to decrease the size of your distribution ! - very fast decompression: about 10 MB/sec on a P133 - no memory overhead for your compressed executables - safe: you can list, test and unpack your executables Also, a checksum of both the compressed and uncompressed file is maintained internally. - universal: UPX can pack a number of executable formats: * dos/exe * dos/sys * dos/com * djgpp2/coff * watcom/le (supporting DOS4G, PMODE/W, DOS32a and CauseWay) * win32/pe * rtm32/pe * tmt/adam - portable: UPX is written in portable endian-neutral C++ (the official version is compiled with djgpp, but we are indeed partly developing it under Linux) - extensible: because of the class layout it's very easy to add new executable types or new compression algorithms [ - free: the final version will be distributed with full source code under the GNU General Public License (GPL) ] You probably understand now why we call UPX the "ultimate" executable packer... __ . / ` _ ._ _ ._ _ _.._ _| __ \__.(_)[ | )[ | )(_][ )(_]_) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The default compression level is `-7'. Note that compression level `-9' can be quite slow for some files. [ to be written ] .__. , | |._ -+-* _ ._ __ |__|[_) | |(_)[ )_) ÄÄÄ |ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ `-q': be quiet, suppress warnings `-q -q' (or `-qq'): be very quiet, suppress errors [ to be written ] . . , ._ . / |\ | _ -+- _ __ |, _ ._. _| _ __ / _ \./ _ | \|(_) | (/,_) | (_)[ (_](_)_) / (/,/'\(/, ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ dos/exe stands for all "normal" 16-bit DOS executables. UPX handles overlays like other exepackers do: it simply copies the overlay after the compressed image. This works with some files, but doesn't work with others. UPX won't work with files that want to read data from themselves (like some Win95 i.e. DOS 7 exes). Compressed programs only work on a 286+. If the dos/exeh method is used (which is the default for files > 70 Kbytes) then compressed programs need a 386+. Extra options available for this executable format: -c do not use the dos/exeh method . . , ._ . / |\ | _ -+- _ __ |, _ ._. _| _ __ / _. _ ._ _ | \|(_) | (/,_) | (_)[ (_](_)_) / (_.(_)[ | ) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ UPX won't work with files that want to read data from themselves (like some Win95 i.e. DOS 7 coms). Compressed programs work on any 8086+. Packed programs will be byte-identical to the original after uncompression. Maximum uncompressed size: ~65100 bytes. . . , ._ . / |\ | _ -+- _ __ |, _ ._. _| _ __ / __ . __ | \|(_) | (/,_) | (_)[ (_](_)_) / _) \_|_) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ _| ÄÄ You can only compress plain sys files, sys/exe (two in one) combos not supported. Compressed programs only work on a 286+. Packed programs will be byte-identical to the original after uncompression. Maximum uncompressed size: ~65350 bytes. . . , ._ . _, / ._._ |\ | _ -+- _ __ |, _ ._. _| * _ ._ ._ '_) / _. _ |,|, | \|(_) | (/,_) | (_)[ (_] |(_][_)[_)/_. / (_.(_)| | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ._|._|| | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ It is recommended to use UPX *instead* of strip - strip has the very bad habit of replacing your stub with it's own (old) version. UPX also corrects a bug (feature?) in strip v2.8+: it will fix the 4 KByte aligment of the stub. Also, UPX includes the full functionality of stubify. Extra options available for this executable format: -c produce COFF output instead of EXE. By default UPX keeps your current stub. UPX handles Allegro packfiles. Packed programs will be byte-identical to the original after uncompression. All debug information will be stripped, though. The DLM format is not supported. Maximum .text section size: 16 MBytes. BTW, UPX is the successor of the DJP executable packer. . . , ._ , / . |\ | _ -+- _ __ |, _ ._. . , _.-+- _. _ ._ _ / | _ | \|(_) | (/,_) | (_)[ \/\/ (_] | (_.(_)[ | )/ |(/, ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ UPX has been successfully tested with the following extenders: DOS4G, DOS4GW, PMODE/W, DOS32a, CauseWay. WDOS/X doesn't work yet. Yes, you can use your compressed executables with DOS4GW. UPX compresses *much* better than PMWLITE. Try it ! Extra options available for this executable format: -c produce an unbound LE output instead of keeping the current stub The LX format is not yet supported. Maximum code object size: 16 MBytes. DLLs are not supported. . . , ._ _, _, / |\ | _ -+- _ __ |, _ ._. . ,*._ '_) '_) / ._ _ | \|(_) | (/,_) | (_)[ \/\/ |[ )._) /_. / [_)(/, ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ | ÄÄÄÄ The PE support in UPX is new and experimental, so there are possibly lots of bugs in it. Compression ratio is the best among other PE packers (see A.C.T. at http://act.by.net/ ). DLLs are supported. Data not in any PE section will be dropped. Uncompression is not supported yet. . . , ._ , _, _, / |\ | _ -+- _ __ |, _ ._. ._.-+-._ _ '_) '_) / ._ _ | \|(_) | (/,_) | (_)[ [ | [ | )._) /_. / [_)(/, ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ | ÄÄÄÄ Same as win32/pe. . . , ._ , , / . |\ | _ -+- _ __ |, _ ._. -+-._ _ -+- / _. _| _.._ _ | \|(_) | (/,_) | (_)[ | [ | ) | / (_](_](_][ | ) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This format is used by the TMT Pascal compiler (http://www.tmt.com/). Since we are no Pascal programmers ;-), this format is fairly untested. Please test it, and report any problem. .___.. . | |_ _.._ ;_/ __ | [ )(_][ )| \_) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Charles W. Sandmann for the ideas with the stubless decompressor in djgpp2/coff. Joergen Ibsen for the address optimization idea. Salvador Eduardo Tropea for the beta testing. Ralph Roth for reporting several bugs. The WINE project (http://www.winehq.com/) for the PE loader sources. DJ Delorie for djgpp. Linus for Linux. Natascha __ . , / ` _ ._ .._.* _ |_ -+- \__.(_)[_)\_|[ |(_][ ) | ÄÄÄÄÄÄ |ÄÄ._|ÄÄÄÄ._|ÄÄÄÄÄ Copyright (C) 1996-1999 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-1999 Laszlo Molnar This program may be used freely, and you are welcome to redistribute it under certain conditions. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the UPX License Agreement for more details. You should have received a copy of the UPX License Agreement along with this program; see the file LICENSE. If not, visit the UPX home page. [ We are planning to distribute UPX under the terms of the GNU General Public License (GPL) once we think it is ready for public source code release. ] Spread and enjoy, Markus & Laszlo Markus F.X.J. Oberhumer Laszlo Molnar markus.oberhumer@jk.uni-linz.ac.at ml1050@cdata.tvnet.hu