1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=RELOCS
3 # RUN: obj2yaml %t | FileCheck %s --check-prefix=YAML
5 # RELOCS: Relocations [
6 # RELOCS-NEXT: Section (1) .text {
7 # RELOCS-NEXT: 0x3 IMAGE_REL_AMD64_REL32 .rdata (0)
8 # RELOCS-NEXT: 0xA IMAGE_REL_AMD64_REL32 .rdata (1)
9 # RELOCS-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (2)
13 # Check that we usually output relocations with SymbolName.
14 # For relocations with a non-unique symbol name, output
15 # SymbolTableIndex instead.
18 # YAML-NEXT: - VirtualAddress: 3
19 # YAML-NEXT: SymbolTableIndex: 0
20 # YAML-NEXT: Type: IMAGE_REL_AMD64_REL32
21 # YAML-NEXT: - VirtualAddress: 10
22 # YAML-NEXT: SymbolTableIndex: 1
23 # YAML-NEXT: Type: IMAGE_REL_AMD64_REL32
24 # YAML-NEXT: - VirtualAddress: 17
25 # YAML-NEXT: SymbolName: foo
26 # YAML-NEXT: Type: IMAGE_REL_AMD64_REL32
30 Machine: IMAGE_FILE_MACHINE_AMD64
36 SectionData: 488B0500000000488B0500000000488B0500000000
40 Type: IMAGE_REL_AMD64_REL32
43 Type: IMAGE_REL_AMD64_REL32
46 Type: IMAGE_REL_AMD64_REL32
59 SimpleType: IMAGE_SYM_TYPE_NULL
60 ComplexType: IMAGE_SYM_DTYPE_NULL
61 StorageClass: IMAGE_SYM_CLASS_STATIC
65 SimpleType: IMAGE_SYM_TYPE_NULL
66 ComplexType: IMAGE_SYM_DTYPE_NULL
67 StorageClass: IMAGE_SYM_CLASS_STATIC
71 SimpleType: IMAGE_SYM_TYPE_NULL
72 ComplexType: IMAGE_SYM_DTYPE_NULL
73 StorageClass: IMAGE_SYM_CLASS_EXTERNAL