简体   繁体   English

如何在 Linux 中打印 ios 应用程序的共享依赖项

[英]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也应该让你通过上面的错误消息。

  1. demoApp.app is an app bundle, which is a directory hierarchy containing the executable, resources, etc.; demoApp.app是一个应用包,它是一个包含可执行文件、资源等的目录层次结构;
  2. demoApp.ipa is a zip-compressed file containing the app bundle, used for cases like uploading the app to the App Store; demoApp.ipa是一个包含 app bundle 的 zip 压缩文件,用于将 app 上传到 App Store 等情况; and
  3. demoApp.app.dSYM is a file system package (directory hierarchy) that includes the app's symbol data demoApp.app.dSYM是一个包含应用程序符号数据的文件系统 package(目录层次结构)

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 createimage 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM