llvm-project
103 строки · 3.5 Кб
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
5
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
18
19--- !COFF
20header:
21Machine: IMAGE_FILE_MACHINE_AMD64
22Characteristics: []
23sections:
24- Name: .text
25Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
26Alignment: 4096
27SectionData: A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000A10000000000000000
28Relocations:
29- VirtualAddress: 1
30SymbolName: foo
31Type: IMAGE_REL_AMD64_ADDR32
32- VirtualAddress: 10
33SymbolName: foo
34Type: IMAGE_REL_AMD64_ADDR64
35- VirtualAddress: 19
36SymbolName: foo
37Type: IMAGE_REL_AMD64_ADDR32NB
38- VirtualAddress: 28
39SymbolName: foo
40Type: IMAGE_REL_AMD64_REL32
41- VirtualAddress: 37
42SymbolName: foo
43Type: IMAGE_REL_AMD64_REL32_1
44- VirtualAddress: 46
45SymbolName: foo
46Type: IMAGE_REL_AMD64_REL32_2
47- VirtualAddress: 55
48SymbolName: foo
49Type: IMAGE_REL_AMD64_REL32_3
50- VirtualAddress: 64
51SymbolName: foo
52Type: IMAGE_REL_AMD64_REL32_4
53- VirtualAddress: 73
54SymbolName: foo
55Type: IMAGE_REL_AMD64_REL32_5
56- VirtualAddress: 82
57SymbolName: foo
58Type: IMAGE_REL_AMD64_SECTION
59- VirtualAddress: 91
60SymbolName: foo
61Type: IMAGE_REL_AMD64_SECREL
62- Name: .zzz
63Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
64Alignment: 4096
65SectionData: 0000000000000000
66symbols:
67- Name: .text
68Value: 0
69SectionNumber: 1
70SimpleType: IMAGE_SYM_TYPE_NULL
71ComplexType: IMAGE_SYM_DTYPE_NULL
72StorageClass: IMAGE_SYM_CLASS_STATIC
73SectionDefinition:
74Length: 6
75NumberOfRelocations: 0
76NumberOfLinenumbers: 0
77CheckSum: 0
78Number: 0
79- Name: .zzz
80Value: 0
81SectionNumber: 2
82SimpleType: IMAGE_SYM_TYPE_NULL
83ComplexType: IMAGE_SYM_DTYPE_NULL
84StorageClass: IMAGE_SYM_CLASS_STATIC
85SectionDefinition:
86Length: 8
87NumberOfRelocations: 0
88NumberOfLinenumbers: 0
89CheckSum: 0
90Number: 0
91- Name: main
92Value: 0
93SectionNumber: 1
94SimpleType: IMAGE_SYM_TYPE_NULL
95ComplexType: IMAGE_SYM_DTYPE_NULL
96StorageClass: IMAGE_SYM_CLASS_EXTERNAL
97- Name: foo
98Value: 3
99SectionNumber: 2
100SimpleType: IMAGE_SYM_TYPE_NULL
101ComplexType: IMAGE_SYM_DTYPE_NULL
102StorageClass: IMAGE_SYM_CLASS_EXTERNAL
103...
104