1UPX(1)                                                                  UPX(1)
2
3
4

NAME

6       upx - compress or expand executable files
7

SYNOPSIS

9       upx [ command ] [ options ] filename...
10

ABSTRACT

12                           The Ultimate Packer for eXecutables
13          Copyright (c) 1996-2022 Markus Oberhumer, Laszlo Molnar & John Reiser
14                                  https://upx.github.io
15
16       UPX is a portable, extendable, high-performance executable packer for
17       several different executable formats. It achieves an excellent
18       compression ratio and offers *very* fast decompression. Your
19       executables suffer no memory overhead or other drawbacks for most of
20       the formats supported, because of in-place decompression.
21

DISCLAIMER

23       UPX comes with ABSOLUTELY NO WARRANTY; for details see the file
24       COPYING.
25
26       Please report all problems or suggestions to the authors. Thanks.
27

SECURITY CONTEXT

29       IMPORTANT NOTE: UPX inherits the security context of any files it
30       handles.
31
32       This means that packing, unpacking, or even testing or listing a file
33       requires the same security considerations as actually executing the
34       file.
35
36       Use UPX on trusted files only!
37

DESCRIPTION

39       UPX is a versatile executable packer with the following features:
40
41         - secure: as UPX is documented Open Source since many years any relevant
42             Security/Antivirus software is able to peek inside UPX compressed
43             apps to verify them
44
45         - excellent compression ratio: typically compresses better than Zip,
46             use UPX to decrease the size of your distribution !
47
48         - very fast decompression: more than 500 MB/sec on any reasonably modern
49             machine
50
51         - no memory overhead for your compressed executables for most of the
52             supported formats because of in-place decompression
53
54         - safe: you can list, test and unpack your executables.
55             Also, a checksum of both the compressed and uncompressed file is
56             maintained internally.
57
58         - universal: UPX can pack a number of executable formats, including
59             Windows programs and DLLs, macOS apps and Linux executables
60
61         - portable: UPX is written in portable endian-neutral C++
62
63         - extendable: because of the class layout it's very easy to support
64             new executable formats or add new compression algorithms
65
66         - free: UPX is distributed with full source code under the GNU General
67             Public License v2+, with special exceptions granting the free usage
68             for commercial programs
69
70       You probably understand now why we call UPX the "ultimate" executable
71       packer.
72

COMMANDS

74   Compress
75       This is the default operation, eg. upx yourfile.exe will compress the
76       file specified on the command line.
77
78   Decompress
79       All UPX supported file formats can be unpacked using the -d switch, eg.
80       upx -d yourfile.exe will uncompress the file you've just compressed.
81
82   Test
83       The -t command tests the integrity of the compressed and uncompressed
84       data, eg. upx -t yourfile.exe check whether your file can be safely
85       decompressed. Note, that this command doesn't check the whole file,
86       only the part that will be uncompressed during program execution. This
87       means that you should not use this command instead of a virus checker.
88
89   List
90       The -l command prints out some information about the compressed files
91       specified on the command line as parameters, eg upx -l yourfile.exe
92       shows the compressed / uncompressed size and the compression ratio of
93       yourfile.exe.
94

OPTIONS

