xref: /llvm-project/llvm/test/tools/llvm-objdump/MachO/relocations.test (revision 1a3f88658a02be6be5224fca9d9123b79958f289)
1RUN: llvm-objdump --macho -r %p/Inputs/hello.obj.macho-x86_64 | \
2RUN:     FileCheck --check-prefix=VERBOSE %s
3RUN: llvm-otool -rv %p/Inputs/hello.obj.macho-x86_64 | \
4RUN:     FileCheck --check-prefix=VERBOSE %s
5RUN: llvm-objdump --macho -r --non-verbose %p/Inputs/hello.obj.macho-x86_64 | \
6RUN:     FileCheck --check-prefix=NONVERBOSE %s
7RUN: llvm-otool -r %p/Inputs/hello.obj.macho-x86_64 | \
8RUN:     FileCheck --check-prefix=NONVERBOSE %s
9
10VERBOSE:      Relocation information (__TEXT,__text) 2 entries
11VERBOSE-NEXT: address  pcrel length extern type    scattered symbolnum/value
12VERBOSE-NEXT: 00000027 True  long   True   BRANCH  False     _printf
13VERBOSE-NEXT: 0000000b True  long   True   SIGNED  False     L_.str
14VERBOSE-NEXT: Relocation information (__LD,__compact_unwind) 1 entries
15VERBOSE-NEXT: address  pcrel length extern type    scattered symbolnum/value
16VERBOSE-NEXT: 00000000 False quad   False  UNSIGND False     1 (__TEXT,__text)
17
18NONVERBOSE:      Relocation information (__TEXT,__text) 2 entries
19NONVERBOSE-NEXT: address  pcrel length extern type    scattered symbolnum/value
20NONVERBOSE-NEXT: 00000027 1     2      1      2       0         4
21NONVERBOSE-NEXT: 0000000b 1     2      1      1       0         0
22NONVERBOSE-NEXT: Relocation information (__LD,__compact_unwind) 1 entries
23NONVERBOSE-NEXT: address  pcrel length extern type    scattered symbolnum/value
24NONVERBOSE-NEXT: 00000000 0     3      0      0       0         1
25