[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / tools / yaml2obj / COFF / xrelocs.yaml
blobfbc22a1e99caed172f36aa8e9fd8174cc9d776e1
1 ## This test checks that yaml2obj correctly handles COFF sections with
2 ## extended relocation tables (IMAGE_SCN_LNK_NRELOC_OVFL).
3 # RUN: yaml2obj %s -o %t
4 # RUN: llvm-readobj --sections --relocations %t | FileCheck %s --check-prefix=CHECK-OBJ
5 # RUN: obj2yaml %t | FileCheck %s --check-prefix=CHECK-YAML
7 # CHECK-OBJ:      Sections [
8 # CHECK-OBJ-NEXT:   Section {
9 # CHECK-OBJ-NEXT:     Number: 1
10 # CHECK-OBJ-NEXT:     Name: .data
11 # CHECK-OBJ:          RawDataSize: 16
12 # CHECK-OBJ:          RelocationCount: 65535
13 # CHECK-OBJ:          Characteristics [
14 # CHECK-OBJ-NEXT:       IMAGE_SCN_ALIGN_16BYTES
15 # CHECK-OBJ-NEXT:       IMAGE_SCN_CNT_INITIALIZED_DATA
16 # CHECK-OBJ-NEXT:       IMAGE_SCN_LNK_NRELOC_OVFL
17 # CHECK-OBJ-NEXT:       IMAGE_SCN_MEM_READ
18 # CHECK-OBJ-NEXT:     ]
19 # CHECK-OBJ-NEXT:   }
20 # CHECK-OBJ-NEXT: ]
21 # CHECK-OBJ-NEXT: Relocations [
22 # CHECK-OBJ-NEXT:   Section (1) .data {
23 # CHECK-OBJ-NEXT:     0x0 IMAGE_REL_AMD64_ADDR64 foo (0)
24 # CHECK-OBJ-NEXT:     0x8 IMAGE_REL_AMD64_ADDR64 bar (1)
25 # CHECK-OBJ-NEXT:   }
26 # CHECK-OBJ-NEXT: ]
28 # CHECK-YAML:      sections:
29 # CHECK-YAML-NEXT:   - Name:            .data
30 # CHECK-YAML-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_NRELOC_OVFL, IMAGE_SCN_MEM_READ ]
31 # CHECK-YAML-NEXT:     Alignment:       16
32 # CHECK-YAML-NEXT:     SectionData:     '00000000000000000000000000000000'
33 # CHECK-YAML-NEXT:     Relocations:
34 # CHECK-YAML-NEXT:       - VirtualAddress:  0
35 # CHECK-YAML-NEXT:         SymbolName:      foo
36 # CHECK-YAML-NEXT:         Type:            IMAGE_REL_AMD64_ADDR64
37 # CHECK-YAML-NEXT:       - VirtualAddress:  8
38 # CHECK-YAML-NEXT:         SymbolName:      bar
39 # CHECK-YAML-NEXT:         Type:            IMAGE_REL_AMD64_ADDR64
40 # CHECK-YAML-NEXT: symbols:
42 --- !COFF
43 header:
44   Machine:         IMAGE_FILE_MACHINE_AMD64
45   Characteristics: [  ]
46 sections:
47   - Name:            .data
48     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_NRELOC_OVFL, IMAGE_SCN_MEM_READ ]
49     Alignment:       16
50     SectionData:     '00000000000000000000000000000000'
51     Relocations:
52       - VirtualAddress:  0
53         SymbolName:      foo
54         Type:            IMAGE_REL_AMD64_ADDR64
55       - VirtualAddress:  8
56         SymbolName:      bar
57         Type:            IMAGE_REL_AMD64_ADDR64
58 symbols:
59   - Name:            foo
60     Value:           0
61     SectionNumber:   0
62     SimpleType:      IMAGE_SYM_TYPE_NULL
63     ComplexType:     IMAGE_SYM_DTYPE_NULL
64     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
65   - Name:            bar
66     Value:           0
67     SectionNumber:   0
68     SimpleType:      IMAGE_SYM_TYPE_NULL
69     ComplexType:     IMAGE_SYM_DTYPE_NULL
70     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
71 ...