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 --check-prefixes=RELOCSEXP,NODEMANEXP
6 # RUN: llvm-readobj --relocs %t | \
7 # RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,NODEMAN
9 # RUN: llvm-readobj --relocs --expand-relocs --no-demangle %t | \
10 # RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCSEXP,NODEMANEXP
11 # RUN: llvm-readobj --relocs --no-demangle %t | \
12 # RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,NODEMAN
14 # RUN: llvm-readobj --relocs --expand-relocs --demangle %t | \
15 # RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCSEXP,DEMANEXP
16 # RUN: llvm-readobj --relocs --demangle %t | \
17 # RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,DEMAN
19 # RELOCSEXP:Relocations [
20 # RELOCSEXP-NEXT: Section (index: 1) .text {
21 # RELOCSEXP-NEXT: Relocation {
22 # RELOCSEXP-NEXT: Virtual Address: 0x80
23 # RELOCSEXP-NEXT: Symbol: foo (0)
24 # RELOCSEXP-NEXT: IsSigned: No
25 # RELOCSEXP-NEXT: FixupBitValue: 0
26 # RELOCSEXP-NEXT: Length: 22
27 # RELOCSEXP-NEXT: Type: R_POS (0x0)
29 # RELOCSEXP-NEXT: Relocation {
30 # RELOCSEXP-NEXT: Virtual Address: 0x100
31 # RELOCSEXP-NEXT: Symbol: foo (0)
32 # RELOCSEXP-NEXT: IsSigned: No
33 # RELOCSEXP-NEXT: FixupBitValue: 0
34 # RELOCSEXP-NEXT: Length: 21
35 # RELOCSEXP-NEXT: Type: R_REL (0x2)
38 # RELOCSEXP-NEXT: Section (index: 2) .data {
39 # RELOCSEXP-NEXT: Relocation {
40 # RELOCSEXP-NEXT: Virtual Address: 0x200
41 # NODEMANEXP-NEXT: Symbol: _Z3fwpv (1)
42 # DEMANEXP-NEXT: Symbol: fwp() (1)
43 # RELOCSEXP-NEXT: IsSigned: No
44 # RELOCSEXP-NEXT: FixupBitValue: 0
45 # RELOCSEXP-NEXT: Length: 20
46 # RELOCSEXP-NEXT: Type: R_TOC (0x3)
51 # RELOCS:Relocations [
52 # RELOCS-NEXT: Section (index: 1) .text {
53 # RELOCS-NEXT: 0x80 R_POS foo(0) 0x15
54 # RELOCS-NEXT: 0x100 R_REL foo(0) 0x14
56 # RELOCS-NEXT: Section (index: 2) .data {
57 # NODEMAN-NEXT: 0x200 R_TOC _Z3fwpv(1) 0x13
58 # DEMAN-NEXT: 0x200 R_TOC fwp()(1) 0x13