Zhang via llvm-dev
2021-Jun-21 05:09 UTC
[llvm-dev] llvm-nm and LLVM Tapi not parsing Tapi correctly?
Hi: I'm currently using the .TBDs shipped with Xcode 12.5. Running ``llvm-nm /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libSystem.B.tbd`` only prints the symbols listed in the first "slice" of the tbd file: ``` ➜ LLVMRelease bin/llvm-nm /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libSystem.B.tbd /usr/lib/libSystem.B.dylib (for architecture armv7): 00000000 S ___System_BVersionNumber 00000000 S ___System_BVersionString 00000000 S ___crashreporter_info__ 00000000 S _libSystem_atfork_child 00000000 S _libSystem_atfork_parent 00000000 S _libSystem_atfork_prepare 00000000 S _mach_init_routine /usr/lib/libSystem.B.dylib (for architecture armv7s): 00000000 S ___System_BVersionNumber 00000000 S ___System_BVersionString 00000000 S ___crashreporter_info__ 00000000 S _libSystem_atfork_child 00000000 S _libSystem_atfork_parent 00000000 S _libSystem_atfork_prepare 00000000 S _mach_init_routine /usr/lib/libSystem.B.dylib (for architecture arm64): 0000000000000000 S ___crashreporter_info__ 0000000000000000 S _libSystem_atfork_child 0000000000000000 S _libSystem_atfork_parent 0000000000000000 S _libSystem_atfork_prepare 0000000000000000 S _mach_init_routine /usr/lib/libSystem.B.dylib (for architecture arm64e): 0000000000000000 S ___crashreporter_info__ 0000000000000000 S _libSystem_atfork_child 0000000000000000 S _libSystem_atfork_parent 0000000000000000 S _libSystem_atfork_prepare 0000000000000000 S _mach_init_routine ``` The remaining slices of the tbd file seems to be unparsed / unhandled by LLVM's Tapi facility. Is this intended or should I open a issue at bugzilla? What's the intended TapiParser library to use? I've uploaded the tbd file to https://gist.github.com/Naville/cd24dc26d8e5f770ddceb30d125d86b9 in case anyone needs to reproduce this Zhang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210621/0a8eba14/attachment.html>
Cyndy Ishida via llvm-dev
2021-Jun-25 03:54 UTC
[llvm-dev] llvm-nm and LLVM Tapi not parsing Tapi correctly?
Hi Zhang, If the slice you’re referring to is the embedded tbd content after each `--- !tapi-tbd`, that represents a different dylib thats reexported by the top level library. In this case, libSystem is the top level library and it’s follow up contents (e.g. libcache) are the reexports. This isn't shown by default in nm. To display this information you can add the option `--add-inlinedinfo` to llvm-nm. https://llvm.org/docs/CommandGuide/llvm-nm.html#cmdoption-llvm-nm-add-inlinedinfo <https://llvm.org/docs/CommandGuide/llvm-nm.html#cmdoption-llvm-nm-add-inlinedinfo> - Cyndy> On Jun 20, 2021, at 10:09 PM, Zhang via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi: > I'm currently using the .TBDs shipped with Xcode 12.5. > > Running ``llvm-nm /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libSystem.B.tbd`` > > only prints the symbols listed in the first "slice" of the tbd file: > > ``` > ➜ LLVMRelease bin/llvm-nm /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libSystem.B.tbd > > /usr/lib/libSystem.B.dylib (for architecture armv7): > 00000000 S ___System_BVersionNumber > 00000000 S ___System_BVersionString > 00000000 S ___crashreporter_info__ > 00000000 S _libSystem_atfork_child > 00000000 S _libSystem_atfork_parent > 00000000 S _libSystem_atfork_prepare > 00000000 S _mach_init_routine > > /usr/lib/libSystem.B.dylib (for architecture armv7s): > 00000000 S ___System_BVersionNumber > 00000000 S ___System_BVersionString > 00000000 S ___crashreporter_info__ > 00000000 S _libSystem_atfork_child > 00000000 S _libSystem_atfork_parent > 00000000 S _libSystem_atfork_prepare > 00000000 S _mach_init_routine > > /usr/lib/libSystem.B.dylib (for architecture arm64): > 0000000000000000 S ___crashreporter_info__ > 0000000000000000 S _libSystem_atfork_child > 0000000000000000 S _libSystem_atfork_parent > 0000000000000000 S _libSystem_atfork_prepare > 0000000000000000 S _mach_init_routine > > /usr/lib/libSystem.B.dylib (for architecture arm64e): > 0000000000000000 S ___crashreporter_info__ > 0000000000000000 S _libSystem_atfork_child > 0000000000000000 S _libSystem_atfork_parent > 0000000000000000 S _libSystem_atfork_prepare > 0000000000000000 S _mach_init_routine > ``` > > The remaining slices of the tbd file seems to be unparsed / unhandled by LLVM's Tapi facility. Is this intended or should I open a issue at bugzilla? > What's the intended TapiParser library to use? > > I've uploaded the tbd file to https://gist.github.com/Naville/cd24dc26d8e5f770ddceb30d125d86b9 in case anyone needs to reproduce this > > > Zhang > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210624/64b4345a/attachment.html>