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
10 # RUN: lld-link /debug:full,nodwarf /out:%t.exe /entry:main %t.obj
11 # RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=NODEBUG %s
12 # RUN: lld-link /debug:full /debug:nodwarf /out:%t.exe /entry:main %t.obj
13 # RUN: llvm-readobj --sections %t.exe | FileCheck -check-prefix=NODEBUG %s
18 # CHECK: Name: .debug_abbrev
19 # CHECK: Name: .debug_info
20 # CHECK: Name: .debug_line
21 # CHECK: Name: .debug_pubnames
22 # CHECK: Name: .debug_pubtypes
24 # NODEBUG: Name: .text
25 # NODEBUG: Name: .reloc
26 # NODEBUG: Name: .rmeta
27 # NODEBUG-NOT: Name: .debug_abbrev
28 # NODEBUG-NOT: Name: .debug_info
29 # NODEBUG-NOT: Name: .debug_line
30 # NODEBUG-NOT: Name: .debug_pubnames
31 # NODEBUG-NOT: Name: .debug_pubtypes
35 Machine: IMAGE_FILE_MACHINE_I386
39 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
41 SectionData: 508D0500000000C70424000000005AC3
45 Type: IMAGE_REL_I386_DIR32
47 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
51 Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
56 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
77 Flags: [ HasColumnInfo ]
81 - FileName: '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
92 - FileName: '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
97 - '\usr\local\google\home\majnemer\llvm\src\tools\lld\<stdin>'
101 Type: IMAGE_REL_I386_SECREL
104 Type: IMAGE_REL_I386_SECTION
107 Type: IMAGE_REL_I386_SECREL
110 Type: IMAGE_REL_I386_SECTION
112 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
116 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
119 - Name: .debug_abbrev
120 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
122 SectionData: 011101250E1305030E10171B0E110112060000023400030E49133F193A0B3B0B02186E0E0000032400030E3E0B0B0B0000042E0011011206E77F194018030E3A0B3B0B49133F19000000
124 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
126 SectionData: 54000000040000000000040100000000040037000000000000003F000000000000001000000002720000003B0000000101050300000000780000000374000000050404000000001000000001548000000001013B00000000
129 SymbolName: .debug_abbrev
130 Type: IMAGE_REL_I386_SECREL
132 SymbolName: .debug_str
133 Type: IMAGE_REL_I386_SECREL
135 SymbolName: .debug_str
136 Type: IMAGE_REL_I386_SECREL
138 SymbolName: .debug_line
139 Type: IMAGE_REL_I386_SECREL
141 SymbolName: .debug_str
142 Type: IMAGE_REL_I386_SECREL
145 Type: IMAGE_REL_I386_DIR32
147 SymbolName: .debug_str
148 Type: IMAGE_REL_I386_SECREL
150 SymbolName: '?x@@3HA'
151 Type: IMAGE_REL_I386_DIR32
153 SymbolName: .debug_str
154 Type: IMAGE_REL_I386_SECREL
156 SymbolName: .debug_str
157 Type: IMAGE_REL_I386_SECREL
160 Type: IMAGE_REL_I386_DIR32
162 SymbolName: .debug_str
163 Type: IMAGE_REL_I386_SECREL
164 - Name: .debug_ranges
165 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
168 - Name: .debug_pubnames
169 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
171 SectionData: 1D00000002000000000058000000420000006D61696E0026000000780000000000
174 SymbolName: .debug_info
175 Type: IMAGE_REL_I386_SECREL
176 - Name: .debug_pubtypes
177 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
179 SectionData: 16000000020000000000580000003B000000696E740000000000
182 SymbolName: .debug_info
183 Type: IMAGE_REL_I386_SECREL
185 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
187 SectionData: 3300000002001E0000000101FB0E0D000101010100000001000001003C737464696E3E000000000000050200000000010AD60202000101
191 Type: IMAGE_REL_I386_DIR32
193 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
195 SectionData: 00112233
200 SimpleType: IMAGE_SYM_TYPE_NULL
201 ComplexType: IMAGE_SYM_DTYPE_NULL
202 StorageClass: IMAGE_SYM_CLASS_STATIC
205 NumberOfRelocations: 1
206 NumberOfLinenumbers: 0
212 SimpleType: IMAGE_SYM_TYPE_NULL
213 ComplexType: IMAGE_SYM_DTYPE_NULL
214 StorageClass: IMAGE_SYM_CLASS_STATIC
217 NumberOfRelocations: 0
218 NumberOfLinenumbers: 0
224 SimpleType: IMAGE_SYM_TYPE_NULL
225 ComplexType: IMAGE_SYM_DTYPE_NULL
226 StorageClass: IMAGE_SYM_CLASS_STATIC
229 NumberOfRelocations: 0
230 NumberOfLinenumbers: 0
236 SimpleType: IMAGE_SYM_TYPE_NULL
237 ComplexType: IMAGE_SYM_DTYPE_NULL
238 StorageClass: IMAGE_SYM_CLASS_STATIC
241 NumberOfRelocations: 4
242 NumberOfLinenumbers: 0
248 SimpleType: IMAGE_SYM_TYPE_NULL
249 ComplexType: IMAGE_SYM_DTYPE_NULL
250 StorageClass: IMAGE_SYM_CLASS_STATIC
253 NumberOfRelocations: 0
254 NumberOfLinenumbers: 0
260 SimpleType: IMAGE_SYM_TYPE_NULL
261 ComplexType: IMAGE_SYM_DTYPE_NULL
262 StorageClass: IMAGE_SYM_CLASS_STATIC
265 NumberOfRelocations: 0
266 NumberOfLinenumbers: 0
269 - Name: .debug_abbrev
272 SimpleType: IMAGE_SYM_TYPE_NULL
273 ComplexType: IMAGE_SYM_DTYPE_NULL
274 StorageClass: IMAGE_SYM_CLASS_STATIC
277 NumberOfRelocations: 0
278 NumberOfLinenumbers: 0
284 SimpleType: IMAGE_SYM_TYPE_NULL
285 ComplexType: IMAGE_SYM_DTYPE_NULL
286 StorageClass: IMAGE_SYM_CLASS_STATIC
289 NumberOfRelocations: 12
290 NumberOfLinenumbers: 0
293 - Name: .debug_ranges
296 SimpleType: IMAGE_SYM_TYPE_NULL
297 ComplexType: IMAGE_SYM_DTYPE_NULL
298 StorageClass: IMAGE_SYM_CLASS_STATIC
301 NumberOfRelocations: 0
302 NumberOfLinenumbers: 0
305 - Name: .debug_pubnames
308 SimpleType: IMAGE_SYM_TYPE_NULL
309 ComplexType: IMAGE_SYM_DTYPE_NULL
310 StorageClass: IMAGE_SYM_CLASS_STATIC
313 NumberOfRelocations: 1
314 NumberOfLinenumbers: 0
317 - Name: .debug_pubtypes
320 SimpleType: IMAGE_SYM_TYPE_NULL
321 ComplexType: IMAGE_SYM_DTYPE_NULL
322 StorageClass: IMAGE_SYM_CLASS_STATIC
325 NumberOfRelocations: 1
326 NumberOfLinenumbers: 0
332 SimpleType: IMAGE_SYM_TYPE_NULL
333 ComplexType: IMAGE_SYM_DTYPE_NULL
334 StorageClass: IMAGE_SYM_CLASS_STATIC
337 NumberOfRelocations: 1
338 NumberOfLinenumbers: 0
344 SimpleType: IMAGE_SYM_TYPE_NULL
345 ComplexType: IMAGE_SYM_DTYPE_NULL
346 StorageClass: IMAGE_SYM_CLASS_STATIC
350 SimpleType: IMAGE_SYM_TYPE_NULL
351 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
352 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
356 SimpleType: IMAGE_SYM_TYPE_NULL
357 ComplexType: IMAGE_SYM_DTYPE_NULL
358 StorageClass: IMAGE_SYM_CLASS_EXTERNAL