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