summaryrefslogtreecommitdiff
path: root/tools/macho-dump
diff options
context:
space:
mode:
Diffstat (limited to 'tools/macho-dump')
-rw-r--r--tools/macho-dump/macho-dump.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/macho-dump/macho-dump.cpp b/tools/macho-dump/macho-dump.cpp
index 274c41bd25c..e2a8ef136ec 100644
--- a/tools/macho-dump/macho-dump.cpp
+++ b/tools/macho-dump/macho-dump.cpp
@@ -213,6 +213,14 @@ static int DumpSymtabCommand(MachOObject &Obj,
outs() << " ('stroff', " << SLC->StringTableOffset << ")\n";
outs() << " ('strsize', " << SLC->StringTableSize << ")\n";
+ // Cache the string table data.
+ Obj.RegisterStringTable(*SLC);
+
+ // Dump the string data.
+ outs() << " ('_string_data', '";
+ outs().write_escaped(Obj.getStringTableData(),
+ /*UseHexEscapes=*/true) << "')\n";
+
return 0;
}