LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 956|回复: 6

help: decrease library size :help

[复制链接]
发表于 2003-6-26 11:02:35 | 显示全部楼层 |阅读模式
I find use 'strip' command can decrease the size of execuatable binary ELF file by 10 times. or, a 10 mb file is decreased to 1 mb. Because the useful informations are removed, e.g. debug, symbol etc.
So, I wonder whether there is a tool to decrease the size of the lib files (*.so.* kind of files). Because I guess libary files also contain useless informations. Anyone has this knowledge, please let me know. Thanks a lot!
:help
发表于 2003-6-26 12:21:14 | 显示全部楼层
共享库最好不要strip,可能会产生问题。
 楼主| 发表于 2003-6-26 13:18:24 | 显示全部楼层
but, the size is key problem for embedded applications. and, the "strip" doesn't delete vital part of the code.  I think it is safe.
发表于 2003-6-27 02:40:04 | 显示全部楼层
你 strip --strip-debug 不行么?
 楼主| 发表于 2003-6-30 11:31:37 | 显示全部楼层
不行.
I use 'file' command to check the lib file. it shows the following information.
"libh323_linux_x86_r.so.1.12.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped"
It seems the file has already been stripped after compilation. But, I want to know whether the file can be decreased more space or not.
发表于 2003-6-30 23:37:06 | 显示全部楼层
为了保证系统的稳定

这种操作还是不做为好

因为现在空间都很大
没有必要节省那么一点空间
发表于 2003-7-1 00:05:17 | 显示全部楼层
库里面需要符号表,如果你把符号表都搞掉了,库也就挂了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表