📄 upx.1
字号:
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14.\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. | will give a.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'.\" expand to `' in nroff, nothing in troff, for use with C<>..tr \(*W-|\(bv\*(Tr.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..if \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.\".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..hy 0.if n .na.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "UPX 1".TH UPX 1 "20 Jul 2004" "upx 1.92 beta" " ".SH "NAME"upx \- compress or expand executable files.SH "SYNOPSIS".IX Header "SYNOPSIS"\&\fBupx\fR [\ \fIcommand\fR\ ] [\ \fIoptions\fR\ ] \fIfilename\fR....SH "ABSTRACT".IX Header "ABSTRACT".Vb 3\& The Ultimate Packer for eXecutables\& Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar\& http://upx.sourceforge.net.Ve.PP\&\fB\s-1UPX\s0\fR is a portable, extendable, high-performance executable packer forseveral different executable formats. It achieves an excellent compressionratio and offers \fI*very*\fR fast decompression. Your executables sufferno memory overhead or other drawbacks for most of the formats supported,because of in-place decompression..PPWhile you may use \fB\s-1UPX\s0\fR freely for both non-commercial and commercialexecutables (for details see the file \s-1LICENSE\s0), we would highlyappreciate if you credit \fB\s-1UPX\s0\fR and ourselves in the documentation,possibly including a reference to the \fB\s-1UPX\s0\fR home page. Thanks..PP[ Using \fB\s-1UPX\s0\fR in non-OpenSource applications without proper creditsis considered not politically correct ;\-) ].SH "DISCLAIMER".IX Header "DISCLAIMER"\&\fB\s-1UPX\s0\fR comes with \s-1ABSOLUTELY\s0 \s-1NO\s0 \s-1WARRANTY\s0; for details see the file \s-1LICENSE\s0..PPThis is the first production quality release, and we plan that future 1.xxreleases will be backward compatible with this version..PPPlease report all problems or suggestions to the authors. Thanks..SH "DESCRIPTION".IX Header "DESCRIPTION"\&\fB\s-1UPX\s0\fR is a versatile executable packer with the following features:.PP.Vb 2\& - excellent compression ratio: compresses better than zip/gzip,\& use UPX to decrease the size of your distribution !.Ve.PP.Vb 2\& - very fast decompression: about 10 MB/sec on an ancient Pentium 133,\& about 200 MB/sec on an Athlon XP 2000+..Ve.PP.Vb 2\& - no memory overhead for your compressed executables for most of the\& supported formats.Ve.PP.Vb 3\& - safe: you can list, test and unpack your executables\& Also, a checksum of both the compressed and uncompressed file is\& maintained internally..Ve.PP.Vb 16\& - universal: UPX can pack a number of executable formats:\& * atari/tos\& * bvmlinuz/386 [bootable Linux kernel]\& * djgpp2/coff\& * dos/com\& * dos/exe\& * dos/sys\& * linux/386\& * linux/elf386\& * linux/sh386\& * ps1/exe\& * rtm32/pe\& * tmt/adam\& * vmlinuz/386 [bootable Linux kernel]\& * watcom/le (supporting DOS4G, PMODE/W, DOS32a and CauseWay)\& * win32/pe.Ve.PP.Vb 1\& - portable: UPX is written in portable endian-neutral C++.Ve.PP.Vb 2\& - extendable: because of the class layout it's very easy to support\& new executable formats or add new compression algorithms.Ve.PP.Vb 3\& - free: UPX can be distributed and used freely. And from version 0.99\& the full source code of UPX is released under the GNU General Public\& License (GPL) !.Ve.PPYou probably understand now why we call \fB\s-1UPX\s0\fR the "\fIultimate\fR"executable packer..SH "COMMANDS".IX Header "COMMANDS".Sh "Compress".IX Subsection "Compress"This is the default operation, eg. \fBupx yourfile.exe\fR will compress the filespecified on the command line..Sh "Decompress".IX Subsection "Decompress"All \fB\s-1UPX\s0\fR supported file formats can be unpacked using the \fB\-d\fR switch, eg.\&\fBupx \-d yourfile.exe\fR will uncompress the file you've just compressed..Sh "Test".IX Subsection "Test"The \fB\-t\fR command tests the integrity of the compressed and uncompresseddata, eg. \fBupx \-t yourfile.exe\fR check whether your file can be safelydecompressed. Note, that this command doesn't check the whole file, onlythe part that will be uncompressed during program execution. This meansthat you should not use this command instead of a virus checker..Sh "List".IX Subsection "List"The \fB\-l\fR command prints out some information about the compressed filesspecified on the command line as parameters, eg \fBupx \-l yourfile.exe\fRshows the compressed / uncompressed size and the compression ratio of\&\fIyourfile.exe\fR..SH "OPTIONS".IX Header "OPTIONS"\&\fB\-q\fR: be quiet, suppress warnings.PP\&\fB\-q \-q\fR (or \fB\-qq\fR): be very quiet, suppress errors.PP\&\fB\-q \-q \-q\fR (or \fB\-qqq\fR): produce no output at all.PP\&\fB\-\-help\fR: prints the help.PP\&\fB\-\-version\fR: print the version of \fB\s-1UPX\s0\fR.PP[ ...to be written... \- type `\fBupx \-\-help\fR' for now ].SH "COMPRESSION LEVELS & TUNING".IX Header "COMPRESSION LEVELS & TUNING"\&\fB\s-1UPX\s0\fR offers ten different compression levels from \fB\-1\fR to \fB\-9\fR,and \fB\-\-best\fR. The default compression level is \fB\-8\fR for filessmaller than 512 kB, and \fB\-7\fR otherwise..IP "\(bu" 4Compression levels 1, 2 and 3 are pretty fast..IP "\(bu" 4Compression levels 4, 5 and 6 achieve a good time/ratio performance..IP "\(bu" 4Compression levels 7, 8 and 9 favor compression ratio over speed..IP "\(bu" 4Compression level \fB\-\-best\fR may take a long time..PPNote that compression level \fB\-\-best\fR can be somewhat slow for largefiles, but you definitely should use it when releasing a final versionof your program..PPQuick start for achieving the best compression ratio:.Sp.RS 4Try \fBupx \-\-brute myfile.exe\fR..RE.PPDetails for achieving the best compression ratio:.IP "\(bu" 4Use the compression level \fB\-\-best\fR..IP "\(bu" 4Try one or both of the options \fB\-\-all\-methods\fR and \fB\-\-all\-filters\fR..IP "\(bu" 4Try the option \fB\-\-crp\-ms=NUMBER\fR. This uses more memory during compressionto achieve a (slightly) better compression ratio..Sp\&\s-1NUMBER\s0 must be a decimal value from 10000 to 999999, inclusive.The default value is 10000 (ten thousand)..IP "\(bu" 4Info: the option \fB\-\-brute\fR is an abbrevation for the options\&\fB\-\-best \-\-all\-methods \-\-all\-filters \-\-crp\-ms=999999\fR..IP "\(bu" 4Try if \fB\-\-overlay=strip\fR works..IP "\(bu" 4For win32/pe programs there's \fB\-\-strip\-relocs=0\fR. See notes below..SH "OVERLAY HANDLING OPTIONS".IX Header "OVERLAY HANDLING OPTIONS"Info: An \*(L"overlay\*(R" means auxillary data atached after the logical end ofan executable, and it often contains application specific data(this is a common practice to avoid an extra data file, thoughit would be better to use resource sections)..PP\&\fB\s-1UPX\s0\fR handles overlays like many other executable packers do: it simplycopies the overlay after the compressed image. This works with somefiles, but doesn't work with others, depending on how an applicationactually accesses this overlayed data..PPSince version 0.90 \s-1UPX\s0 defaults to \fB\-\-overlay=copy\fR forall executable formats..PP.Vb 1\& --overlay=copy Copy any extra data attached to the file. [DEFAULT].Ve.PP.Vb 3\& --overlay=strip Strip any overlay from the program instead of\& copying it. Be warned, this may make the compressed\& program crash or otherwise unusable..Ve.PP.Vb 1\& --overlay=skip Refuse to compress any program which has an overlay..Ve.SH "ENVIRONMENT".IX Header "ENVIRONMENT"The environment variable \fB\s-1UPX\s0\fR can hold a set of defaultoptions for \fB\s-1UPX\s0\fR. These options are interpreted first andcan be overwritten by explicit command line parameters.For example:.PP.Vb 3\& for DOS/Windows: set UPX=-9 --compress-icons#0\& for sh/ksh/zsh: UPX="-9 --compress-icons=0"; export UPX\& for csh/tcsh: setenv UPX "-9 --compress-icons=0".Ve.PPUnder DOS/Windows you must use '#' instead of '=' when setting theenvironment variable because of a \s-1COMMAND\s0.COM limitation..PPNot all of the options are valid in the environment variable \-\&\fB\s-1UPX\s0\fR will tell you..PPYou can explicitly use the \fB\-\-no\-env\fR option to ignore theenvironment variable..SH "NOTES FOR THE SUPPORTED EXECUTABLE FORMATS".IX Header "NOTES FOR THE SUPPORTED EXECUTABLE FORMATS".Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1ATARI/TOS\s0".IX Subsection "NOTES FOR ATARI/TOS"This is the executable format used by the Atari \s-1ST/TT\s0, a Motorola 68000based personal computer which was popular in the late '80s. Supportof this format is only because of nostalgic feelings of one ofthe authors and serves no practical purpose :\-).See http://www.freemint.de for more info..PPPacked programs will be byte-identical to the original after uncompression.All debug information will be stripped, though..PPExtra options available for this executable format:.PP.Vb 4\& --all-methods Compress the program several times, using all\& available compression methods. This may improve\& the compression ratio in some cases, but usually\& the default method gives the best results anyway..Ve.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1BVMLINUZ/I386\s0".IX Subsection "NOTES FOR BVMLINUZ/I386"Same as vmlinuz/i386..Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1DOS/COM\s0".IX Subsection "NOTES FOR DOS/COM"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -