1 ## Test how relocations are dumped.
3 # RUN: yaml2obj %s -o %t
4 # RUN: llvm-readobj --relocs --expand-relocs %t | \
5 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=RELOCSEXP
6 # RUN: llvm-readobj --relocs %t | \
7 # RUN: FileCheck %s --strict-whitespace --match-full-lines --check-prefix=RELOCS
9 # RELOCSEXP:Relocations [
10 # RELOCSEXP-NEXT: Section (index: 1) .text {
11 # RELOCSEXP-NEXT: Relocation {
12 # RELOCSEXP-NEXT: Virtual Address: 0x80
13 # RELOCSEXP-NEXT: Symbol: foo (0)
14 # RELOCSEXP-NEXT: IsSigned: No
15 # RELOCSEXP-NEXT: FixupBitValue: 0
16 # RELOCSEXP-NEXT: Length: 22
17 # RELOCSEXP-NEXT: Type: R_POS (0x0)
19 # RELOCSEXP-NEXT: Relocation {
20 # RELOCSEXP-NEXT: Virtual Address: 0x100
21 # RELOCSEXP-NEXT: Symbol: foo (0)
22 # RELOCSEXP-NEXT: IsSigned: No
23 # RELOCSEXP-NEXT: FixupBitValue: 0
24 # RELOCSEXP-NEXT: Length: 21
25 # RELOCSEXP-NEXT: Type: R_REL (0x2)
28 # RELOCSEXP-NEXT: Section (index: 2) .data {
29 # RELOCSEXP-NEXT: Relocation {
30 # RELOCSEXP-NEXT: Virtual Address: 0x200
31 # RELOCSEXP-NEXT: Symbol: bar (1)
32 # RELOCSEXP-NEXT: IsSigned: No
33 # RELOCSEXP-NEXT: FixupBitValue: 0
34 # RELOCSEXP-NEXT: Length: 20
35 # RELOCSEXP-NEXT: Type: R_TOC (0x3)
40 # RELOCS:Relocations [
41 # RELOCS-NEXT: Section (index: 1) .text {
42 # RELOCS-NEXT: 0x80 R_POS foo(0) 0x15
43 # RELOCS-NEXT: 0x100 R_REL foo(0) 0x14
45 # RELOCS-NEXT: Section (index: 2) .data {
46 # RELOCS-NEXT: 0x200 R_TOC bar(1) 0x13