Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man1 / strip.1
blob8079113066198c8ba587dbaed2bce5834d14682a
1 .\"
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/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
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.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
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.
30 .\"
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.
35 .\"
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]
41 .\"
42 .\"
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
46 .\"
47 .TH STRIP 1 "Oct 5, 2007"
48 .SH NAME
49 strip \- strip symbol table, debugging and line number information from an
50 object file
51 .SH SYNOPSIS
52 .LP
53 .nf
54 \fBstrip\fR [\fB-lVx\fR] \fIfile\fR...
55 .fi
57 .SH DESCRIPTION
58 .sp
59 .LP
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:
64 .sp
65 .in +2
66 .nf
67 \&.line
68 \&.debug*
69 \&.stab*
70 .fi
71 .in -2
72 .sp
74 .sp
75 .LP
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.
79 .sp
80 .LP
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.
87 .sp
88 .LP
89 \fBstrip\fR is used to reduce the file storage overhead taken by the object
90 file.
91 .SH OPTIONS
92 .sp
93 .LP
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
96 supported:
97 .sp
98 .ne 2
99 .na
100 \fB\fB-l\fR\fR
102 .RS 6n
103 Strip line number information only.Does not strip the symbol table or debugging
104 information.
108 .ne 2
110 \fB\fB-V\fR\fR
112 .RS 6n
113 Prints, on standard error, the version number of  \fBstrip\fR.
117 .ne 2
119 \fB\fB-x\fR\fR
121 .RS 6n
122 Does not strip the symbol table. Debugging and line number information might be
123 stripped.
126 .SH OPERANDS
129 The following operand is supported:
131 .ne 2
133 \fB\fIfile\fR\fR
135 .RS 8n
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.
145 .SH EXIT STATUS
148 The following exit values are returned:
150 .ne 2
152 \fB\fB0\fR\fR
154 .RS 6n
155 Successful completion.
159 .ne 2
161 \fB\fB>0\fR\fR
163 .RS 6n
164 An error occurred.
167 .SH FILES
169 .ne 2
171 \fB\fB/tmp/strp*\fR\fR
173 .RS 14n
174 Temporary files
177 .SH ATTRIBUTES
180 See \fBattributes\fR(5) for descriptions of the following attributes:
185 box;
186 c | c
187 l | l .
188 ATTRIBUTE TYPE  ATTRIBUTE VALUE
190 Interface Stability     Standard
193 .SH SEE ALSO
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)
199 .SH NOTES
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
208 a segment.
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
213 \fBmcs\fR(1).