发现对Mac OS&的动态库依赖关系.的Linux [英] Discovery of Dynamic library dependency on Mac OS & Linux
本文介绍了发现对Mac OS&的动态库依赖关系.的Linux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Windows上,有一个工具Depends.exe可以发现EXE/DLL文件对其他DDL的依赖性.在Mac OS和Linux上,哪个命令行工具是等效的?
On Windows there is a tool Depends.exe to discover dependency of an EXE/DLL file on other DDLs. Which commandline tool is equivalent on Mac OS and Linux?
推荐答案
- Mac OS X:
otool
-L
文件 - Linux:
ldd
文件 - Mac OS X:
otool
-L
file - Linux:
ldd
file
如果这些命令没有提供所需的内容,则在Mac OS X上,您可以使用otool
-l
file 转储所有加载命令.在Linux上,您可以使用readelf
-d
文件转储动态节的全部内容.
If those commands don't provide what you want, on Mac OS X you can dump all the load commands with otool
-l
file. On Linux you can dump the entire contents of the dynamic section with readelf
-d
file.
这篇关于发现对Mac OS&的动态库依赖关系.的Linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文