2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document. The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
25 .\" This notice shall appear on any product containing this material.
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
45 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
47 .TH STRIP 1 "Oct 5, 2007"
49 strip \- strip symbol table, debugging and line number information from an
54 \fBstrip\fR [\fB-lVx\fR] \fIfile\fR...
60 The \fBstrip\fR command removes the symbol table \fBSHT_SYMTAB\fR and its
61 associated string table, debugging information, and line number information
62 from \fBELF\fR object files. That is, besides the symbol table and associated
63 string table, the following sections are removed:
76 Once this stripping process has been done, limited symbolic debugging access is
77 available for that file. Therefore, this command is normally run only on
78 production modules that have been debugged and tested.
81 If \fBstrip\fR is executed on a common archive file (see \fBar.h\fR(3HEAD)) in
82 addition to processing the members, \fBstrip\fR removes the archive symbol
83 table. The archive symbol table must be restored by executing the \fBar\fR(1)
84 command with the \fB-s\fR option before the archive can be linked by the
85 \fBld\fR(1) command. \fBstrip\fR produces appropriate warning messages when
86 this situation arises.
89 \fBstrip\fR is used to reduce the file storage overhead taken by the object
94 The amount of information stripped from the \fBELF\fR object file can be
95 controlled by using any of the following options. The following options are
103 Strip line number information only.Does not strip the symbol table or debugging
113 Prints, on standard error, the version number of \fBstrip\fR.
122 Does not strip the symbol table. Debugging and line number information might be
129 The following operand is supported:
136 A path name referring to an executable file.
139 .SH ENVIRONMENT VARIABLES
142 See \fBenviron\fR(5) for descriptions of the following environment variables
143 that affect the execution of \fBstrip\fR: \fBLANG\fR, \fBLC_ALL\fR,
144 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
148 The following exit values are returned:
155 Successful completion.
171 \fB\fB/tmp/strp*\fR\fR
180 See \fBattributes\fR(5) for descriptions of the following attributes:
188 ATTRIBUTE TYPE ATTRIBUTE VALUE
190 Interface Stability Standard
196 \fBar\fR(1), \fBas\fR(1), \fBld\fR(1), \fBmcs\fR(1), \fBelf\fR(3ELF),
197 \fBtmpnam\fR(3C), \fBa.out\fR(4), \fBar.h\fR(3HEAD), \fBattributes\fR(5),
198 \fBenviron\fR(5), \fBstandards\fR(5)
202 The symbol table section is not removed if it is contained within a segment or
203 if the file is a relocatable object.
206 The line number and debugging sections are not removed if they are contained
207 within a segment or if their associated relocation section is contained within
211 The \fBstrip\fR command is used to remove a standard predefined set of sections
212 from an ELF object file. To remove a user specified section by name, see