Short: Packer and loader for executables Author: sintonen@iki.fi (Harry Sintonen) Uploader: polluks+aminet sdf lonestar org (Stefan Haubenthal) Type: util/pack Version: 1.3 Architecture: ppc-morphos lzmaLoader 1.3 ============== Preface ------- During the early days when disk storage was rather expensive, or you were stuck with just floppies, it was quite common to use executable packers such as PowerPacker, Imploder or StoneCracker to shave off the extra bytes off binaries. Since then storage media has become ridiculously cheap, but yet in some specific cases you might still want to compress executables. Due to obvious reasons PowerPacker, Imploder and StoneCracker only work with m68k binaries, so for now MorphOS users have been left out in the cold. Fear not, the remedy is here: lzmaLoader. lzmaLoader allows you to use the state-of-the-art compression algorithm LZMA (of the 7-Zip fame) to compress MorphOS ELF executable and then use the lzmaLoader to automatically decrunch and execute the binary. Usage ----- Use the lzma application (included) to compress the ELF binary. Append the resulting compressed file after lzmaLoader. For example: 1.> copy lzmaLoader T:myprogram.packed 1.> lzma e myprogram -so >> T:myprogram.packed Another example, this time using ksh: $ (cat lzmaLoader; lzma e myprogram -so) > /T/myprogram.packed If your binaries are targetting MorphOS 2.5 or newer, you can use the lzmaLoader_shared to gain even smaller binaries. The resulting binary depends on the lzma.library being present to run. For best results you should strip the ELF binary before you lzma it. Technical limitations --------------------- lzmaLoader doesn't support programs which attempt dirty tricks with the program seglist. Making lzmaLoader applications resident doesn't work as expected, either. Streamed LZMA files are NOT supported. Appending invalid data after the loader will result in fireworks. During loading the memory usage maxes at roughly double the original file size. Requirements ------------ lzmaLoader requires MorphOS 1.4 or later. While the resulting program might run under older MorphOS releases aswell, this is not officially supported or guaranteed to work in the possible future lzmaLoader versions. lzmaLoader_shared requires MorphOS 2.5 or newer (lzma.library). Legal ----- lzmaLoader is freeware and copyright © 2007-2011 Harry Sintonen. lzmaLoader decoding routine is based on the Public Domain LZMA SDK. 'lzma' is by Igor Pavlov and is Public Domain. See lzma.txt for details. Executables appended to lzmaLoader or lzmaLoader_shared are not subject to any legal restrictions placed herein. History ------- 11-Aug-2007 - initial release 04-Feb-2009 - second release. smaller loader. DisplayBeep() on errors. 06-Jul-2010 - third release. added hand optimized lzmaLoader_shared. 13-Aug-2011 - fourth release. fixed a bug loading command from path location. Harry "Piru" Sintonen