'\" te .\" Copyright 1989 AT&T .\" Copyright (c) 2007, 2011, Oracle and/or its affiliates.All rights reserved. .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation.Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation.In the following statement, the phrase"this text" refers to portions of the system documentation.Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard,the original IEEE and The Open Group Standard is the referee document.The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.This notice shall appear on any product containing this material. .TH strip 1 "2011 年 6 月 8 日" "SunOS 5.11" "用户命令" .SH 名称 strip \- 删除目标文件中的符号表、调试和行编号信息 .SH 用法概要 .LP .nf \fBstrip\fR [\fB-lVx\fR] \fIfile\fR... .fi .SH 描述 .sp .LP \fBstrip\fR 命令可删除 \fBELF\fR 目标文件中的符号表 \fBSHT_SYMTAB\fR 及其相关联的字符串表、调试信息和行编号信息。即除了符号表及其相关字符串表外,还会删除以下部分: .sp .in +2 .nf \&.line \&.debug* \&.stab* .fi .in -2 .sp .sp .LP 一旦该删除流程完成,就能有限访问该文件的符号调试信息。因此,此命令只能在调试和测试过的生产模块上运行。 .sp .LP 如果除处理成员外,还对通用归档文件(请参见 \fBar.h\fR(3HEAD))执行 \fBstrip\fR,则 \fBstrip\fR 会删除归档符号表。必须首先执行带 \fB-s\fR 选项的 \fBar\fR(1) 命令来恢复归档符号表后,才能通过 \fBld\fR(1) 命令链接归档。出现该情况时,\fBstrip\fR 会生成相应的警告消息。 .sp .LP \fBstrip\fR 用于降低目标文件所占用的文件存储开销。 .SH 选项 .sp .LP 可使用以下任意选项来控制从 \fBELF\fR 目标文件中删除的消息量。支持以下选项: .sp .ne 2 .mk .na \fB\fB-l\fR\fR .ad .RS 6n .rt 仅删除行编号信息。不删除符号表或调试信息。 .RE .sp .ne 2 .mk .na \fB\fB-V\fR\fR .ad .RS 6n .rt 在标准错误中列显 \fBstrip\fR 的版本号。 .RE .sp .ne 2 .mk .na \fB\fB-x\fR\fR .ad .RS 6n .rt 不删除符号表。可能删除调试和行编号信息。 .RE .SH 操作数 .sp .LP 支持下列操作数: .sp .ne 2 .mk .na \fB\fIfile\fR\fR .ad .RS 8n .rt 与执行文件对应的路径名。 .RE .SH 环境变量 .sp .LP 有关影响 \fBstrip\fR 执行的以下环境变量的说明,请参见 \fBenviron\fR(5):\fBLANG\fR、\fBLC_ALL\fR、\fBLC_CTYPE\fR、\fBLC_MESSAGES\fR 和 \fBNLSPATH\fR。 .SH 退出状态 .sp .LP 将返回以下退出值: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt 成功完成。 .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt 出现错误。 .RE .SH 文件 .sp .ne 2 .mk .na \fB\fB/tmp/strp*\fR\fR .ad .RS 14n .rt 临时文件 .RE .SH 属性 .sp .LP 有关下列属性的说明,请参见 \fBattributes\fR(5): .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . 属性类型属性值 _ 可用性developer/base-developer-utilities _ 接口稳定性Committed(已确定) _ 标准请参见 \fBstandards\fR(5)。 .TE .SH 另请参见 .sp .LP \fBar\fR(1)、\fBas\fR(1)、\fBld\fR(1)、\fBmcs\fR(1)、\fBelf\fR(3ELF)、\fBtmpnam\fR(3C)、\fBa.out\fR(4)、\fBar.h\fR(3HEAD)、\fBattributes\fR(5)、\fBenviron\fR(5)、\fBstandards\fR(5) .SH 附注 .sp .LP 如果符号表部分包含在分段中,或者文件是可重定位目标文件,则不会删除该符号表部分。 .sp .LP 如果行编号和调试部分包含在分段中,或者其相关联的重定位部分包含在分段中,则不会删除该行编号和调试部分。 .sp .LP 可使用 \fBstrip\fR 命令来删除 ELF 目标文件中的标准预定义部分集。要按名称删除用户指定的部分,请参见 \fBmcs\fR(1)。