@ifinfo
@format
START-INFO-DIR-ENTRY
-* Binutils: (binutils). The GNU binary utilities "ar", "ld", "objdump",
- "nm", "size", "strip", and "ranlib".
+* Binutils: (binutils). The GNU binary utilities "ar", "ld", "copy",
+ "objdump", "nm", "size", "strip", and "ranlib".
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@synindex ky cp
@c
-@c This file documents the GNU binary utilities "ar", "ld", "objdump", "nm",
-@c "size", "strip", and "ranlib".
+@c This file documents the GNU binary utilities "ar", "ld", "copy", "objdump",
+@c "nm", "size", "strip", and "ranlib".
@c
@c Copyright (C) 1991 Free Software Foundation, Inc.
@c
@item ar
Create, modify, and extract from archives
+@item copy
+Copy and translate object files
+
@item nm
List symbols from object files
@menu
* ar:: Create, modify, and extract from archives
+* copy:: Copy and translate object files
* ld:(ld)Overview. Combine object and archive files
* nm:: List symbols from object files
* objdump:: Display information from object files
* Index::
@end menu
-@node ar, nm, Top, Top
+@node ar, copy, Top, Top
@chapter ar
@kindex ar
subroutines.
@cindex symbol index
-@code{ar} will create an index to the symbols defined in relocatable
+@code{ar} creates an index to the symbols defined in relocatable
object modules in the archive when you specify the modifier @samp{s}.
Once created, this index is updated in the archive whenever @code{ar}
makes a change to its contents (save for the @samp{q} update operation).
be deleted as @var{files}; the archive is untouched if you
specify no files to delete.
-If you specify the @samp{v} modifier, @code{ar} will list each module
+If you specify the @samp{v} modifier, @code{ar} lists each module
as it is deleted.
@item m
@cindex repeated names in archive
@cindex name duplication in archive
If there is more than one file with the same name (say, @samp{fie}) in
-an archive (say @samp{b.a}), @samp{ar t b.a fie} will list only the
+an archive (say @samp{b.a}), @samp{ar t b.a fie} lists only the
first instance; to see them all, you must ask for a complete
listing---in our example, @samp{ar t b.a}.
@c WRS only; per Gumby, this is implementation-dependent, and in a more
@cindex dates in archive
Preserve the @emph{original} dates of members when extracting them. If
you do not specify this modifier, files extracted from the archive
-will be stamped with the time of extraction.
+are stamped with the time of extraction.
@item s
@cindex writing archive index
@cindex scripts, @code{ar}
If you use the single command-line option @samp{-M} with @code{ar}, you
can control its operation with a rudimentary command language. This
-form of @code{ar} will operate interactively if standard input is coming
+form of @code{ar} operates interactively if standard input is coming
directly from a terminal. During interactive use, @code{ar} prompts for
input (the prompt is @samp{AR >}), and continues executing even after
errors. If you redirect standard input to a script file, no prompts are
-issued, and @code{ar} will abandon execution (with a nonzero exit code)
+issued, and @code{ar} abandons execution (with a nonzero exit code)
on any error.
The @code{ar} command language is @emph{not} designed to be equivalent
@end table
+@node copy, nm, ar, Top
+
+@chapter copy
+
+@smallexample
+copy [-S] [-s srcfmt] [-d dtfmt] [-b bothfmts] infile [outfile] [-vV]
+@end smallexample
+
+The Gnu @code{copy} utility copies the contents of object files. @code{copy}
+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 @code{copy} is controlled
+by command-line options.
+
+@code{copy} creates temporary files to do its translations and
+deletes them afterward. If no destination file is specified, a
+temporary file is created and the result is destructively renamed with
+the name of the input file. @code{copy} uses BFD to do all its
+translation work; it knows about all the formats BFD knows about, and
+thus is able to recognize most formats without being told explicitly.
+@xref{BFD,,BFD,ld.info,Using LD, the GNU linker}.
+
+@table @code
+@item -S
+@cindex calls @samp{strip}
+Causes @code{copy} to strip relocation and symbol information from the
+source file as the file is copied.
+
+@item -s @var{format}
+Explicitly specifies the object format of the source file.
+
+@item -d @var{format}
+Explicitly specifies the object format of the desired output file.
+
+@item -b @var{format}
+Explicitly specifies that the object format of the output should be the
+same as the input, i.e. a simple data transfer from source to
+destination with no translation involved.
+
+@item -v
+Show version number.
+
+@item -V
+Requests verbose output.
+
+@end table
+
@iftex
@node ld
@chapter ld
@xref{Top,, Overview,, Using LD: the GNU linker}.
@end iftex
-@node nm, objdump, ar, Top
+@node nm, objdump, copy, Top
@chapter nm
@cindex symbols
@kindex nm
[ @var{objfiles}@dots{} ]
@end smallexample
-GNU @code{nm} will list the symbols from object files @var{objfiles}.
+GNU @code{nm} lists the symbols from object files @var{objfiles}.
The long and short forms of options, shown here as alternatives, are
equivalent.
strip [ -v ] @var{objfiles}@dots{}
@end smallexample
-GNU @code{strip} will discard all symbols from object files
+GNU @code{strip} discards all symbols from object files
@var{objfiles}. The list of object files may include archives.
@code{strip} will not execute unless at least one object file is listed.
@table @code
@item -v
Verbose operation: list all object files modified. In the case of
-archives, @samp{strip -v} will list all members of the archive.
+archives, @samp{strip -v} lists all members of the archive.
@end table
@node Index, , strip, Top