1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link /debug /out:%t.exe /entry:main %t.obj
3 # RUN: llvm-readobj --sections %t.exe | FileCheck %s
4 # RUN: lld-link /debug:dwarf /out:%t.exe /entry:main %t.obj
5 # RUN: llvm-readobj --sections %t.exe | FileCheck %s
6 # RUN: lld-link /out:%t.exe /entry:main %t.obj
7 # RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=NODEBUG %s
8 # RUN: lld-link /debug:symtab /out:%t.exe /entry:main %t.obj
9 # RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=NODEBUG %s
13 # CHECK: Name: .debug_abbrev
14 # CHECK: Name: .debug_info
15 # CHECK: Name: .debug_line
16 # CHECK: Name: .debug_pubnames
17 # CHECK: Name: .debug_pubtypes
19 # NODEBUG: Name: .text
20 # NODEBUG: Name: .reloc
21 # NODEBUG-NOT: Name: .debug_abbrev
22 # NODEBUG-NOT: Name: .debug_info
23 # NODEBUG-NOT: Name: .debug_line
24 # NODEBUG-NOT: Name: .debug_pubnames
25 # NODEBUG-NOT: Name: .debug_pubtypes
29 Machine: IMAGE_FILE_MACHINE_I386
33 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
35 SectionData: 508D0500000000C70424000000005AC3
39 Type: IMAGE_REL_I386_DIR32
41 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
45 Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
50 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
71 Flags: [ HasColumnInfo ]
75 - FileName: '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
86 - FileName: '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
91 - '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
95 Type: IMAGE_REL_I386_SECREL
98 Type: IMAGE_REL_I386_SECTION
101 Type: IMAGE_REL_I386_SECREL
104 Type: IMAGE_REL_I386_SECTION
106 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
110 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
113 - Name: .debug_abbrev
114 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
116 SectionData: 011101250E1305030E10171B0E110112060000023400030E49133F193A0B3B0B02186E0E0000032400030E3E0B0B0B0000042E0011011206E77F194018030E3A0B3B0B49133F19000000
118 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
120 SectionData: 54000000040000000000040100000000040037000000000000003F000000000000001000000002720000003B0000000101050300000000780000000374000000050404000000001000000001548000000001013B00000000
123 SymbolName: .debug_abbrev
124 Type: IMAGE_REL_I386_SECREL
126 SymbolName: .debug_str
127 Type: IMAGE_REL_I386_SECREL
129 SymbolName: .debug_str
130 Type: IMAGE_REL_I386_SECREL
132 SymbolName: .debug_line
133 Type: IMAGE_REL_I386_SECREL
135 SymbolName: .debug_str
136 Type: IMAGE_REL_I386_SECREL
139 Type: IMAGE_REL_I386_DIR32
141 SymbolName: .debug_str
142 Type: IMAGE_REL_I386_SECREL
144 SymbolName: '?x@@3HA'
145 Type: IMAGE_REL_I386_DIR32
147 SymbolName: .debug_str
148 Type: IMAGE_REL_I386_SECREL
150 SymbolName: .debug_str
151 Type: IMAGE_REL_I386_SECREL
154 Type: IMAGE_REL_I386_DIR32
156 SymbolName: .debug_str
157 Type: IMAGE_REL_I386_SECREL
158 - Name: .debug_ranges
159 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
162 - Name: .debug_pubnames
163 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
165 SectionData: 1D00000002000000000058000000420000006D61696E0026000000780000000000
168 SymbolName: .debug_info
169 Type: IMAGE_REL_I386_SECREL
170 - Name: .debug_pubtypes
171 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
173 SectionData: 16000000020000000000580000003B000000696E740000000000
176 SymbolName: .debug_info
177 Type: IMAGE_REL_I386_SECREL
179 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
181 SectionData: 3300000002001E0000000101FB0E0D000101010100000001000001003C737464696E3E000000000000050200000000010AD60202000101
185 Type: IMAGE_REL_I386_DIR32
190 SimpleType: IMAGE_SYM_TYPE_NULL
191 ComplexType: IMAGE_SYM_DTYPE_NULL
192 StorageClass: IMAGE_SYM_CLASS_STATIC
195 NumberOfRelocations: 1
196 NumberOfLinenumbers: 0
202 SimpleType: IMAGE_SYM_TYPE_NULL
203 ComplexType: IMAGE_SYM_DTYPE_NULL
204 StorageClass: IMAGE_SYM_CLASS_STATIC
207 NumberOfRelocations: 0
208 NumberOfLinenumbers: 0
214 SimpleType: IMAGE_SYM_TYPE_NULL
215 ComplexType: IMAGE_SYM_DTYPE_NULL
216 StorageClass: IMAGE_SYM_CLASS_STATIC
219 NumberOfRelocations: 0
220 NumberOfLinenumbers: 0
226 SimpleType: IMAGE_SYM_TYPE_NULL
227 ComplexType: IMAGE_SYM_DTYPE_NULL
228 StorageClass: IMAGE_SYM_CLASS_STATIC
231 NumberOfRelocations: 4
232 NumberOfLinenumbers: 0
238 SimpleType: IMAGE_SYM_TYPE_NULL
239 ComplexType: IMAGE_SYM_DTYPE_NULL
240 StorageClass: IMAGE_SYM_CLASS_STATIC
243 NumberOfRelocations: 0
244 NumberOfLinenumbers: 0
250 SimpleType: IMAGE_SYM_TYPE_NULL
251 ComplexType: IMAGE_SYM_DTYPE_NULL
252 StorageClass: IMAGE_SYM_CLASS_STATIC
255 NumberOfRelocations: 0
256 NumberOfLinenumbers: 0
259 - Name: .debug_abbrev
262 SimpleType: IMAGE_SYM_TYPE_NULL
263 ComplexType: IMAGE_SYM_DTYPE_NULL
264 StorageClass: IMAGE_SYM_CLASS_STATIC
267 NumberOfRelocations: 0
268 NumberOfLinenumbers: 0
274 SimpleType: IMAGE_SYM_TYPE_NULL
275 ComplexType: IMAGE_SYM_DTYPE_NULL
276 StorageClass: IMAGE_SYM_CLASS_STATIC
279 NumberOfRelocations: 12
280 NumberOfLinenumbers: 0
283 - Name: .debug_ranges
286 SimpleType: IMAGE_SYM_TYPE_NULL
287 ComplexType: IMAGE_SYM_DTYPE_NULL
288 StorageClass: IMAGE_SYM_CLASS_STATIC
291 NumberOfRelocations: 0
292 NumberOfLinenumbers: 0
295 - Name: .debug_pubnames
298 SimpleType: IMAGE_SYM_TYPE_NULL
299 ComplexType: IMAGE_SYM_DTYPE_NULL
300 StorageClass: IMAGE_SYM_CLASS_STATIC
303 NumberOfRelocations: 1
304 NumberOfLinenumbers: 0
307 - Name: .debug_pubtypes
310 SimpleType: IMAGE_SYM_TYPE_NULL
311 ComplexType: IMAGE_SYM_DTYPE_NULL
312 StorageClass: IMAGE_SYM_CLASS_STATIC
315 NumberOfRelocations: 1
316 NumberOfLinenumbers: 0
322 SimpleType: IMAGE_SYM_TYPE_NULL
323 ComplexType: IMAGE_SYM_DTYPE_NULL
324 StorageClass: IMAGE_SYM_CLASS_STATIC
327 NumberOfRelocations: 1
328 NumberOfLinenumbers: 0
334 SimpleType: IMAGE_SYM_TYPE_NULL
335 ComplexType: IMAGE_SYM_DTYPE_NULL
336 StorageClass: IMAGE_SYM_CLASS_STATIC
340 SimpleType: IMAGE_SYM_TYPE_NULL
341 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
342 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
346 SimpleType: IMAGE_SYM_TYPE_NULL
347 ComplexType: IMAGE_SYM_DTYPE_NULL
348 StorageClass: IMAGE_SYM_CLASS_EXTERNAL