[英]How do I can print shared dependencies of ios app in Linux
I want to print shared object dependencies of ios app in linux script for crash parsing.我想在 linux 脚本中打印 ios 应用程序的共享 object 依赖项以进行崩溃解析。
But I am getting following error while executing commands.但是在执行命令时出现以下错误。 1)
ldd./demoApp.app
not a regular file 2) ldd./demoApp.ipa
not a dynamic executable 3) ldd./demoApp.app.dSYM/Contents/Resources/DWARF/demoApp
not a dynamic executable 1)
ldd./demoApp.app
不是常规文件 2) ldd./demoApp.ipa
不是动态可执行文件 3) ldd./demoApp.app.dSYM/Contents/Resources/DWARF/demoApp
不是动态可执行文件
What argument I should pass to ldd to print the dependencies.我应该将什么参数传递给 ldd 以打印依赖项。
I have not used ldd (I don't use Linux), but I would start with man ldd
to determine appropriate arguments.我没有使用过 ldd(我不使用 Linux),但我会从
man ldd
开始确定合适的 arguments。 Also ldd./demoApp.app/demoApp
should get you past the error messages above. ldd./demoApp.app/demoApp
也应该让你通过上面的错误消息。
It would surprise me if ldd supports mach-o and the darwin loader formats, and you seem to have demonstrated that it doesn't...如果 ldd 支持 mach-o 和 darwin 加载器格式,我会感到惊讶,而且您似乎已经证明它不...
OTOH, lldb is generally built to support reading mach-o object files on linux, so you could use it. OTOH,lldb通常是为支持读取linux上的mach-o object文件而构建的,因此您可以使用它。
The direct shared library dependencies are stored in the "load commands" of a mach-o binary, and lldb will read those.直接共享库依赖项存储在 mach-o 二进制文件的“加载命令”中,lldb 将读取这些文件。 So just start up lldb, do
target create
for your.app bundle, and image list
will show you the direct dependencies.所以只需启动 lldb,为 your.app 包
target create
, image list
将显示直接依赖项。 lldb will recurse through all the direct dependencies to find the closure of the dependencies for that.app, but to do that you would have to have all the directly dependent libraries available (since their dependencies are in the "load commands" of the dependent libraries.) I'm not sure how you would get your hands on those. lldb 将遍历所有直接依赖项以找到 that.app 依赖项的闭包,但要做到这一点,您必须使所有直接依赖库都可用(因为它们的依赖项位于依赖库的“加载命令”中) .) 我不知道你会如何得到这些。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.