96       -q: be quiet, suppress warnings
97
98       -q -q (or -qq): be very quiet, suppress errors
99
100       -q -q -q (or -qqq): produce no output at all
101
102       --help: prints the help
103
104       --version: print the version of UPX
105
106       --exact: when compressing, require to be able to get a byte-identical
107       file after decompression with option -d. [NOTE: this is work in
108       progress and is not supported for all formats yet. If you do care, as a
109       workaround you can compress and then decompress your program a first
110       time - any further compress-decompress steps should then yield byte-
111       identical results as compared to the first decompressed version.]
112
113       -k: keep backup files
114
115       -o file: write output to file
116
117       [ ...more docs need to be written... - type `upx --help' for now ]
118

COMPRESSION LEVELS & TUNING

120       UPX offers ten different compression levels from -1 to -9, and --best.
121       The default compression level is -8 for files smaller than 512 KiB, and
122       -7 otherwise.
123
124       •   Compression levels 1, 2 and 3 are pretty fast.
125
126       •   Compression levels 4, 5 and 6 achieve a good time/ratio
127           performance.
128
129       •   Compression levels 7, 8 and 9 favor compression ratio over speed.
130
131       •   Compression level --best may take a long time.
132
133       Note that compression level --best can be somewhat slow for large
134       files, but you definitely should use it when releasing a final version
135       of your program.
136
137       Quick info for achieving the best compression ratio:
138
139       •   Try upx --brute --no-lzma myfile.exe or even upx --ultra-brute
140           --no-lzma myfile.exe.
141
142       •   The option --lzma enables LZMA compression, which compresses better
143           but is *significantly slower* at decompression. You probably do not
144           want to use it for large files.
145
146           (Note that --lzma is automatically enabled by --all-methods and
147           --brute, use --no-lzma to override.)
148
149       •   Try if --overlay=strip works.
150
151       •   For win32/pe programs there's --strip-relocs=0. See notes below.
152

OVERLAY HANDLING OPTIONS

154       Info: An "overlay" means auxiliary data attached after the logical end
155       of an executable, and it often contains application specific data (this
156       is a common practice to avoid an extra data file, though it would be
157       better to use resource sections).
158
159       UPX handles overlays like many other executable packers do: it simply
160       copies the overlay after the compressed image. This works with some
161       files, but doesn't work with others, depending on how an application
162       actually accesses this overlayed data.
163
164         --overlay=copy    Copy any extra data attached to the file. [DEFAULT]
165
166         --overlay=strip   Strip any overlay from the program instead of
167                           copying it. Be warned, this may make the compressed
168                           program crash or otherwise unusable.
169
170         --overlay=skip    Refuse to compress any program which has an overlay.
171

ENVIRONMENT VARIABLE

173       The environment variable UPX can hold a set of default options for UPX.
174       These options are interpreted first and can be overwritten by explicit
175       command line parameters.  For example:
176
177           for DOS/Windows:   set UPX=-9 --compress-icons#0
178           for sh/ksh/zsh:    UPX="-9 --compress-icons=0"; export UPX
179           for csh/tcsh:      setenv UPX "-9 --compress-icons=0"
180
181       Under DOS/Windows you must use '#' instead of '=' when setting the
182       environment variable because of a COMMAND.COM limitation.
183
184       Not all of the options are valid in the environment variable - UPX will
185       tell you.
186
187       You can explicitly use the --no-env option to ignore the environment
188       variable.
189

NOTES FOR THE SUPPORTED EXECUTABLE FORMATS

191   NOTES FOR ATARI/TOS
192       This is the executable format used by the Atari ST/TT, a Motorola 68000
193       based personal computer which was popular in the late '80s. Support of
194       this format is only because of nostalgic feelings of one of the authors
195       and serves no practical purpose :-).  See https://freemint.github.io
196       for more info.
197
198       Packed programs will be byte-identical to the original after
199       uncompression.  All debug information will be stripped, though.
200
201       Extra options available for this executable format:
202
203         --all-methods       Compress the program several times, using all
204                             available compression methods. This may improve
205                             the compression ratio in some cases, but usually
206                             the default method gives the best results anyway.
207
208   NOTES FOR BVMLINUZ/I386
209       Same as vmlinuz/i386.
210
211   NOTES FOR DOS/COM
212       Obviously UPX won't work with executables that want to read data from
213       themselves (like some commandline utilities that ship with
214       Win95/98/ME).
215
216       Compressed programs only work on a 286+.
217
218       Packed programs will be byte-identical to the original after
219       uncompression.
220
221       Maximum uncompressed size: ~65100 bytes.
222
223       Extra options available for this executable format:
224
225         --8086              Create an executable that works on any 8086 CPU.
226
227         --all-methods       Compress the program several times, using all
228                             available compression methods. This may improve
229                             the compression ratio in some cases, but usually
230                             the default method gives the best results anyway.
231
232         --all-filters       Compress the program several times, using all
233                             available preprocessing filters. This may improve
234                             the compression ratio in some cases, but usually
235                             the default filter gives the best results anyway.
236
237   NOTES FOR DOS/EXE
238       dos/exe stands for all "normal" 16-bit DOS executables.
239
240       Obviously UPX won't work with executables that want to read data from
241       themselves (like some command line utilities that ship with
242       Win95/98/ME).
243
244       Compressed programs only work on a 286+.
245
246       Extra options available for this executable format:
247
248         --8086              Create an executable that works on any 8086 CPU.
249
250         --no-reloc          Use no relocation records in the exe header.
251
252         --all-methods       Compress the program several times, using all
253                             available compression methods. This may improve
254                             the compression ratio in some cases, but usually
255                             the default method gives the best results anyway.
256
257   NOTES FOR DOS/SYS
258       Compressed programs only work on a 286+.
259
260       Packed programs will be byte-identical to the original after
261       uncompression.
262
263       Maximum uncompressed size: ~65350 bytes.
264
265       Extra options available for this executable format:
266
267         --8086              Create an executable that works on any 8086 CPU.
268
269         --all-methods       Compress the program several times, using all
270                             available compression methods. This may improve
271                             the compression ratio in some cases, but usually
272                             the default method gives the best results anyway.
273
274         --all-filters       Compress the program several times, using all
275                             available preprocessing filters. This may improve
276                             the compression ratio in some cases, but usually
277                             the default filter gives the best results anyway.
278
279   NOTES FOR DJGPP2/COFF
280       First of all, it is recommended to use UPX *instead* of strip. strip
281       has the very bad habit of replacing your stub with its own (outdated)
282       version.  Additionally UPX corrects a bug/feature in strip v2.8.x: it
283       will fix the 4 KiB alignment of the stub.
284
285       UPX includes the full functionality of stubify. This means it will
286       automatically stubify your COFF files. Use the option --coff to disable
287       this functionality (see below).
288
289       UPX automatically handles Allegro packfiles.
290
291       The DLM format (a rather exotic shared library extension) is not
292       supported.
293
294       Packed programs will be byte-identical to the original after
295       uncompression.  All debug information and trailing garbage will be
296       stripped, though.
297
298       Extra options available for this executable format:
299
300         --coff              Produce COFF output instead of EXE. By default
301                             UPX keeps your current stub.
302
303         --all-methods       Compress the program several times, using all
304                             available compression methods. This may improve
305                             the compression ratio in some cases, but usually
306                             the default method gives the best results anyway.
307
308         --all-filters       Compress the program several times, using all
309                             available preprocessing filters. This may improve
310                             the compression ratio in some cases, but usually
311                             the default filter gives the best results anyway.
312
313   NOTES FOR LINUX [general]
314       Introduction
315
316         Linux/386 support in UPX consists of 3 different executable formats,
317         one optimized for ELF executables ("linux/elf386"), one optimized
318         for shell scripts ("linux/sh386"), and one generic format
319         ("linux/386").
320
321         We will start with a general discussion first, but please
322         also read the relevant docs for each of the individual formats.
323
324         Also, there is special support for bootable kernels - see the
325         description of the vmlinuz/386 format.
326
327       General user's overview
328
329         Running a compressed executable program trades less space on a
330         ``permanent'' storage medium (such as a hard disk, floppy disk,
331         CD-ROM, flash memory, EPROM, etc.) for more space in one or more
332         ``temporary'' storage media (such as RAM, swap space, /tmp, etc.).
333         Running a compressed executable also requires some additional CPU
334         cycles to generate the compressed executable in the first place,
335         and to decompress it at each invocation.
336
337         How much space is traded?  It depends on the executable, but many
338         programs save 30% to 50% of permanent disk space.  How much CPU
339         overhead is there?  Again, it depends on the executable, but
340         decompression speed generally is at least many megabytes per second,
341         and frequently is limited by the speed of the underlying disk
342         or network I/O.
343
344         Depending on the statistics of usage and access, and the relative
345         speeds of CPU, RAM, swap space, /tmp, and file system storage, then
346         invoking and running a compressed executable can be faster than
347         directly running the corresponding uncompressed program.
348         The operating system might perform fewer expensive I/O operations
349         to invoke the compressed program.  Paging to or from swap space
350         or /tmp might be faster than paging from the general file system.
351         ``Medium-sized'' programs which access about 1/3 to 1/2 of their
352         stored program bytes can do particularly well with compression.
353         Small programs tend not to benefit as much because the absolute
354         savings is less.  Big programs tend not to benefit proportionally
355         because each invocation may use only a small fraction of the program,
356         yet UPX decompresses the entire program before invoking it.
357         But in environments where disk or flash memory storage is limited,
358         then compression may win anyway.
359
360         Currently, executables compressed by UPX do not share RAM at runtime
361         in the way that executables mapped from a file system do.  As a
362         result, if the same program is run simultaneously by more than one
363         process, then using the compressed version will require more RAM and/or
364         swap space.  So, shell programs (bash, csh, etc.)  and ``make''
365         might not be good candidates for compression.
366
367         UPX recognizes three executable formats for Linux: Linux/elf386,
368         Linux/sh386, and Linux/386.  Linux/386 is the most generic format;
369         it accommodates any file that can be executed.  At runtime, the UPX
370         decompression stub re-creates in /tmp a copy of the original file,
371         and then the copy is (re-)executed with the same arguments.
372         ELF binary executables prefer the Linux/elf386 format by default,
373         because UPX decompresses them directly into RAM, uses only one
374         exec, does not use space in /tmp, and does not use /proc.
375         Shell scripts where the underlying shell accepts a ``-c'' argument
376         can use the Linux/sh386 format.  UPX decompresses the shell script
377         into low memory, then maps the shell and passes the entire text of the
378         script as an argument with a leading ``-c''.
379
380       General benefits:
381
382         - UPX can compress all executables, be it AOUT, ELF, libc4, libc5,
383           libc6, Shell/Perl/Python/... scripts, standalone Java .class
384           binaries, or whatever...
385           All scripts and programs will work just as before.
386
387         - Compressed programs are completely self-contained. No need for
388           any external program.
389
390         - UPX keeps your original program untouched. This means that
391           after decompression you will have a byte-identical version,
392           and you can use UPX as a file compressor just like gzip.
393           [ Note that UPX maintains a checksum of the file internally,
394             so it is indeed a reliable alternative. ]
395
396         - As the stub only uses syscalls and isn't linked against libc it
397           should run under any Linux configuration that can run ELF
398           binaries.
399
400         - For the same reason compressed executables should run under
401           FreeBSD and other systems which can run Linux binaries.
402           [ Please send feedback on this topic ]
403
404       General drawbacks:
405
406         - It is not advisable to compress programs which usually have many
407           instances running (like `sh' or `make') because the common segments of
408           compressed programs won't be shared any longer between different
409           processes.
410
411         - `ldd' and `size' won't show anything useful because all they
412           see is the statically linked stub.  Since version 0.82 the section
413           headers are stripped from the UPX stub and `size' doesn't even
414           recognize the file format.  The file patches/patch-elfcode.h has a
415           patch to fix this bug in `size' and other programs which use GNU BFD.
416
417       General notes:
418
419         - As UPX leaves your original program untouched it is advantageous
420           to strip it before compression.
421
422         - If you compress a script you will lose platform independence -
423           this could be a problem if you are using NFS mounted disks.
424
425         - Compression of suid, guid and sticky-bit programs is rejected
426           because of possible security implications.
427
428         - For the same reason there is no sense in making any compressed
429           program suid.
430
431         - Obviously UPX won't work with executables that want to read data
432           from themselves. E.g., this might be a problem for Perl scripts
433           which access their __DATA__ lines.
434
435         - In case of internal errors the stub will abort with exitcode 127.
436           Typical reasons for this to happen are that the program has somehow
437           been modified after compression.
438           Running `strace -o strace.log compressed_file' will tell you more.
439
440   NOTES FOR LINUX/ELF386
441       Please read the general Linux description first.
442
443       The linux/elf386 format decompresses directly into RAM, uses only one
444       exec, does not use space in /tmp, and does not use /proc.
445
446       Linux/elf386 is automatically selected for Linux ELF executables.
447
448       Packed programs will be byte-identical to the original after
449       uncompression.
450
451       How it works:
452
453         For ELF executables, UPX decompresses directly to memory, simulating
454         the mapping that the operating system kernel uses during exec(),
455         including the PT_INTERP program interpreter (if any).
456         The brk() is set by a special PT_LOAD segment in the compressed
457         executable itself.  UPX then wipes the stack clean except for
458         arguments, environment variables, and Elf_auxv entries (this is
459         required by bugs in the startup code of /lib/ld-linux.so as of
460         May 2000), and transfers control to the program interpreter or
461         the e_entry address of the original executable.
462
463         The UPX stub is about 1700 bytes long, partly written in assembler
464         and only uses kernel syscalls. It is not linked against any libc.
465
466       Specific drawbacks:
467
468         - For linux/elf386 and linux/sh386 formats, you will be relying on
469           RAM and swap space to hold all of the decompressed program during
470           the lifetime of the process.  If you already use most of your swap
471           space, then you may run out.  A system that is "out of memory"
472           can become fragile.  Many programs do not react gracefully when
473           malloc() returns 0.  With newer Linux kernels, the kernel
474           may decide to kill some processes to regain memory, and you
475           may not like the kernel's choice of which to kill.  Running
476           /usr/bin/top is one way to check on the usage of swap space.
477
478       Extra options available for this executable format:
479
480         (none)
481
482   NOTES FOR LINUX/SH386
483       Please read the general Linux description first.
484
485       Shell scripts where the underling shell accepts a ``-c'' argument can
486       use the Linux/sh386 format.  UPX decompresses the shell script into low
487       memory, then maps the shell and passes the entire text of the script as
488       an argument with a leading ``-c''.  It does not use space in /tmp, and
489       does not use /proc.
490
491       Linux/sh386 is automatically selected for shell scripts that use a
492       known shell.
493
494       Packed programs will be byte-identical to the original after
495       uncompression.
496
497       How it works:
498
499         For shell script executables (files beginning with "#!/" or "#! /")
500         where the shell is known to accept "-c <command>", UPX decompresses
501         the file into low memory, then maps the shell (and its PT_INTERP),
502         and passes control to the shell with the entire decompressed file
503         as the argument after "-c".  Known shells are sh, ash, bash, bsh, csh,
504         ksh, tcsh, pdksh.  Restriction: UPX cannot use this method
505         for shell scripts which use the one optional string argument after
506         the shell name in the script (example: "#! /bin/sh option3\n".)
507
508         The UPX stub is about 1700 bytes long, partly written in assembler
509         and only uses kernel syscalls. It is not linked against any libc.
510
511       Specific drawbacks:
512
513         - For linux/elf386 and linux/sh386 formats, you will be relying on
514           RAM and swap space to hold all of the decompressed program during
515           the lifetime of the process.  If you already use most of your swap
516           space, then you may run out.  A system that is "out of memory"
517           can become fragile.  Many programs do not react gracefully when
518           malloc() returns 0.  With newer Linux kernels, the kernel
519           may decide to kill some processes to regain memory, and you
520           may not like the kernel's choice of which to kill.  Running
521           /usr/bin/top is one way to check on the usage of swap space.
522
523       Extra options available for this executable format:
524
525         (none)
526
527   NOTES FOR LINUX/386
528       Please read the general Linux description first.
529
530       The generic linux/386 format decompresses to /tmp and needs /proc file
531       system support. It starts the decompressed program via the execve()
532       syscall.
533
534       Linux/386 is only selected if the specialized linux/elf386 and
535       linux/sh386 won't recognize a file.
536
537       Packed programs will be byte-identical to the original after
538       uncompression.
539
540       How it works:
541
542         For files which are not ELF and not a script for a known "-c" shell,
543         UPX uses kernel execve(), which first requires decompressing to a
544         temporary file in the file system.  Interestingly -
545         because of the good memory management of the Linux kernel - this
546         often does not introduce a noticeable delay, and in fact there
547         will be no disk access at all if you have enough free memory as
548         the entire process takes places within the file system buffers.
549
550         A compressed executable consists of the UPX stub and an overlay
551         which contains the original program in a compressed form.
552
553         The UPX stub is a statically linked ELF executable and does
554         the following at program startup:
555
556           1) decompress the overlay to a temporary location in /tmp
557           2) open the temporary file for reading
558           3) try to delete the temporary file and start (execve)
559              the uncompressed program in /tmp using /proc/<pid>/fd/X as
560              attained by step 2)
561           4) if that fails, fork off a subprocess to clean up and
562              start the program in /tmp in the meantime
563
564         The UPX stub is about 1700 bytes long, partly written in assembler
565         and only uses kernel syscalls. It is not linked against any libc.
566
567       Specific drawbacks:
568
569         - You need additional free disk space for the uncompressed program
570           in your /tmp directory. This program is deleted immediately after
571           decompression, but you still need it for the full execution time
572           of the program.
573
574         - You must have /proc file system support as the stub wants to open
575           /proc/<pid>/exe and needs /proc/<pid>/fd/X. This also means that you
576           cannot compress programs that are used during the boot sequence
577           before /proc is mounted.
578
579         - Utilities like `top' will display numerical values in the process
580           name field. This is because Linux computes the process name from
581           the first argument of the last execve syscall (which is typically
582           something like /proc/<pid>/fd/3).
583
584         - Because of temporary decompression to disk the decompression speed
585           is not as fast as with the other executable formats. Still, I can see
586           no noticeable delay when starting programs like my ~3 MiB emacs (which
587           is less than 1 MiB when compressed :-).
588
589       Extra options available for this executable format:
590
591         --force-execve      Force the use of the generic linux/386 "execve"
592                             format, i.e. do not try the linux/elf386 and
593                             linux/sh386 formats.
594
595   NOTES FOR PS1/EXE
596       This is the executable format used by the Sony PlayStation (PSone), a
597       MIPS R3000 based gaming console which is popular since the late '90s.
598       Support of this format is very similar to the Atari one, because of
599       nostalgic feelings of one of the authors.
600
601       Packed programs will be byte-identical to the original after
602       uncompression, until further notice.
603
604       Maximum uncompressed size: ~1.89 / ~7.60 MiB.
605
606       Notes:
607
608         - UPX creates as default a suitable executable for CD-Mastering
609           and console transfer. For a CD-Master main executable you could also try
610           the special option "--boot-only" as described below.
611           It has been reported that upx packed executables are fully compatible with
612           the Sony PlayStation 2 (PS2, PStwo) and Sony PlayStation Portable (PSP) in
613           Sony PlayStation (PSone) emulation mode.
614
615         - Normally the packed files use the same memory areas like the uncompressed
616           versions, so they will not override other memory areas while unpacking.
617           If this isn't possible UPX will abort showing a 'packed data overlap'
618           error. With the "--force" option UPX will relocate the loading address
619           for the packed file, but this isn't a real problem if it is a single or
620           the main executable.
621
622       Extra options available for this executable format:
623
624         --all-methods       Compress the program several times, using all
625                             available compression methods. This may improve
626                             the compression ratio in some cases, but usually
627                             the default method gives the best results anyway.
628
629         --8-bit             Uses 8 bit size compression [default: 32 bit]
630
631         --8mib-ram          PSone has 8 MiB ram available [default: 2 MiB]
632
633         --boot-only         This format is for main exes and CD-Mastering only !
634                             It may slightly improve the compression ratio,
635                             decompression routines are faster than default ones.
636                             But it cannot be used for console transfer !
637
638         --no-align          This option disables CD mode 2 data sector format
639                             alignment. May slightly improves the compression ratio,
640                             but the compressed executable will not boot from a CD.
641                             Use it for console transfer only !
642
643   NOTES FOR RTM32/PE and ARM/PE
644       Same as win32/pe.
645
646   NOTES FOR TMT/ADAM
647       This format is used by the TMT Pascal compiler - see
648       http://www.tmt.com/ .
649
650       Extra options available for this executable format:
651
652         --all-methods       Compress the program several times, using all
653                             available compression methods. This may improve
654                             the compression ratio in some cases, but usually
655                             the default method gives the best results anyway.
656
657         --all-filters       Compress the program several times, using all
658                             available preprocessing filters. This may improve
659                             the compression ratio in some cases, but usually
660                             the default filter gives the best results anyway.
661
662   NOTES FOR VMLINUZ/386
663       The vmlinuz/386 and bvmlinuz/386 formats take a gzip-compressed
664       bootable Linux kernel image ("vmlinuz", "zImage", "bzImage"), gzip-
665       decompress it and re-compress it with the UPX compression method.
666
667       vmlinuz/386 is completely unrelated to the other Linux executable
668       formats, and it does not share any of their drawbacks.
669
670       Notes:
671
672         - Be sure that "vmlinuz/386" or "bvmlinuz/386" is displayed
673         during compression - otherwise a wrong executable format
674         may have been used, and the kernel won't boot.
675
676       Benefits:
677
678         - Better compression (but note that the kernel was already compressed,
679         so the improvement is not as large as with other formats).
680         Still, the bytes saved may be essential for special needs like
681         boot disks.
682
683            For example, this is what I get for my 2.2.16 kernel:
684               1589708  vmlinux
685                641073  bzImage        [original]
686                560755  bzImage.upx    [compressed by "upx -9"]
687
688         - Much faster decompression at kernel boot time (but kernel
689           decompression speed is not really an issue these days).
690
691       Drawbacks:
692
693         (none)
694
695       Extra options available for this executable format:
696
697         --all-methods       Compress the program several times, using all
698                             available compression methods. This may improve
699                             the compression ratio in some cases, but usually
700                             the default method gives the best results anyway.
701
702         --all-filters       Compress the program several times, using all
703                             available preprocessing filters. This may improve
704                             the compression ratio in some cases, but usually
705                             the default filter gives the best results anyway.
706
707   NOTES FOR WATCOM/LE
708       UPX has been successfully tested with the following extenders:
709         DOS4G, DOS4GW, PMODE/W, DOS32a, CauseWay.
710         The WDOS/X extender is partly supported (for details
711         see the file bugs BUGS).
712
713       DLLs and the LX format are not supported.
714
715       Extra options available for this executable format:
716
717         --le                Produce an unbound LE output instead of
718                             keeping the current stub.
719
720   NOTES FOR WIN32/PE
721       The PE support in UPX is quite stable now, but probably there are still
722       some incompatibilities with some files.
723
724       Because of the way UPX (and other packers for this format) works, you
725       can see increased memory usage of your compressed files because the
726       whole program is loaded into memory at startup.  If you start several
727       instances of huge compressed programs you're wasting memory because the
728       common segments of the program won't get shared across the instances.
729       On the other hand if you're compressing only smaller programs, or
730       running only one instance of larger programs, then this penalty is
731       smaller, but it's still there.
732
733       If you're running executables from network, then compressed programs
734       will load faster, and require less bandwidth during execution.
735
736       DLLs are supported. But UPX compressed DLLs can not share common data
737       and code when they got used by multiple applications. So compressing
738       msvcrt.dll is a waste of memory, but compressing the dll plugins of a
739       particular application may be a better idea.
740
741       Screensavers are supported, with the restriction that the filename must
742       end with ".scr" (as screensavers are handled slightly different than
743       normal exe files).
744
745       UPX compressed PE files have some minor memory overhead (usually in the
746       10 - 30 KiB range) which can be seen by specifying the "-i" command
747       line switch during compression.
748
749       Extra options available for this executable format:
750
751        --compress-exports=0 Don't compress the export section.
752                             Use this if you plan to run the compressed
753                             program under Wine.
754        --compress-exports=1 Compress the export section. [DEFAULT]
755                             Compression of the export section can improve the
756                             compression ratio quite a bit but may not work
757                             with all programs (like winword.exe).
758                             UPX never compresses the export section of a DLL
759                             regardless of this option.
760
761         --compress-icons=0  Don't compress any icons.
762         --compress-icons=1  Compress all but the first icon.
763         --compress-icons=2  Compress all icons which are not in the
764                             first icon directory. [DEFAULT]
765         --compress-icons=3  Compress all icons.
766
767         --compress-resources=0  Don't compress any resources at all.
768
769         --keep-resource=list Don't compress resources specified by the list.
770                             The members of the list are separated by commas.
771                             A list member has the following format: I<type[/name]>.
772                             I<Type> is the type of the resource. Standard types
773                             must be specified as decimal numbers, user types can be
774                             specified by decimal IDs or strings. I<Name> is the
775                             identifier of the resource. It can be a decimal number
776                             or a string. For example:
777
778                             --keep-resource=2/MYBITMAP,5,6/12345
779
780                             UPX won't compress the named bitmap resource "MYBITMAP",
781                             it leaves every dialog (5) resource uncompressed, and
782                             it won't touch the string table resource with identifier
783                             12345.
784
785         --force             Force compression even when there is an
786                             unexpected value in a header field.
787                             Use with care.
788
789         --strip-relocs=0    Don't strip relocation records.
790         --strip-relocs=1    Strip relocation records. [DEFAULT]
791                             This option only works on executables with base
792                             address greater or equal to 0x400000. Usually the
793                             compressed files becomes smaller, but some files
794                             may become larger. Note that the resulting file will
795                             not work under Windows 3.x (Win32s).
796                             UPX never strips relocations from a DLL
797                             regardless of this option.
798
799         --all-methods       Compress the program several times, using all
800                             available compression methods. This may improve
801                             the compression ratio in some cases, but usually
802                             the default method gives the best results anyway.
803
804         --all-filters       Compress the program several times, using all
805                             available preprocessing filters. This may improve
806                             the compression ratio in some cases, but usually
807                             the default filter gives the best results anyway.
808

