[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / reloc-x64.test
blob1f91b736b0991355bcfb56b4454663d59845cdea
1 # REQUIRES: x86
2 # RUN: yaml2obj %s -o %t.obj
3 # RUN: lld-link /out:%t.exe /entry:main %t.obj
4 # RUN: llvm-objdump -d %t.exe | FileCheck %s
6 # CHECK: .text:
7 # CHECK: 1000: a1 03 20 00 40 00 00 00 00
8 # CHECK: 1009: a1 03 20 00 40 01 00 00 00
9 # CHECK: 1012: a1 03 20 00 00 00 00 00 00
10 # CHECK: 101b: a1 e3 0f 00 00 00 00 00 00
11 # CHECK: 1024: a1 d9 0f 00 00 00 00 00 00
12 # CHECK: 102d: a1 cf 0f 00 00 00 00 00 00
13 # CHECK: 1036: a1 c5 0f 00 00 00 00 00 00
14 # CHECK: 103f: a1 bb 0f 00 00 00 00 00 00
15 # CHECK: 1048: a1 b1 0f 00 00 00 00 00 00
16 # CHECK: 1051: a1 02 00 00 00 00 00 00 00
17 # CHECK: 105a: a1 03 00 00 00 00 00 00 00
19 --- !COFF
20 header:
21   Machine:         IMAGE_FILE_MACHINE_AMD64
22   Characteristics: []
23 sections:
24   - Name:            .text
25     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
26     Alignment:       4096
27     SectionData:     A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000
28     Relocations:
29       - VirtualAddress:  1
30         SymbolName:      foo
31         Type:            IMAGE_REL_AMD64_ADDR32
32       - VirtualAddress:  10
33         SymbolName:      foo
34         Type:            IMAGE_REL_AMD64_ADDR64
35       - VirtualAddress:  19
36         SymbolName:      foo
37         Type:            IMAGE_REL_AMD64_ADDR32NB
38       - VirtualAddress:  28
39         SymbolName:      foo
40         Type:            IMAGE_REL_AMD64_REL32
41       - VirtualAddress:  37
42         SymbolName:      foo
43         Type:            IMAGE_REL_AMD64_REL32_1
44       - VirtualAddress:  46
45         SymbolName:      foo
46         Type:            IMAGE_REL_AMD64_REL32_2
47       - VirtualAddress:  55
48         SymbolName:      foo
49         Type:            IMAGE_REL_AMD64_REL32_3
50       - VirtualAddress:  64
51         SymbolName:      foo
52         Type:            IMAGE_REL_AMD64_REL32_4
53       - VirtualAddress:  73
54         SymbolName:      foo
55         Type:            IMAGE_REL_AMD64_REL32_5
56       - VirtualAddress:  82
57         SymbolName:      foo
58         Type:            IMAGE_REL_AMD64_SECTION
59       - VirtualAddress:  91
60         SymbolName:      foo
61         Type:            IMAGE_REL_AMD64_SECREL
62   - Name:            .zzz
63     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
64     Alignment:       4096
65     SectionData:     0000000000000000
66 symbols:
67   - Name:            .text
68     Value:           0
69     SectionNumber:   1
70     SimpleType:      IMAGE_SYM_TYPE_NULL
71     ComplexType:     IMAGE_SYM_DTYPE_NULL
72     StorageClass:    IMAGE_SYM_CLASS_STATIC
73     SectionDefinition:
74       Length:          6
75       NumberOfRelocations: 0
76       NumberOfLinenumbers: 0
77       CheckSum:        0
78       Number:          0
79   - Name:            .zzz
80     Value:           0
81     SectionNumber:   2
82     SimpleType:      IMAGE_SYM_TYPE_NULL
83     ComplexType:     IMAGE_SYM_DTYPE_NULL
84     StorageClass:    IMAGE_SYM_CLASS_STATIC
85     SectionDefinition:
86       Length:          8
87       NumberOfRelocations: 0
88       NumberOfLinenumbers: 0
89       CheckSum:        0
90       Number:          0
91   - Name:            main
92     Value:           0
93     SectionNumber:   1
94     SimpleType:      IMAGE_SYM_TYPE_NULL
95     ComplexType:     IMAGE_SYM_DTYPE_NULL
96     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
97   - Name:            foo
98     Value:           3
99     SectionNumber:   2
100     SimpleType:      IMAGE_SYM_TYPE_NULL
101     ComplexType:     IMAGE_SYM_DTYPE_NULL
102     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL