1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link /debug:dwarf /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
3 # RUN: llvm-readobj --symbols %t.exe | FileCheck %s
4 # RUN: lld-link /debug:dwarf /opt:noref /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
5 # RUN: llvm-readobj --symbols %t.exe | FileCheck %s
6 # RUN: lld-link /debug:symtab /opt:noref /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
7 # RUN: llvm-readobj --symbols %t.exe | FileCheck %s
9 # RUN: lld-link /debug /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
10 # RUN: llvm-readobj --symbols %t.exe | FileCheck -check-prefix=NO %s
13 # CHECK-NEXT: Symbol {
14 # CHECK-NEXT: Name: .text
15 # CHECK-NEXT: Value: 0
16 # CHECK-NEXT: Section: .text (1)
17 # CHECK-NEXT: BaseType: Null (0x0)
18 # CHECK-NEXT: ComplexType: Null (0x0)
19 # CHECK-NEXT: StorageClass: Static (0x3)
20 # CHECK-NEXT: AuxSymbolCount: 0
22 # CHECK-NEXT: Symbol {
23 # CHECK-NEXT: Name: .text2
24 # CHECK-NEXT: Value: 0
25 # CHECK-NEXT: Section: .text (1)
26 # CHECK-NEXT: BaseType: Null (0x0)
27 # CHECK-NEXT: ComplexType: Null (0x0)
28 # CHECK-NEXT: StorageClass: Static (0x3)
29 # CHECK-NEXT: AuxSymbolCount: 0
31 # CHECK-NEXT: Symbol {
32 # CHECK-NEXT: Name: .data
33 # CHECK-NEXT: Value: 0
34 # CHECK-NEXT: Section: .data (3)
35 # CHECK-NEXT: BaseType: Null (0x0)
36 # CHECK-NEXT: ComplexType: Null (0x0)
37 # CHECK-NEXT: StorageClass: Static (0x3)
38 # CHECK-NEXT: AuxSymbolCount: 0
40 # CHECK-NEXT: Symbol {
41 # CHECK-NEXT: Name: MessageBoxA
42 # CHECK-NEXT: Value: 80
43 # CHECK-NEXT: Section: .text (1)
44 # CHECK-NEXT: BaseType: Null (0x0)
45 # CHECK-NEXT: ComplexType: Null (0x0)
46 # CHECK-NEXT: StorageClass: External (0x2)
47 # CHECK-NEXT: AuxSymbolCount: 0
49 # CHECK-NEXT: Symbol {
50 # CHECK-NEXT: Name: ExitProcess
51 # CHECK-NEXT: Value: 64
52 # CHECK-NEXT: Section: .text (1)
53 # CHECK-NEXT: BaseType: Null (0x0)
54 # CHECK-NEXT: ComplexType: Null (0x0)
55 # CHECK-NEXT: StorageClass: External (0x2)
56 # CHECK-NEXT: AuxSymbolCount: 0
58 # CHECK-NEXT: Symbol {
59 # CHECK-NEXT: Name: message
60 # CHECK-NEXT: Value: 6
61 # CHECK-NEXT: Section: .text2
62 # CHECK-NEXT: BaseType: Null (0x0)
63 # CHECK-NEXT: ComplexType: Null (0x0)
64 # CHECK-NEXT: StorageClass: Static (0x3)
65 # CHECK-NEXT: AuxSymbolCount: 0
67 # CHECK-NEXT: Symbol {
68 # CHECK-NEXT: Name: main
69 # CHECK-NEXT: Value: 0
70 # CHECK-NEXT: Section: .text (1)
71 # CHECK-NEXT: BaseType: Null (0x0)
72 # CHECK-NEXT: ComplexType: Null (0x0)
73 # CHECK-NEXT: StorageClass: External (0x2)
74 # CHECK-NEXT: AuxSymbolCount: 0
76 # CHECK-NEXT: Symbol {
77 # CHECK-NEXT: Name: caption
78 # CHECK-NEXT: Value: 0
79 # CHECK-NEXT: Section: .text2
80 # CHECK-NEXT: BaseType: Null (0x0)
81 # CHECK-NEXT: ComplexType: Null (0x0)
82 # CHECK-NEXT: StorageClass: Static (0x3)
83 # CHECK-NEXT: AuxSymbolCount: 0
85 # CHECK-NEXT: Symbol {
86 # CHECK-NEXT: Name: abs_symbol
87 # CHECK-NEXT: Value: 2662186735
88 # CHECK-NEXT: Section: IMAGE_SYM_ABSOLUTE (-1)
89 # CHECK-NEXT: BaseType: Null (0x0)
90 # CHECK-NEXT: ComplexType: Null (0x0)
91 # CHECK-NEXT: StorageClass: External (0x2)
92 # CHECK-NEXT: AuxSymbolCount: 0
100 Machine: IMAGE_FILE_MACHINE_AMD64
104 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
106 SectionData: B800000000000000005068000000000000000068000000000000000050E8000000000000000050E8000000000000000050E80000000000000000
109 SymbolName: abs_symbol
110 Type: IMAGE_REL_AMD64_ADDR64
113 Type: IMAGE_REL_AMD64_ADDR64
116 Type: IMAGE_REL_AMD64_ADDR64
118 SymbolName: MessageBoxA
119 Type: IMAGE_REL_AMD64_REL32
121 SymbolName: ExitProcess
122 Type: IMAGE_REL_AMD64_REL32
124 SymbolName: __ImageBase
125 Type: IMAGE_REL_AMD64_ADDR64
127 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
129 SectionData: B800000000000000005068000000000000000068000000000000000050E8000000000000000050E8000000000000000050E80000000000000000
132 SymbolName: abs_symbol
133 Type: IMAGE_REL_AMD64_ADDR64
136 Type: IMAGE_REL_AMD64_ADDR64
139 Type: IMAGE_REL_AMD64_ADDR64
141 SymbolName: MessageBoxA
142 Type: IMAGE_REL_AMD64_REL32
144 SymbolName: ExitProcess
145 Type: IMAGE_REL_AMD64_REL32
147 SymbolName: __ImageBase
148 Type: IMAGE_REL_AMD64_ADDR64
150 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
152 SectionData: 48656C6C6F0048656C6C6F20576F726C6400
157 SimpleType: IMAGE_SYM_TYPE_NULL
158 ComplexType: IMAGE_SYM_DTYPE_NULL
159 StorageClass: IMAGE_SYM_CLASS_STATIC
163 SimpleType: IMAGE_SYM_TYPE_NULL
164 ComplexType: IMAGE_SYM_DTYPE_NULL
165 StorageClass: IMAGE_SYM_CLASS_STATIC
168 NumberOfRelocations: 6
169 NumberOfLinenumbers: 0
175 SimpleType: IMAGE_SYM_TYPE_NULL
176 ComplexType: IMAGE_SYM_DTYPE_NULL
177 StorageClass: IMAGE_SYM_CLASS_STATIC
180 NumberOfRelocations: 6
181 NumberOfLinenumbers: 0
187 SimpleType: IMAGE_SYM_TYPE_NULL
188 ComplexType: IMAGE_SYM_DTYPE_NULL
189 StorageClass: IMAGE_SYM_CLASS_STATIC
192 NumberOfRelocations: 0
193 NumberOfLinenumbers: 0
199 SimpleType: IMAGE_SYM_TYPE_NULL
200 ComplexType: IMAGE_SYM_DTYPE_NULL
201 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
205 SimpleType: IMAGE_SYM_TYPE_NULL
206 ComplexType: IMAGE_SYM_DTYPE_NULL
207 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
211 SimpleType: IMAGE_SYM_TYPE_NULL
212 ComplexType: IMAGE_SYM_DTYPE_NULL
213 StorageClass: IMAGE_SYM_CLASS_STATIC
217 SimpleType: IMAGE_SYM_TYPE_NULL
218 ComplexType: IMAGE_SYM_DTYPE_NULL
219 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
223 SimpleType: IMAGE_SYM_TYPE_NULL
224 ComplexType: IMAGE_SYM_DTYPE_NULL
225 StorageClass: IMAGE_SYM_CLASS_STATIC
229 SimpleType: IMAGE_SYM_TYPE_NULL
230 ComplexType: IMAGE_SYM_DTYPE_NULL
231 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
235 SimpleType: IMAGE_SYM_TYPE_NULL
236 ComplexType: IMAGE_SYM_DTYPE_NULL
237 StorageClass: IMAGE_SYM_CLASS_EXTERNAL