DIAGNOSTICS

810       Exit status is normally 0; if an error occurs, exit status is 1. If a
811       warning occurs, exit status is 2.
812
813       UPX's diagnostics are intended to be self-explanatory.
814

BUGS

816       Please report all bugs immediately to the authors.
817

AUTHORS

819        Markus F.X.J. Oberhumer <markus@oberhumer.com>
820        http://www.oberhumer.com
821
822        Laszlo Molnar <ezerotven+github@gmail.com>
823
824        John F. Reiser <jreiser@BitWagon.com>
825
826        Jens Medoch <jssg@users.sourceforge.net>
827
829       Copyright (C) 1996-2022 Markus Franz Xaver Johannes Oberhumer
830
831       Copyright (C) 1996-2022 Laszlo Molnar
832
833       Copyright (C) 2000-2022 John F. Reiser
834
835       Copyright (C) 2002-2022 Jens Medoch
836
837       UPX is distributed with full source code under the terms of the GNU
838       General Public License v2+; either under the pure GPLv2+ (see the file
839       COPYING), or (at your option) under the GPLv+2 with special exceptions
840       and restrictions granting the free usage for all binaries including
841       commercial programs (see the file LICENSE).
842
843       This program is distributed in the hope that it will be useful, but
844       WITHOUT ANY WARRANTY; without even the implied warranty of
845       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
846
847       You should have received a copy of the UPX License Agreements along
848       with this program; see the files COPYING and LICENSE. If not, visit the
849       UPX home page.
850
851
852
853upx 4.0.1                         2022-11-16                            UPX(1)
Impressum