什么是"带" (GCC应用程序)用的呢? [英] What is "strip" (GCC application) used for?

查看:112
本文介绍了什么是"带" (GCC应用程序)用的呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是这个小应用程序?

what is this little application for?

在使用它没有任何选项减少了可执行文件的大小,而是如何/它做什么?

When using it without any options reduces the size of the executables, but how/what it does?

推荐答案

从(Mac OS X的,但其他人都差不多)的手册页

From the (Mac OS X, but others are similar) man page:

条删除或修改连接到的输出符号表
         汇编器和链接器。这是有用的后一个,以节省空间
         程序已经调试并限制动态绑定的符号。

strip removes or modifies the symbol table attached to the output of the assembler and link editor. This is useful to save space after a program has been debugged and to limit dynamically bound symbols.

请注意关于位后,程序已经调试,是因为在调试剥离可执行文件的非常的辛苦,确实如此。 限价动态绑定的符号是一种罕见的用途:它可以让​​你做一些职能外部库被带走,告诉那里的实际code所在的索引项不可访问。这也是在man page解释说。

Note the bit about "after a program has been debugged" because debugging a stripped executable is very hard, indeed. The "limit dynamically bound symbols" is a rarer use: it lets you make some of the functions in an external library inaccessible by taking away the index entries that tell where the actual code is located. This is also explained in the man page.

由于廉价而充足的磁盘在大多数情况下,你根本就不会用这个了麻烦。但是,您可能希望它像内嵌设备,应急磁盘等空间受限的情况。

As cheap and plentiful as disk is in most situation you simply wouldn't bother with this anymore. But you might want it for space constrained situation like embeded devices, rescue disks, etc.

这篇关于什么是"带" (GCC应用程序)用的呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