summaryrefslogtreecommitdiffstats
path: root/llvm/tools/macho-dump/macho-dump.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2014-03-18 22:09:05 +0000
committerJim Grosbach <grosbach@apple.com>2014-03-18 22:09:05 +0000
commit448334a738408b08b9472f7ec15cc331f108e7bf (patch)
tree81f42e7bd67948b0eb8b56dad265a591d0aa533c /llvm/tools/macho-dump/macho-dump.cpp
parent79f91c595dc5eba449f3313e88ea0f2761566074 (diff)
downloadbcm5719-llvm-448334a738408b08b9472f7ec15cc331f108e7bf.tar.gz
bcm5719-llvm-448334a738408b08b9472f7ec15cc331f108e7bf.zip
Darwin: Add assembler directives to create version-min load commands.
Allow object files to be tagged with a version-min load command for iOS or MacOSX. Teach macho-dump to understand the version-min load commands for testcases. rdar://11337778 llvm-svn: 204190
Diffstat (limited to 'llvm/tools/macho-dump/macho-dump.cpp')
-rw-r--r--llvm/tools/macho-dump/macho-dump.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/tools/macho-dump/macho-dump.cpp b/llvm/tools/macho-dump/macho-dump.cpp
index beeef5b1767..886487bfb43 100644
--- a/llvm/tools/macho-dump/macho-dump.cpp
+++ b/llvm/tools/macho-dump/macho-dump.cpp
@@ -319,6 +319,15 @@ DumpLinkerOptionsCommand(const MachOObjectFile &Obj,
return 0;
}
+static int
+DumpVersionMin(const MachOObjectFile &Obj,
+ const MachOObjectFile::LoadCommandInfo &LCI) {
+ MachO::version_min_command VMLC = Obj.getVersionMinLoadCommand(LCI);
+ outs() << " ('version, " << VMLC.version << ")\n"
+ << " ('reserved, " << VMLC.reserved << ")\n";
+ return 0;
+}
+
static int DumpLoadCommand(const MachOObjectFile &Obj,
MachOObjectFile::LoadCommandInfo &LCI) {
switch (LCI.C.cmd) {
@@ -338,6 +347,9 @@ static int DumpLoadCommand(const MachOObjectFile &Obj,
return DumpDataInCodeDataCommand(Obj, LCI);
case MachO::LC_LINKER_OPTIONS:
return DumpLinkerOptionsCommand(Obj, LCI);
+ case MachO::LC_VERSION_MIN_IPHONEOS:
+ case MachO::LC_VERSION_MIN_MACOSX:
+ return DumpVersionMin(Obj, LCI);
default:
Warning("unknown load command: " + Twine(LCI.C.cmd));
return 0;
OpenPOWER on IntegriCloud