mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-08 13:00:50 +00:00
aa4d2acf37
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216808 91177308-0d34-0410-b5e6-96231b3b80d8
12 lines
363 B
Plaintext
12 lines
363 B
Plaintext
# 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
|
|
|