summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-01-26 18:20:49 +0000
committerKevin Enderby <enderby@apple.com>2016-01-26 18:20:49 +0000
commit40fdbf87d2ce315ce3b33fce03ff19a08e706171 (patch)
tree084f739e137241eb0a8e5a91f3b92b4bdd2fc2e6 /llvm/test/Object
parent9eed9a956f9ff0939bdf392de7be59ce168a8b17 (diff)
downloadbcm5719-llvm-40fdbf87d2ce315ce3b33fce03ff19a08e706171.tar.gz
bcm5719-llvm-40fdbf87d2ce315ce3b33fce03ff19a08e706171.zip
Update the comments for the macho-invalid-zero-ncmds test and fix
llvm-objdump when printing the Mach Header to print the unknown cputype and cpusubtype fields as decimal instead of not printing them at all. And change the test to check for that. llvm-svn: 258826
Diffstat (limited to 'llvm/test/Object')
-rw-r--r--llvm/test/Object/macho-invalid.test8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/test/Object/macho-invalid.test b/llvm/test/Object/macho-invalid.test
index 781c9367c1e..77a3944bdd6 100644
--- a/llvm/test/Object/macho-invalid.test
+++ b/llvm/test/Object/macho-invalid.test
@@ -1,5 +1,9 @@
-// No crash, might not be totally invalid
-RUN: llvm-objdump -private-headers %p/Inputs/macho-invalid-zero-ncmds
+// An odd Mach-O file, with just a mach header with all but the magic field
+// and filetype zeros. The cputype and cpusubtype fields being zero are invalid,
+// but that does not mater for the most part to display some of the contents.
+RUN: llvm-objdump -private-headers %p/Inputs/macho-invalid-zero-ncmds -macho \
+RUN: | FileCheck -check-prefix ZERO-NCMDS %s
+ZERO-NCMDS: MH_MAGIC_64 0 0 0x00 OBJECT 0 0 0x00000000
RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-incomplete-load-command 2>&1 \
RUN: | FileCheck -check-prefix INCOMPLETE-LOADC %s
OpenPOWER on IntegriCloud