获取可执行文件中使用的静态库列表 [英] Get list of static libraries used in an executable

查看:428
本文介绍了获取可执行文件中使用的静态库列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于 ldd 仅列出动态库,是否有一种方法可以提取有关用于创建可执行文件的静态库的信息?

Since ldd lists only the dynamic libraries, is there a way to extract the information about the static libraries used to create the executable?

推荐答案

ldd< exe filename> 显示动态链接库

nm< exe filename> 显示文件中的符号。

来自静态库需要对这些库运行 nm 以获取其中的符号(函数等)列表,然后将它们与您的符号列表 nm< exe filename>

To see which symbols come from static libraries requires running nm against those libraries to get a list of the symbols (functions, etc.) in them, then comparing them to what your list of symbols from nm <exe filename>.

比较列表与 comm 命令。有关详情,请参阅 man comm

You compare lists with the comm command. See man comm for details.

这是从这个论坛拍摄的这里

This was taken from this forum here.

这篇关于获取可执行文件中使用的静态库列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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