diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-08-30 22:10:58 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-08-30 22:10:58 +0000 |
commit | d4522460d495fb0be3303f0727f9bd00867c0b16 (patch) | |
tree | 57bc4c30b28b111ddd19353a636706002dac054a /tools | |
parent | a7710edd98d71a81c43f8e3889cf0c790885d1b8 (diff) | |
download | external_llvm-d4522460d495fb0be3303f0727f9bd00867c0b16.zip external_llvm-d4522460d495fb0be3303f0727f9bd00867c0b16.tar.gz external_llvm-d4522460d495fb0be3303f0727f9bd00867c0b16.tar.bz2 |
Teach macho-dump to dump the uleb128s referred to by linkedit_data segments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/macho-dump/macho-dump.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/macho-dump/macho-dump.cpp b/tools/macho-dump/macho-dump.cpp index e3c3c7c..2b22c3b 100644 --- a/tools/macho-dump/macho-dump.cpp +++ b/tools/macho-dump/macho-dump.cpp @@ -318,7 +318,16 @@ static int DumpLinkeditDataCommand(MachOObject &Obj, return Error("unable to read segment load command"); outs() << " ('dataoff', " << LLC->DataOffset << ")\n" - << " ('datasize', " << LLC->DataSize << ")\n"; + << " ('datasize', " << LLC->DataSize << ")\n" + << " ('_addresses', [\n"; + + SmallVector<uint64_t, 8> Addresses; + Obj.ReadULEB128s(LLC->DataOffset, Addresses); + for (unsigned i = 0, e = Addresses.size(); i != e; ++i) + outs() << " # Address " << i << '\n' + << " ('address', " << format("0x%x", Addresses[i]) << "),\n"; + + outs() << " ])\n"; return 0; } |