(binutils.info)objcopy


Next: objdump Prev: nm Up: Top

objcopy
*******

     objcopy [ -F BFDNAME | --target=BFDNAME ]
             [ -I BFDNAME | --input-target=BFDNAME ]
             [ -O BFDNAME | --output-target=BFDNAME ]
             [ -S | --strip-all ]  [ -g | --strip-debug ]
             [ -x | --discard-all ]  [ -X | --discard-locals ]
             [ -b BYTE | --byte=BYTE ]
             [ -i INTERLEAVE | --interleave=INTERLEAVE ]
             [ -v | --verbose ] [ -V | --version ]  [ --help ]
             INFILE [OUTFILE]

   The GNU `objcopy' utility copies the contents of an object file to
another.  `objcopy' uses the GNU BFD Library to read and write the
object files.  It can write the destination object file in a format
different from that of the source object file.  The exact behavior of
`objcopy' is controlled by command-line options.

   `objcopy' creates temporary files to do its translations and deletes
them afterward.  `objcopy' uses BFD to do all its translation work; it
has access to all the formats described in BFD and thus is able to
recognize most formats without being told explicitly.  *Note BFD:
(ld.info)BFD.

`INFILE'
`OUTFILE'
     The source and output files, respectively.  If you do not specify
     OUTFILE, `objcopy' creates a temporary file and destructively
     renames the result with the name of INFILE.

`-I BFDNAME'
`--input-target=BFDNAME'
     Consider the source file's object format to be BFDNAME, rather than
     attempting to deduce it.  Note: Target Selection, for more
     information.

`-O BFDNAME'
`--output-target=BFDNAME'
     Write the output file using the object format BFDNAME.  *Note
     Target Selection::, for more information.

`-F BFDNAME'
`--target=BFDNAME'
     Use BFDNAME as the object format for both the input and the output
     file; i.e., simply transfer data from source to destination with no
     translation.  Note: Target Selection, for more information.

`-S'
`--strip-all'
     Do not copy relocation and symbol information from the source file.

`-g'
`--strip-debug'
     Do not copy debugging symbols from the source file.

`-x'
`--discard-all'
     Do not copy non-global symbols from the source file.

`-X'
`--discard-locals'
     Do not copy compiler-generated local symbols.  (These usually
     start with `L' or `.'.)

`-b BYTE'
`--byte=BYTE'
     Keep only every BYTEth byte of the input file (header data is not
     affected).  BYTE can be in the range from 0 to INTERLEAVE-1, where
     INTERLEAVE is given by the `-i' or `--interleave' option, or the
     default of 4.  This option is useful for creating files to program
     ROM.  It is typically used with an `srec' output target.

`-i INTERLEAVE'
`--interleave=INTERLEAVE'
     Only copy one out of every INTERLEAVE bytes.  Select which byte to
     copy with the -B or `--byte' option.  The default is 4.  `objcopy'
     ignores this option if you do not specify either `-b' or `--byte'.

`-V'
`--version'
     Show the version number of `objcopy'.

`-v'
`--verbose'
     Verbose output: list all object files modified.  In the case of
     archives, `objcopy -V' lists all members of the archive.

`--help'
     Show a summary of the options to `objcopy'.


automatically generated by info2www