如何检测二进制/库中未定义的符号? [英] How can I detect undefined symbols in a binary/library?
本文介绍了如何检测二进制/库中未定义的符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一种工具可以使用二进制文件(可执行文件)或库,并查看任何共享库依赖项,查找并列出任何未定义的符号(即使未使用它们)?找到这个的任何实用方法?
Is there a tool that takes a binary (executable) or a library and, looking also into any shared library dependencies, finds and lists any undefined symbols (even if they are not used)? Any practical way of finding this?
推荐答案
如果使用 *nix,并且符号没有被剥离,使用 'nm' 会有所帮助.
If using *nix, and symbols have not been stripped, using 'nm' will help.
# nm lib-or-binary-name
U strcmp@@GLIBC_2.2.5
'U'表示未定义,如果某处满足,会在@之后注明.
The 'U' means undefined, and if it is satisfied somewhere, that will be noted after the @.
这篇关于如何检测二进制/库中未定义的符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文