fmII
Fri, May 09th home | browse | articles | contact | chat | submit | faq | newsletter | about | stats | scoop 19:13 PDT
in
Section
login «
register «
recover password «
[Project] add release | add branch | add screenshot | broken links | change owner | email subscribers | update project | update branch (urls) [Project]

 UPX - Stable branch
Section: Unix

 

Added: Tue, Mar 30th 1999 00:45 PDT (9 years, 1 month ago) Updated: Tue, Oct 10th 2006 07:32 PDT (1 year, 7 months ago)


About:
UPX is a portable, extendable, 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. UPX supports vmlinuz/386, linux/elf386, linux/386, win32/pe, dos/exe, djgpp2/coff, and many more.

Author:
mfx [contact developer]

Rating:
8.69/10.00 (7 votes)

Homepage:
http://upx.sourceforge.net/
Tar/GZ:
http://upx.sourceforge.net/#download
Zip:
http://upx.sourceforge.net/#download
Changelog:
http://upx.sourceforge.net/upx-news.txt
RPM package:
http://fr.rpmfind.net/linux/rpm2html/search.php?query=upx
Debian package:
http://packages.debian.org/upx-ucl

Trove categories: [change]
[Development Status]  5 - Production/Stable
[Environment]  Console (Text Based)
[Intended Audience]  End Users/Desktop, System Administrators
[License]  OSI Approved :: GNU General Public License (GPL)
[Operating System]  POSIX
[Programming Language]  Assembly, C++
[Topic]  System :: Archiving :: Compression, System :: Boot

Dependencies: [change]
No dependencies filed

 
Project admins: [change]
» mfx (Owner)

» Rating: 8.69/10.00 (Rank N/A)
» Vitality: 0.03% (Rank 2433)
» Popularity: 3.13% (Rank 1404)

project statsdownload stats
(click to enlarge graphs)
   Record hits: 30,433
   URL hits: 15,773
   Subscribers: 79

Other projects from the same categories:
fastjar
Make CD-ROM Recovery
CADmenu
rICMP
mbootpack

Users who subscribed to this project also subscribed to:
Digital Invisible Ink Toolkit
Apache
xxdiff
Visitors Web Log Analyzer
PhpWebGallery


Add comment · Rate this project · Subscribe to new releases · Ignore this project · Email this project to a friend · Project record in XML

 Branches

Branch Version Last release License URLs
Stable 1.25 29-Jun-2004 GNU General Public License (GPL) Homepage Tar/GZ Changelog Hosted on SourceForge.net
Unstable 2.90 10-Oct-2006 GNU General Public License (GPL) Homepage Tar/GZ Changelog Hosted on SourceForge.net

 Comments

[»] magic file patch
by jay unbound - May 13th 1999 12:48:28

here's a patch for your magic file (usually /usr/share/magic) to allow file(1) to do simple recognition of UPX compressed executables. with this patch, running file on a UPX compressed executable you get the following (example) output:


$ file ./gimp
./gimp: ELF 32-bit LSB executable, UPX compressed, Intel 80386, version 1,
statically linked, stripped

# upx.magic.patch
#
# apply this patch to /usr/share/magic to allow file(1) to have simple
#   recognition of UPX (http://wildsau.idv.uni-linz.ac.at/mfx/upx.html)
#   compressed executables
# do (with permissions to write to magic [eg. as root]): 
# cp upx.magic.patch /usr/share && cd /usr/share && patch <
upx.magic.patch
*** magic.old	Sat May  8 04:49:47 1999
--- magic	Thu May 13 18:02:18 1999
***************
*** 1351,1356 ****
--- 1351,1358 ----
  # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  #
  # updated by Daniel Quinlan (quinlan@yggdrasil.com)
+ # UPX (http://wildsau.idv.uni-linz.ac.at/mfx/upx.html) support added
+ #   by Jay Johnston (jajohnst@cs.vassar.edu)
  0	string		\177ELF		ELF
  >4	byte		0		invalid class
  >4	byte		1		32-bit
***************
*** 1360,1365 ****
--- 1362,1368 ----
  >>16	leshort		0		no file type,
  >>16	leshort		1		relocatable,
  >>16	leshort		2		executable,
