1RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-dylib-ordinal-uleb 2>&1 | FileCheck --check-prefix DYLIB-ORDINAL-ULEB %s
2DYLIB-ORDINAL-ULEB: macho-bind-dylib-ordinal-uleb': truncated or malformed object (for BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB bad library ordinal: 355 (max 1) for opcode at: 0x0)
3
4RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-dylib-ordinal-uleb-malformed-uleb128 2>&1 | FileCheck --check-prefix DYLIB-ORDINAL-ULEB-MALFORMED-ULEB128 %s
5DYLIB-ORDINAL-ULEB-MALFORMED-ULEB128: macho-bind-dylib-ordinal-uleb-malformed-uleb128': truncated or malformed object (for BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB malformed uleb128, extends past end for opcode at: 0x0)
6
7RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-dylib-ordinal-uleb-too-big 2>&1 | FileCheck --check-prefix DYLIB-ORDINAL-ULEB-TOO-BIG %s
8DYLIB-ORDINAL-ULEB-TOO-BIG: macho-bind-dylib-ordinal-uleb-too-big': truncated or malformed object (for BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB uleb128 too big for uint64 for opcode at: 0x0)
9
10RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-dylib-special-imm 2>&1 | FileCheck --check-prefix DYLIB-SPECIAL-IMM %s
11DYLIB-SPECIAL-IMM: macho-bind-dylib-special-imm': truncated or malformed object (for BIND_OPCODE_SET_DYLIB_SPECIAL_IMM unknown special ordinal: -5 for opcode at: 0x0)
12
13RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-set-symbol 2>&1 | FileCheck --check-prefix BIND-SET-SYMBOL %s
14BIND-SET-SYMBOL: macho-bind-set-symbol': truncated or malformed object (for BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM symbol name extends past opcodes for opcode at: 0x2)
15
16RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-set-type-imm 2>&1 | FileCheck --check-prefix SET-TYPE-IMM %s
17SET-TYPE-IMM: macho-bind-set-type-imm': truncated or malformed object (for BIND_OPCODE_SET_TYPE_IMM bad bind type: 5 for opcode at: 0x14)
18
19RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-set-addend-sleb 2>&1 | FileCheck --check-prefix SET-ADDEND-SLEB %s
20SET-ADDEND-SLEB: macho-bind-set-addend-sleb': truncated or malformed object (for BIND_OPCODE_SET_ADDEND_SLEB malformed sleb128, extends past end for opcode at: 0x14)
21
22RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-seg-too-big 2>&1 | FileCheck --check-prefix SEG-TOO-BIG %s
23SEG-TOO-BIG: macho-bind-seg-too-big': truncated or malformed object (for BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB bad segIndex (too large) for opcode at: 0x15)
24
25RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-segoff-too-big 2>&1 | FileCheck --check-prefix SEGOFF-TOO-BIG %s
26SEGOFF-TOO-BIG: macho-bind-segoff-too-big': truncated or malformed object (for BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB bad offset, not in section for opcode at: 0x15)
27
28RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-add_addr_uleb 2>&1 | FileCheck --check-prefix ADD_ADDR_ULEB %s
29ADD_ADDR_ULEB: macho-bind-add_addr_uleb': truncated or malformed object (for BIND_OPCODE_ADD_ADDR_ULEB bad offset, not in section for opcode at: 0x17)
30
31RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-do-bind-no-segIndex 2>&1 | FileCheck --check-prefix BIND-NO-SEGINDEX %s
32BIND-NO-SEGINDEX: macho-bind-do-bind-no-segIndex': truncated or malformed object (for BIND_OPCODE_DO_BIND missing preceding *_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB for opcode at: 0x15)
33
34RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-bind-add-addr-uleb 2>&1 | FileCheck --check-prefix ADD-ADDR-ULEB %s
35ADD-ADDR-ULEB: macho-bind-bind-add-addr-uleb': truncated or malformed object (for BIND_OPCODE_ADD_ADDR_ULEB (after adding ULEB) bad offset, not in section for opcode at: 0x18)
36
37RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-add-addr-imm-scaled 2>&1 | FileCheck --check-prefix ADD-ADDR-IMM-SCALED %s
38ADD-ADDR-IMM-SCALED: macho-bind-add-addr-imm-scaled': truncated or malformed object (for BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED bad offset, not in section for opcode at: 0x17)
39
40RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-uleb-times-skipping-uleb 2>&1 | FileCheck --check-prefix ULEB-TIMES-SKIPPING-ULEB %s
41ULEB-TIMES-SKIPPING-ULEB: macho-bind-uleb-times-skipping-uleb': truncated or malformed object (for BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB bad offset, not in section for opcode at: 0x17)
42
43RUN: not llvm-objdump --macho --bind %p/Inputs/macho-do-bind-no-symbol 2>&1 | FileCheck --check-prefix DO-BIND-NO-SYMBOL %s
44DO-BIND-NO-SYMBOL: macho-do-bind-no-symbol': truncated or malformed object (for BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB missing preceding BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM for opcode at: 0x5)
45
46RUN: not llvm-objdump --macho --bind %p/Inputs/macho-do-bind-no-dylib-ordinal 2>&1 | FileCheck --check-prefix DO-BIND-NO-DYLIB-ORDINAL %s
47DO-BIND-NO-DYLIB-ORDINAL: macho-do-bind-no-dylib-ordinal': truncated or malformed object (for BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB missing preceding BIND_OPCODE_SET_DYLIB_ORDINAL_* for opcode at: 0x15)
48
49RUN: not llvm-objdump --macho --bind %p/Inputs/macho-bind-bad-opcode-value 2>&1 | FileCheck --check-prefix BAD-OPCODE-VALUE %s
50BAD-OPCODE-VALUE: macho-bind-bad-opcode-value': truncated or malformed object (bad bind info (bad opcode value 0xd0 for opcode at: 0x18)
51
52RUN: not llvm-objdump --macho --lazy-bind %p/Inputs/macho-lazy-do_bind_add_addr_uleb 2>&1 | FileCheck --check-prefix LAZY_DO_BIND_ADD_ADDR_ULEB %s
53LAZY_DO_BIND_ADD_ADDR_ULEB: macho-lazy-do_bind_add_addr_uleb': truncated or malformed object (BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB not allowed in lazy bind table for opcode at: 0xc)
54
55RUN: not llvm-objdump --macho --lazy-bind %p/Inputs/macho-lazy-do-bind-add-addr-imm-scaled 2>&1 | FileCheck --check-prefix LAZY-DO-BIND-ADD-ADDR-IMM-SCALED %s
56LAZY-DO-BIND-ADD-ADDR-IMM-SCALED: macho-lazy-do-bind-add-addr-imm-scaled': truncated or malformed object (BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED not allowed in lazy bind table for opcode at: 0xc)
57
58RUN: not llvm-objdump --macho --lazy-bind %p/Inputs/macho-lazy-do-bind-uleb-times-skipping-uleb 2>&1 | FileCheck --check-prefix LAZY-DO-BIND-ULEB-TIMES-SKIPPING-ULEB %s
59LAZY-DO-BIND-ULEB-TIMES-SKIPPING-ULEB: macho-lazy-do-bind-uleb-times-skipping-uleb': truncated or malformed object (BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB not allowed in lazy bind table for opcode at: 0xc)
60
61RUN: not llvm-objdump --macho --weak-bind %p/Inputs/macho-weak-bind-set-dylib-ordinal-imm 2>&1 | FileCheck --check-prefix WEAK-BIND-SET-DYLIB-ORDINAL-IMM %s
62WEAK-BIND-SET-DYLIB-ORDINAL-IMM: macho-weak-bind-set-dylib-ordinal-imm': truncated or malformed object (BIND_OPCODE_SET_DYLIB_ORDINAL_IMM not allowed in weak bind table for opcode at: 0x2)
63
64RUN: not llvm-objdump --macho --weak-bind %p/Inputs/macho-weak-bind-set-dylib-ordinal-uleb 2>&1 | FileCheck --check-prefix WEAK-BIND-SET-DYLIB-ORDINAL-ULEB %s
65WEAK-BIND-SET-DYLIB-ORDINAL-ULEB: macho-weak-bind-set-dylib-ordinal-uleb': truncated or malformed object (BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB not allowed in weak bind table for opcode at: 0x2)
66
67RUN: not llvm-objdump --macho --weak-bind %p/Inputs/macho-weak-bind-set-dylib-special-imm 2>&1 | FileCheck --check-prefix WEAK-BIND-SET-DYLIB-SPECIAL-IMM %s
68WEAK-BIND-SET-DYLIB-SPECIAL-IMM: macho-weak-bind-set-dylib-special-imm': truncated or malformed object (BIND_OPCODE_SET_DYLIB_SPECIAL_IMM not allowed in weak bind table for opcode at: 0x2)
69
70RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-set-type-imm 2>&1 | FileCheck --check-prefix REBASE-SET-TYPE-IMM %s
71REBASE-SET-TYPE-IMM: macho-rebase-set-type-imm': truncated or malformed object (for REBASE_OPCODE_SET_TYPE_IMM bad bind type: 5 for opcode at: 0x0)
72
73RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-uleb-malformed-uleb128 2>&1 | FileCheck --check-prefix REBASE-ULEB-MALFORMED-ULEB128 %s
74REBASE-ULEB-MALFORMED-ULEB128: macho-rebase-uleb-malformed-uleb128': truncated or malformed object (for REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB malformed uleb128, extends past end for opcode at: 0x1)
75
76RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-seg-too-big 2>&1 | FileCheck --check-prefix REBASE-SEG-TOO-BIG %s
77REBASE-SEG-TOO-BIG: macho-rebase-seg-too-big': truncated or malformed object (for REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB bad segIndex (too large) for opcode at: 0x1)
78
79RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-segoff-too-big 2>&1 | FileCheck --check-prefix REBASE-SEGOFF-TOO-BIG %s
80REBASE-SEGOFF-TOO-BIG: macho-rebase-segoff-too-big': truncated or malformed object (for REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB bad offset, not in section for opcode at: 0x1)
81
82RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-add-addr-uleb 2>&1 | FileCheck --check-prefix REBASE-ADD-ADDR-ULEB %s
83REBASE-ADD-ADDR-ULEB: macho-rebase-add-addr-uleb': truncated or malformed object (for REBASE_OPCODE_ADD_ADDR_ULEB bad offset, not in section for opcode at: 0x3)
84
85RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-add-addr-imm-scaled 2>&1 | FileCheck --check-prefix REBASE-ADD-ADDR-IMM-SCALED %s
86REBASE-ADD-ADDR-IMM-SCALED: macho-rebase-add-addr-imm-scaled': truncated or malformed object (for REBASE_OPCODE_ADD_ADDR_IMM_SCALED bad offset, not in section for opcode at: 0x3)
87
88RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-imm-times 2>&1 | FileCheck --check-prefix REBASE-IMM-TIMES %s
89REBASE-IMM-TIMES: macho-rebase-imm-times': truncated or malformed object (for REBASE_OPCODE_DO_REBASE_IMM_TIMES bad offset, not in section for opcode at: 0x3)
90
91RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-uleb-times 2>&1 | FileCheck --check-prefix REBASE-ULEB-TIMES %s
92REBASE-ULEB-TIMES: macho-rebase-uleb-times': truncated or malformed object (for REBASE_OPCODE_DO_REBASE_ULEB_TIMES bad offset, not in section for opcode at: 0x3)
93
94RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-add-addr-uleb-too-big 2>&1 | FileCheck --check-prefix REBASE-ADD-ADDR-ULEB-TOO-BIG %s
95REBASE-ADD-ADDR-ULEB-TOO-BIG: macho-rebase-add-addr-uleb-too-big': truncated or malformed object (for REBASE_OPCODE_DO_REBASE_IMM_TIMES bad offset, not in section for opcode at: 0x6)
96
97RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-uleb-times-skipping-uleb 2>&1 | FileCheck --check-prefix REBASE-ULEB-TIMES-SKIPPING-ULEB %s
98REBASE-ULEB-TIMES-SKIPPING-ULEB: macho-rebase-uleb-times-skipping-uleb': truncated or malformed object (for REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB bad offset, not in section for opcode at: 0x3)
99
100RUN: not llvm-objdump --macho --rebase %p/Inputs/macho-rebase-bad-opcode-value 2>&1 | FileCheck --check-prefix REBASE-BAD-OPCODE-VALUE %s
101REBASE-BAD-OPCODE-VALUE: macho-rebase-bad-opcode-value': truncated or malformed object (bad rebase info (bad opcode value 0xd0 for opcode at: 0x4)
102