diff options
author | Nick Kledzik <kledzik@apple.com> | 2014-08-30 00:20:14 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2014-08-30 00:20:14 +0000 |
commit | d04bc35852ac9c53a0c57730ebc5a73b21279ac1 (patch) | |
tree | 3ee103ab6bcaa4ffbbf5d038cc1a0e1d5d209baa /llvm/test/tools/llvm-objdump | |
parent | f7765ac9b9059b56654903e7e1214594f330a178 (diff) | |
download | bcm5719-llvm-d04bc35852ac9c53a0c57730ebc5a73b21279ac1.tar.gz bcm5719-llvm-d04bc35852ac9c53a0c57730ebc5a73b21279ac1.zip |
Object/llvm-objdump: allow dumping of mach-o exports trie
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 that export 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.
llvm-svn: 216808
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
-rwxr-xr-x | llvm/test/tools/llvm-objdump/Inputs/exports-trie.macho-x86_64 | bin | 0 -> 8752 bytes | |||
-rw-r--r-- | llvm/test/tools/llvm-objdump/macho-exports-trie.test | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/Inputs/exports-trie.macho-x86_64 b/llvm/test/tools/llvm-objdump/Inputs/exports-trie.macho-x86_64 Binary files differnew file mode 100755 index 00000000000..5d7506078a7 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/Inputs/exports-trie.macho-x86_64 diff --git a/llvm/test/tools/llvm-objdump/macho-exports-trie.test b/llvm/test/tools/llvm-objdump/macho-exports-trie.test new file mode 100644 index 00000000000..f66fe3710cb --- /dev/null +++ b/llvm/test/tools/llvm-objdump/macho-exports-trie.test @@ -0,0 +1,11 @@ +# RUN: llvm-objdump -macho -exports-trie -arch x86_64 \ +# RUN: %p/Inputs/exports-trie.macho-x86_64 2>/dev/null | FileCheck %s + + +# CHECK:[re-export] _malloc (from libSystem) +# CHECK:[re-export] _myfree (_free from libSystem) +# CHECK:0x00000F70 _myWeakweak_def] +# CHECK:0x00001018 _myTLVper-thread] +# CHECK:0x12345678 _myAbsabsolute] +# CHECK:0x00000F60 _foo + |