+ >>>154  string		UPX		UPX compressed,
  >>16	leshort		3		shared object,
  # Core handling from Peter Tobias 
  # corrections by Christian 'Dr. Disk' Hechelmann

[reply] [top]


    [»] PowerPC support?
    by Jeremy Friesner - Jan 9th 2004 10:13:04

    This program would be just the ticket for getting more mileage out of my embedded PowerPC linux card's flash ram storage... but it appears that PowerPC executables are not supported. Any chance of support for PowerPC executables being added soon? (my project uses the 2.4 kernel, fwiw)

    [reply] [top]


[»] whoa there...
by jay unbound - May 13th 1999 12:21:55

To quote your description of UPX on Freshmeat (see the top of this page) and at the top of your documentation for UPX:

"Your executables [when compressed with UPX] suffer no memory overhead or other drawbacks"

While UPX excels at its function, it does create drawbacks for the executables it compresses. I was just clarifying that for those looking at the freshmeat description of UPX (using the comments section for what it's there for).

Furthermore, UPX is a closed-source program, so the only way one in the Linux community can help others in regards to UPX's drawbacks is to spread the knowledge of those drawbacks (as opposed to helping to solve them as one would do if the program was Open Source and gpl'd).

[reply] [top]


[»] Re: damn smooth, but some does have some problems...
by mfx - May 13th 1999 05:28:49

To quote the documentation:

Drawbacks:

  - `ldd' and `size' won't show anything useful because all they
    see is the statically linked stub.
 
  ...

[reply] [top]


[»] damn smooth, but some does have some problems...
by jay unbound - Apr 24th 1999 11:27:43

damn! this util is amazing!!! it does exactly what it says...and real well:


$ cp gimp gimp.upx
$ upx gimp.upx 
                     Ultimate Packer for eXecutables
                  Copyright (C) 1996, 1997, 1998, 1999
UPX v0.71        Markus F.X.J. Oberhumer & Laszlo Molnar        Apr 19th
1999

        File size        Ratio      Format      Name
   -------------------   ------   -----------   -----------
   1252148 ->   513408   41.00%   linux/i386    gimp.upx                  
    

Packed 1 file.

$ ls -fl gimp gimp.upx 
-rwxr-xr-x   1 jajohnst users     1252148 Apr 21 23:23 gimp
-rwxr-xr-x   1 jajohnst users      513408 Apr 24 13:56 gimp.upx

and there's no noticeable lag in the app starting up.

curiously, though, upx (apparently) turns a dynamically linked app into a statically linked one:
$ file ./gimp
./gimp: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically
linked, stripped
$ file ./gimp.upx 
./gimp.upx: ELF 32-bit LSB executable, Intel 80386, version 1, statically
linked, stripped

...but it doesn't really:
$ mv /usr/lib/libgtk-1.2.so.0 /usr/lib/libgtk-1.2.so.0.bak
$ ./gimp.upx 
./gimp.upx: error in loading shared libraries
libgtk-1.2.so.0: cannot open shared object file: No such file or
directory

so, what all means is that the executable is still a dynamically linked executable, but as far as the system tools are concerned it is a statically linked one:
$ ldd ./gimp.upx
        not a dynamic executable

...and that kinda sucks.

- jay

[reply] [top]


    [»] Kernel packing rocks
    by Mark Robson - Nov 13th 2002 08:02:22

    The unstable version 1.90 supports kernel packing - this is excellent for single-disc distributions where every k counts. My kernel decreased in size 20% after upx, and bear in mind that bzImage kernels are in fact compressed with gzip *already* - so it actually beat the existing compression by quite a big margin. The kernel still boots fine, in fact quicker than it did before.

    [reply] [top]




© Copyright 2008 SourceForge, Inc., All Rights Reserved.
About freshmeat.net •  Privacy Statement •  Terms of Use •  Trademark Guidelines •  Advertise •  Contact Us • 
ThinkGeek •  Slashdot  •  ITMJ •  Linux.com •  NewsForge  •  SourceForge.net  •  Surveys •  Jobs •  PriceGrabber