我怎样才能找到一个ELF二进制C ++中所需的动态库? [英] How can I find the dynamic libraries required by an ELF Binary in C++?

查看:168
本文介绍了我怎样才能找到一个ELF二进制C ++中所需的动态库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能得到全部是用C ++在linux的ELF程序所需的动态库的列表?

How can I get a list of all the dynamic libraries that is required by an elf binary in linux using C++?

有一次,我已经成功地提取二进制我可以通过在 PATH 搜索找到实际的文件中的信息(文件名),但我一直没能够找到关于从ELF二进制提取重整的信息的任何信息。

Once I've managed to extract the information (filename?) from the binary I can find the actual file by searching through the PATH, but I haven't been able to find any information regarding extracting unmangled information from the ELF binary.

思考?

推荐答案

您可以拨打readelf -d程序,并解析输出:

You can call "readelf -d" program and parse the output:

readelf -d /usr/bin/readelf | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

这篇关于我怎样才能找到一个ELF二进制C ++中所需的动态库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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