⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 objcopy.1

📁 MinGW+MSYS必备的开发工具链
💻 1
📖 第 1 页 / 共 3 页
字号:
translation.  .IP "\fB\-B\fR \fIbfdarch\fR" 4.IX Item "-B bfdarch".PD 0.IP "\fB\-\-binary\-architecture=\fR\fIbfdarch\fR" 4.IX Item "--binary-architecture=bfdarch".PDUseful when transforming a raw binary input file into an object file.In this case the output architecture can be set to \fIbfdarch\fR. Thisoption will be ignored if the input file has a known \fIbfdarch\fR. Youcan access this binary data inside a program by referencing the specialsymbols that are created by the conversion process.  These symbols arecalled _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and_binary_\fIobjfile\fR_size.  e.g. you can transform a picture file intoan object file and then access it in your code using these symbols. .IP "\fB\-j\fR \fIsectionname\fR" 4.IX Item "-j sectionname".PD 0.IP "\fB\-\-only\-section=\fR\fIsectionname\fR" 4.IX Item "--only-section=sectionname".PDCopy only the named section from the input file to the output file.This option may be given more than once.  Note that using this optioninappropriately may make the output file unusable..IP "\fB\-R\fR \fIsectionname\fR" 4.IX Item "-R sectionname".PD 0.IP "\fB\-\-remove\-section=\fR\fIsectionname\fR" 4.IX Item "--remove-section=sectionname".PDRemove any section named \fIsectionname\fR from the output file.  Thisoption may be given more than once.  Note that using this optioninappropriately may make the output file unusable..IP "\fB\-S\fR" 4.IX Item "-S".PD 0.IP "\fB\-\-strip\-all\fR" 4.IX Item "--strip-all".PDDo not copy relocation and symbol information from the source file..IP "\fB\-g\fR" 4.IX Item "-g".PD 0.IP "\fB\-\-strip\-debug\fR" 4.IX Item "--strip-debug".PDDo not copy debugging symbols or sections from the source file..IP "\fB\-\-strip\-unneeded\fR" 4.IX Item "--strip-unneeded"Strip all symbols that are not needed for relocation processing..IP "\fB\-K\fR \fIsymbolname\fR" 4.IX Item "-K symbolname".PD 0.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4.IX Item "--keep-symbol=symbolname".PDWhen stripping symbols, keep symbol \fIsymbolname\fR even if it wouldnormally be stripped.  This option may be given more than once..IP "\fB\-N\fR \fIsymbolname\fR" 4.IX Item "-N symbolname".PD 0.IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4.IX Item "--strip-symbol=symbolname".PDDo not copy symbol \fIsymbolname\fR from the source file.  This optionmay be given more than once..IP "\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR" 4.IX Item "--strip-unneeded-symbol=symbolname"Do not copy symbol \fIsymbolname\fR from the source file unless it is neededby a relocation.  This option may be given more than once..IP "\fB\-G\fR \fIsymbolname\fR" 4.IX Item "-G symbolname".PD 0.IP "\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR" 4.IX Item "--keep-global-symbol=symbolname".PDKeep only symbol \fIsymbolname\fR global.  Make all other symbols localto the file, so that they are not visible externally.  This option maybe given more than once..IP "\fB\-\-localize\-hidden\fR" 4.IX Item "--localize-hidden"In an \s-1ELF\s0 object, mark all symbols that have hidden or internal visibilityas local.  This option applies on top of symbol-specific localization optionssuch as \fB\-L\fR..IP "\fB\-L\fR \fIsymbolname\fR" 4.IX Item "-L symbolname".PD 0.IP "\fB\-\-localize\-symbol=\fR\fIsymbolname\fR" 4.IX Item "--localize-symbol=symbolname".PDMake symbol \fIsymbolname\fR local to the file, so that it is notvisible externally.  This option may be given more than once..IP "\fB\-W\fR \fIsymbolname\fR" 4.IX Item "-W symbolname".PD 0.IP "\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR" 4.IX Item "--weaken-symbol=symbolname".PDMake symbol \fIsymbolname\fR weak. This option may be given more than once..IP "\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR" 4.IX Item "--globalize-symbol=symbolname"Give symbol \fIsymbolname\fR global scoping so that it is visibleoutside of the file in which it is defined.  This option may be givenmore than once..IP "\fB\-w\fR" 4.IX Item "-w".PD 0.IP "\fB\-\-wildcard\fR" 4.IX Item "--wildcard".PDPermit regular expressions in \fIsymbolname\fRs used in other commandline options.  The question mark (?), asterisk (*), backslash (\e) andsquare brackets ([]) operators can be used anywhere in the symbolname.  If the first character of the symbol name is the exclamationpoint (!) then the sense of the switch is reversed for that symbol.For example:.Sp.Vb 1\&          -w -W !foo -W fo*.Ve.Spwould cause objcopy to weaken all symbols that start with \*(L"fo\*(R"except for the symbol \*(L"foo\*(R"..IP "\fB\-x\fR" 4.IX Item "-x".PD 0.IP "\fB\-\-discard\-all\fR" 4.IX Item "--discard-all".PDDo not copy non-global symbols from the source file..IP "\fB\-X\fR" 4.IX Item "-X".PD 0.IP "\fB\-\-discard\-locals\fR" 4.IX Item "--discard-locals".PDDo not copy compiler-generated local symbols.(These usually start with \fBL\fR or \fB.\fR.).IP "\fB\-b\fR \fIbyte\fR" 4.IX Item "-b byte".PD 0.IP "\fB\-\-byte=\fR\fIbyte\fR" 4.IX Item "--byte=byte".PDKeep only every \fIbyte\fRth byte of the input file (header data is notaffected).  \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1,where \fIinterleave\fR is given by the \fB\-i\fR or \fB\-\-interleave\fRoption, or the default of 4.  This option is useful for creating filesto program \s-1ROM\s0.  It is typically used with an \f(CW\*(C`srec\*(C'\fR outputtarget..IP "\fB\-i\fR \fIinterleave\fR" 4.IX Item "-i interleave".PD 0.IP "\fB\-\-interleave=\fR\fIinterleave\fR" 4.IX Item "--interleave=interleave".PDOnly copy one out of every \fIinterleave\fR bytes.  Select which byte tocopy with the \fB\-b\fR or \fB\-\-byte\fR option.  The default is 4.\&\fBobjcopy\fR ignores this option if you do not specify either \fB\-b\fR or\&\fB\-\-byte\fR..IP "\fB\-p\fR" 4.IX Item "-p".PD 0.IP "\fB\-\-preserve\-dates\fR" 4.IX Item "--preserve-dates".PDSet the access and modification dates of the output file to be the sameas those of the input file..IP "\fB\-\-debugging\fR" 4.IX Item "--debugging"Convert debugging information, if possible.  This is not the defaultbecause only certain debugging formats are supported, and theconversion process can be time consuming..IP "\fB\-\-gap\-fill\fR \fIval\fR" 4.IX Item "--gap-fill val"Fill gaps between sections with \fIval\fR.  This operation applies tothe \fIload address\fR (\s-1LMA\s0) of the sections.  It is done by increasingthe size of the section with the lower address, and filling in the extraspace created with \fIval\fR..IP "\fB\-\-pad\-to\fR \fIaddress\fR" 4.IX Item "--pad-to address"Pad the output file up to the load address \fIaddress\fR.  This isdone by increasing the size of the last section.  The extra space isfilled in with the value specified by \fB\-\-gap\-fill\fR (default zero)..IP "\fB\-\-set\-start\fR \fIval\fR" 4.IX Item "--set-start val"Set the start address of the new file to \fIval\fR.  Not all object fileformats support setting the start address..IP "\fB\-\-change\-start\fR \fIincr\fR" 4.IX Item "--change-start incr".PD 0.IP "\fB\-\-adjust\-start\fR \fIincr\fR" 4.IX Item "--adjust-start incr".PDChange the start address by adding \fIincr\fR.  Not all object fileformats support setting the start address..IP "\fB\-\-change\-addresses\fR \fIincr\fR" 4.IX Item "--change-addresses incr".PD 0.IP "\fB\-\-adjust\-vma\fR \fIincr\fR" 4.IX Item "--adjust-vma incr".PDChange the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the startaddress, by adding \fIincr\fR.  Some object file formats do not permitsection addresses to be changed arbitrarily.  Note that this does notrelocate the sections; if the program expects sections to be loaded at acertain address, and this option is used to change the sections suchthat they are loaded at a different address, the program may fail. .IP "\fB\-\-change\-section\-address\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4.IX Item "--change-section-address section{=,+,-}val".PD 0.IP "\fB\-\-adjust\-section\-vma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4.IX Item "--adjust-section-vma section{=,+,-}val".PDSet or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named\&\fIsection\fR.  If \fB=\fR is used, the section address is set to\&\fIval\fR.  Otherwise, \fIval\fR is added to or subtracted from thesection address.  See the comments under \fB\-\-change\-addresses\fR,above. If \fIsection\fR does not exist in the input file, a warning willbe issued, unless \fB\-\-no\-change\-warnings\fR is used..IP "\fB\-\-change\-section\-lma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4.IX Item "--change-section-lma section{=,+,-}val"Set or change the \s-1LMA\s0 address of the named \fIsection\fR.  The \s-1LMA\s0address is the address where the section will be loaded into memory atprogram load time.  Normally this is the same as the \s-1VMA\s0 address, whichis the address of the section at program run time, but on some systems,especially those where a program is held in \s-1ROM\s0, the two can bedifferent.  If \fB=\fR is used, the section address is set to\&\fIval\fR.  Otherwise, \fIval\fR is added to or subtracted from thesection address.  See the comments under \fB\-\-change\-addresses\fR,above.  If \fIsection\fR does not exist in the input file, a warningwill be issued, unless \fB\-\-no\-change\-warnings\fR is used.  .IP "\fB\-\-change\-section\-vma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4.IX Item "--change-section-vma section{=,+,-}val"Set or change the \s-1VMA\s0 address of the named \fIsection\fR.  The \s-1VMA\s0address is the address where the section will be located once theprogram has started executing.  Normally this is the same as the \s-1LMA\s0address, which is the address where the section will be loaded intomemory, but on some systems, especially those where a program is held in\&\s-1ROM\s0, the two can be different.  If \fB=\fR is used, the section addressis set to \fIval\fR.  Otherwise, \fIval\fR is added to or subtractedfrom the section address.  See the comments under\&\fB\-\-change\-addresses\fR, above.  If \fIsection\fR does not exist inthe input file, a warning will be issued, unless\&\fB\-\-no\-change\-warnings\fR is used.   .IP "\fB\-\-change\-warnings\fR" 4.IX Item "--change-warnings".PD 0.IP "\fB\-\-adjust\-warnings\fR" 4.IX Item "--adjust-warnings".PDIf \fB\-\-change\-section\-address\fR or \fB\-\-change\-section\-lma\fR or\&\fB\-\-change\-section\-vma\fR is used, and the named section does notexist, issue a warning.  This is the default. .IP "\fB\-\-no\-change\-warnings\fR" 4.IX Item "--no-change-warnings".PD 0.IP "\fB\-\-no\-adjust\-warnings\fR" 4.IX Item "--no-adjust-warnings".PDDo not issue a warning if \fB\-\-change\-section\-address\fR or\&\fB\-\-adjust\-section\-lma\fR or \fB\-\-adjust\-section\-vma\fR is used, evenif the named section does not exist. .IP "\fB\-\-set\-section\-flags\fR \fIsection\fR\fB=\fR\fIflags\fR" 4.IX Item "--set-section-flags section=flags"Set the flags for the named section.  The \fIflags\fR argument is acomma separated string of flag names.  The recognized names are\&\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -