strip(1) CLIX strip(1)
NAME
strip - Strips symbol and line number information from a common object
file
SYNOPSIS
strip [-l] [-x] [-b] [-r] [-V] filename ...
FLAGS
-l Strip line number information only; do not strip any symbol table
information.
-x Do not strip static or external symbol information.
-b Same as the -x flag, but also do not strip scoping information (For
example, beginning and end of block delimiters).
-r Do not strip static or external symbol information, or relocation
information.
-V Display the version of the strip command executing on stderr.
DESCRIPTION
The strip command strips the symbol table and line number information from
common object files, including archives. Once this is done, no symbolic
debugging access is available for that file; therefore, this command is
normally run only on production modules that are debugged and tested. If
the object file contains any symbols with names that end in
appl_version_id, these symbols are not stripped. (The symbols are not
stripped in order to support the rtv command, which performs run-time
versioning.)
If there are any relocation entries in the object file and any symbol
table information is to be stripped, the strip command complains and
terminates without stripping filename unless the -r flag is used.
If the strip command is executed on a common archive file (see ar()) the
archive symbol table is removed. The archive symbol table must be
restored by executing the ar command with the s flag before the archive
can be link-edited by the ld command. The strip command produces
appropriate warning messages when this situation arises.
The strip command is used to reduce the file storage overhead taken by the
object file.
EXAMPLES
1. The following strips all the number information from foo:
2/94 - Intergraph Corporation 1
strip(1) CLIX strip(1)
strip -l foo
2. The following strips everything except static and external
information:
strip -x foo
FILES
TMPDIR/strp*
Temporary files.
TMPDIR Usually /usr/tmp, but it can be redefined by setting the
environment variable TMPDIR (see tempnam() in tmpnam()).
DIAGNOSTICS
strip: name: cannot open
name cannot be read.
strip: name: bad magic
name is not an appropriate common object file.
strip: name: relocation entries present; cannot strip
name contains relocation entries and the -r flag is not used, the
symbol table information cannot be stripped.
EXIT VALUES
Returns 0 if successful; otherwise, a positive number on an error.
RELATED INFORMATION
Commands: acc(1), ar(1), as(1), cc(1), ld(1), rtv(1)
Files: a.out(4), ar(4)
Functions: tmpnam(3)
2 Intergraph Corporation - 2/94