Skip to content

Exports load command #3149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 10, 2021

Conversation

jimingham
Copy link

The pointer to the dyld "exports" trie moved from the LC_DYLD_INFO to a dedicated LC_DYLD_EXPORTS_TRIE command. lldb needs to read that information, so this patch adds the define for the new load command (thanks Davide!) and then uses it in lldb.

Before this fix, the TestIndirectSymbols.py test in the lldb test suite failed when run on a Star recent enough to have these changes. So this didn't need new testing.

Davide Italiano and others added 2 commits August 9, 2021 17:35
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.

Differential Revision: https://reviews.llvm.org/D107673
@jimingham jimingham merged commit 42fc8cf into swiftlang:stable/20210726 Aug 10, 2021
@jimingham jimingham deleted the exports-load-command branch August 10, 2021 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant