Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道如何从我为 arm64 架构构建的目标文件中列出符号?
我尝试使用nm,但它给了我一个错误:
nm
bfd_mach_o_scan: unknown architecture0x100000c/0x0 File format not recognized
是否可以使用 做同样的事情otool?
otool
系统nm不读取 arm64。您需要使用nmarm64 SDK 附带的(即 Xcode 中的 iphoneos SDK)。这与您运行的路径相同clang。
clang
$ xcrun -sdk iphoneos clang -arch arm64 main.c $ xcrun -sdk iphoneos nm a.out 0000000100000000 T __mh_execute_header 0000000100007f4c T _main U _printf U dyld_stub_binder