strip(1) DG/UX 4.30 strip(1)
NAME
strip - strip non-executable information from an executable
file
SYNTAX
strip [-l] [-x] [-b] [-r] [-c] [-V] filename ...
DESCRIPTION
The strip command strips the symbol table, string table, and
line number information from common object files, including
archives. (See a.out(4)).
After stripping, no symbolic debugging is possible for that
file, although a core file produced by a stripped executable
can be symbolically debugged if an unstripped copy of the
executable is also available. (See sdb(1)).
Normally this command is run only on production modules that
have already been debugged and tested.
Options are:
-l Strip only line number information.
-x Do not strip static or external symbol information.
-b Same as the -x option, but also do not strip scoping
information (e.g., beginning and end of block
delimiters).
-r Do not strip static or external symbol information or
relocation information.
-c Strip only compiler generated symbols.
-V Print, on the standard error output, the version of the
strip command being executed.
If there are any relocation entries in the object file and
any symbol table information is to be stripped, except by
-c, strip complains and terminates without stripping
filename unless the -r flag is used. If -c is used and
there are relocation entries in the object file for compiler
generated symbols, strip complains and terminates without
stripping.
If the strip command is executed on a common archive file
(see ar(4)) the archive symbol table will be removed. The
archive symbol table must be restored by executing the ar(1)
command with the s option before the archive can be link-
edited by the ld(1) command. Strip generates appropriate
warning messages when this situation arises.
Licensed material--property of copyright holder(s) Page 1
strip(1) DG/UX 4.30 strip(1)
This command reduces the file storage overhead taken by the
executable file.
EXAMPLES
$ ls -s file
64 file
The ls -s command shows the block size of the file before
the strip is done.
$ strip file
$ ls -s file
48 file
The ls -s command shows that after the strip is done, the
file is smaller, only 48 blocks instead of 64 blocks.
FILES
TMPDIR/strp* temporary files TMPDIR is usually /usr/tmp
but can be redefined by setting the
envrionment variable TMPDIR [see tempnam() in
tmpnam(3S)].
SEE ALSO
ar(1), as(1), cc(1), ld(1), size(1), a.out(4), ar(4).
DIAGNOSTICS
strip: name: cannot be read
if name cannot be opened or is too short to be an
executable file.
strip: name: bad magic
if name is not an appropriate executable file.
strip: name: relocation entries present; cannot strip
if name contains relocation entries and the -r
flag is not used, the symbol table information
cannot be stripped.
Licensed material--property of copyright holder(s) Page 2