[SelectionDAG] Don't inspect !range metadata for extended loads
[oota-llvm.git] / test / Object / macho-invalid.test
1 // No crash, might not be totally invalid
2 RUN: llvm-objdump -private-headers %p/Inputs/macho-invalid-zero-ncmds
3
4 RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-incomplete-load-command 2>&1 \
5 RUN:      | FileCheck -check-prefix INCOMPLETE-LOADC %s
6 INCOMPLETE-LOADC: Invalid data was encountered while parsing the file.
7
8 RUN: not llvm-objdump -private-headers %p/Inputs/macho-invalid-too-small-load-command 2>&1 \
9 RUN:      | FileCheck -check-prefix SMALL-LOADC-SIZE %s
10 RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-too-small-load-command 2>&1 \
11 RUN:      | FileCheck -check-prefix SMALL-LOADC-SIZE %s
12 SMALL-LOADC-SIZE: Mach-O load command with size < 8 bytes
13
14 RUN: not llvm-objdump -private-headers %p/Inputs/macho-invalid-too-small-segment-load-command 2>&1 \
15 RUN:      | FileCheck -check-prefix SMALL-SEGLOADC-SIZE %s
16 RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-too-small-segment-load-command 2>&1 \
17 RUN:      | FileCheck -check-prefix SMALL-SEGLOADC-SIZE %s
18 SMALL-SEGLOADC-SIZE: Mach-O segment load command size is too small
19
20 RUN: not llvm-objdump -private-headers %p/Inputs/macho-invalid-no-size-for-sections 2>&1 \
21 RUN:      | FileCheck -check-prefix TOO-MANY-SECTS %s
22 RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-no-size-for-sections 2>&1 \
23 RUN:      | FileCheck -check-prefix TOO-MANY-SECTS %s
24 TOO-MANY-SECTS: Mach-O segment load command contains too many sections
25
26 RUN: not llvm-objdump -t %p/Inputs/macho-invalid-bad-symbol-index 2>&1 \
27 RUN:      | FileCheck -check-prefix BAD-SYMBOL %s
28 BAD-SYMBOL: Requested symbol index is out of range
29
30 RUN: not llvm-objdump -t %p/Inputs/macho-invalid-symbol-name-past-eof 2>&1 \
31 RUN:      | FileCheck -check-prefix NAME-PAST-EOF %s
32 NAME-PAST-EOF: Symbol name entry points before beginning or past end of file
33
34 RUN: not llvm-nm %p/Inputs/macho-invalid-section-index-getSectionRawName 2>&1 \
35 RUN:      | FileCheck -check-prefix INVALID-SECTION-IDX-SYMBOL-SEC %s
36 INVALID-SECTION-IDX-SYMBOL-SEC: getSymbolSection: Invalid section index
37
38 RUN: not llvm-objdump -private-headers %p/Inputs/macho-invalid-header 2>&1 | FileCheck -check-prefix INVALID-HEADER %s
39 INVALID-HEADER: Invalid data was encountered while parsing the file
40
41 RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-incomplete-segment-load-command 2>&1 | FileCheck -check-prefix INCOMPLETE-SEGMENT-LOADC %s
42 INCOMPLETE-SEGMENT-LOADC: Invalid data was encountered while parsing the file