This is an archive of the discontinued LLVM Phabricator instance.

[Object, llvm-objdump] allow dumping of mach-o exports trie
ClosedPublic

Authored by kledzik on Aug 29 2014, 2:10 PM.

Details

Summary

MachOObjectFile in lib/Object currently has no support for parsing the rebase, binding, and export information from the LC_DYLD_INFO load command in final linked mach-o images. This patch adds support for parsing the exports trie data structure. It also adds an option to llvm-objdump to dump the exports info.

I did the exports parsing first because it is the hardest. The information is encoded in a trie structure, but the standard ObjectFile way to inspect content is through iterators. So I needed to make an iterator that would do a non-recursive walk through the trie and maintain the concatenation of edges needed for the current string prefix.

I plan to add similar support in MachOObjectFile and llvm-objdump to parse/display the rebasing and binding info too.

Diff Detail

Event Timeline

kledzik updated this revision to Diff 13104.Aug 29 2014, 2:10 PM
kledzik retitled this revision from to [Object, llvm-objdump] allow dumping of mach-o exports trie.
kledzik updated this object.
kledzik edited the test plan for this revision. (Show Details)
kledzik set the repository for this revision to rL LLVM.
kledzik added a subscriber: Unknown Object (MLST).
Bigcheese accepted this revision.Aug 29 2014, 2:19 PM
Bigcheese edited edge metadata.

lgtm

This revision is now accepted and ready to land.Aug 29 2014, 2:19 PM
kledzik closed this revision.Aug 29 2014, 5:37 PM

committed in r216808