This is an archive of the discontinued LLVM Phabricator instance.

Use LC_DYLD_EXPORTS_TRIE to locate the dyld trie structure if present
ClosedPublic

Authored by jingham on Aug 6 2021, 3:36 PM.

Details

Summary

The pointer to the dyld trie data structure which lldb needs to parse to get "trampoline kinds" on Darwin used to be a field in the LC_DYLD_INFO load command. A new load command was added recently dedicated to this purpose: LC_DYLD_EXPORTS_TRIE. The format of the trie did not change, however. So all we have to do is use the new command if present. The commands are supposed to be mutually exclusive, so I added an lldb_assert to warn if they are not.

Without this patch TestIndirectSymbols.py fails on systems that use the new command, so there wasn't a need to write a test for this change.

Diff Detail