用于分析库文件中符号的实用程序
我在使用大型静态库 (.lib) 文件时遇到了一些问题,并且怀疑由于不加区别地使用模板类而导致代码膨胀。我想分析库中的符号以确认哪些符号构成了文件大小的大部分。
当我将可执行文件链接到该库时,生成的输出在大小方面更加合理(大约 20Mb),因此链接器显然会删除大量冗余符号。我想知道它删除了什么..
我知道我可以使用 dumpbin 生成符号和标头,但是,由于相关库非常大(900Mb),如果没有用于解析和报告的实用程序,此转储几乎无法使用在它上面。
显然我可以自己写这个,但想知道是否有人可以推荐任何可用的免费软件?
I'm having some problems with a large static library (.lib) file, and am suspecting code bloat from indiscriminate use of template classes. I want to analyse the symbols in the library to confirm which are making up the bulk of the file size.
When I link my executable against this library, the resulting output is much more sensible, size-wise (about 20Mb), so the linker is obviously stripping out lots of redundant symbols. I want to find out what its removing..
I know I can use dumpbin to generate the symbols and headers, but, with the library in question being pretty large (900Mb), this dump is pretty much unusable without a utility for parsing and reporting on it.
Obviously I could write this myself, but was wondering if anyone can recommend any freeware already available for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是你自己的图书馆吗?如果是这样,您可以生成链接映射 描述了库中代码的布局,这将以更友好的形式为您提供所需的信息。
如果您没有源代码访问权限来执行此操作,则可以使用 Perl 或其他开源脚本工具来破解
dumpbin
输出。编辑:您还可以尝试一下 LibDump,它可以从此处下载。我自己没用过这个。
Is this your own library? If so you can generate a link map that describes the layout of the code in the library, which would give you the info you need here in a more friendly form.
If you don't have source code access to do this, you could use Perl or other open-source scripting tools to crack the
dumpbin
output.EDIT: you could also give LibDump a spin, it's downloadable from here. I have not used this myself.
我发现一个(SymbolSort)效果非常好,给了我我所需要的东西:
I found one (SymbolSort) that works really well, gives me exactly what I need: