strip(CP) 6 January 1993 strip(CP) Name strip - strip symbol and line number information from a common object file Syntax strip [-b] [-l] [-r] [-V] [-x] filename ... Description The strip command strips the symbol table and line number information from common object files, including archives. Once this has been done, no symbolic debugging access will be available for that file; therefore, this command is normally run only on production modules that have been debugged and tested. The amount of information stripped from the symbol table can be con- trolled by using any of the following options: -b Same as the -x option, but also do not strip scoping information (for example, beginning and end of block delimiters). -l Strip line number information only; do not strip any symbol table in- formation. -r Do not strip static or external symbol information, or relocation in- formation. -V Print the version of the strip command executing on the standard error output. -x Do not strip static or external symbol information. If there are any relocation entries in the object file and any symbol table information is to be stripped, strip will complain and terminate without stripping filename unless the -r option is used. If the strip command is executed on a common archive file (see ar(FP)) the archive symbol table will be removed. The archive symbol table must be restored by executing the ar(CP) command with the -s option before the archive can be link-edited by the ld(CP) command. strip will produce appropriate warning messages when this situation arises. The strip command is used to reduce the file storage overhead taken by the object file. Notes If you are using XENIX binaries, please refer to the XENIX manual page for this utility for information on appropriate usage with XENIX binaries. Files TMPDIR/strp* Temporary files. TMPDIR is usually /usr/tmp but can be redefined by setting the environment variable TMPDIR (see tempnam() in tmpnam(S)). Diagnostics strip: name: cannot open if name cannot be read. strip: name: bad magic if name is not an appropriate common object 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. Notes This utility determines whether an object file is in OMF or COFF format and executes the appropriate binaries in each case. Since this utility relies on the files in /lib/coff and /lib/xout), changing or moving any of those files results in an error. See also a.out(FP), ar(CP), ar(FP) as(CP), cc(CP), ld(CP), tmpnam(S) Standards conformance strip is conformant with: AT&T SVID Issue 2; and X/Open Portability Guide, Issue 3, 1989.