summaryrefslogtreecommitdiff
path: root/tools/macho-dump/macho-dump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/macho-dump/macho-dump.cpp')
-rw-r--r--tools/macho-dump/macho-dump.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/macho-dump/macho-dump.cpp b/tools/macho-dump/macho-dump.cpp
index e3c3c7cbe64..2b22c3b0fd9 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;
}