diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 19:58:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 19:58:01 +0000 |
commit | 050e163ae8b4bb6eb252b59e2f8f36e68ae9239d (patch) | |
tree | 7376a0c71aad05d327e5b1dcbceb3311a10f9f29 /test/tools/llvm-objdump | |
parent | 8a6c1c25bce0267ee4072bd7b786b921e8a66a35 (diff) |
Notes
Diffstat (limited to 'test/tools/llvm-objdump')
-rw-r--r-- | test/tools/llvm-objdump/Inputs/malformed-macho.bin | bin | 0 -> 843 bytes | |||
-rw-r--r-- | test/tools/llvm-objdump/X86/macho-private-header.test | 6 | ||||
-rw-r--r-- | test/tools/llvm-objdump/malformed-archives.test | 2 | ||||
-rw-r--r-- | test/tools/llvm-objdump/malformed-macho.test | 2 |
4 files changed, 9 insertions, 1 deletions
diff --git a/test/tools/llvm-objdump/Inputs/malformed-macho.bin b/test/tools/llvm-objdump/Inputs/malformed-macho.bin Binary files differnew file mode 100644 index 0000000000000..b8a3f153a8964 --- /dev/null +++ b/test/tools/llvm-objdump/Inputs/malformed-macho.bin diff --git a/test/tools/llvm-objdump/X86/macho-private-header.test b/test/tools/llvm-objdump/X86/macho-private-header.test new file mode 100644 index 0000000000000..d90072542a2e8 --- /dev/null +++ b/test/tools/llvm-objdump/X86/macho-private-header.test @@ -0,0 +1,6 @@ +// RUN: llvm-objdump -private-header %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s + +CHECK: Mach header +CHECK: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags +CHECK: MH_MAGIC_64 X86_64 ALL 0x00 OBJECT 3 496 SUBSECTIONS_VIA_SYMBOLS +CHECK-NOT: Load command diff --git a/test/tools/llvm-objdump/malformed-archives.test b/test/tools/llvm-objdump/malformed-archives.test index e0f165d37ed7c..c477022e2e11a 100644 --- a/test/tools/llvm-objdump/malformed-archives.test +++ b/test/tools/llvm-objdump/malformed-archives.test @@ -1,7 +1,7 @@ // These test checks that llvm-objdump will not crash with malformed Archive // files. So the check line is not all that important but the bug fixes to // make sure llvm-objdump is robust is what matters. -# RUN: llvm-objdump -macho -archive-headers \ +# RUN: not llvm-objdump -macho -archive-headers \ # RUN: %p/Inputs/libbogus1.a \ # RUN: 2>&1 | FileCheck -check-prefix=bogus1 %s diff --git a/test/tools/llvm-objdump/malformed-macho.test b/test/tools/llvm-objdump/malformed-macho.test new file mode 100644 index 0000000000000..e96945d91125b --- /dev/null +++ b/test/tools/llvm-objdump/malformed-macho.test @@ -0,0 +1,2 @@ +RUN: not llvm-objdump -macho -s %p/Inputs/malformed-macho.bin 2>&1 | FileCheck %s -check-prefix=MALFORMED +MALFORMED: '{{.*}}': The file was not recognized as a valid object file |