The strip command includes information for strip on a POWER-based platform and an strip on an Itanium-based platform.
strip Command on POWER-based Platform
Reduces the size of an Extended Common Object File Format (XCOFF) object file by removing information used by the binder and symbolic debug program.
strip [ -V] [ -r [ -l ] | -x [ -l ] | -t | -H | -e | -E ] [ -X {32|64|32_64}] [ -- ] File ...
The strip command reduces the size of XCOFF object files. The strip command optionally removes the line number information, relocation information, the debug section, the typchk section, the comment section, file headers, and all or part of the symbol table from the XCOFF object files. Once you use this command, symbolic debugging of the file is difficult; therefore, you should normally use the strip command only on production modules that you have debugged and tested. Using the strip command reduces the storage overhead required by an object file.
For each object module, the strip command removes information as specified by the supplied options. For each archive file, the strip command removes the global symbol table from the archive.
You can restore a stripped symbol table to an archive or library file by using the ar -s command.
The strip command with no options removes the line number information, relocation information, symbol table, the debug section, and the typchk section, and the comment section.
This command returns the following
exit values:
0 | Successful completion. |
>0 | An error occurred. |
strip a.out
strip -H a.out
strip -X 32-64 lib.a
/usr/ccs/bin/strip | Contains the strip command. |
The ar command, as command, dump command, ld command, size command.
strip Command on Itanium-based Platform
Strip symbol table, debugging and line number information from an object file.
strip [-lVx] file . . .
The strip command strips the symbol table, debugging information, and line number information from ELF object files. Once this stripping process 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.
If strip is executed on a common archive file (see ar file format) in addition to processing the members, strip will remove the archive symbol table. The archive symbol table must be restored by executing the ar command with the -s flag before the archive can be linked by the ld command. strip will produce appropriate warning messages when this situation arises.
The amount of information stripped from the ELF object file can be controlled by using any of the following options:
strip is used to reduce the file storage overhead taken by the object file.
The a.out file format, ar file format.
The ar command, as command, dump command, and ld command.
The tmpnam subroutine.
The symbol table section will not be removed if it is contained within a segment, or the file is either a relocatable or dynamic shared object.
The line number and debugging sections will not be removed if they are contained within a segment, or their associated relocation section is contained within a segment.