• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %s -o %t.obj
2
3# RUN: rm -f %t.dll %t.pdb
4# RUN: lld-link /debug /pdbaltpath:test.pdb /dll /out:%t.dll /entry:DllMain %t.obj
5# RUN: llvm-readobj --coff-debug-directory %t.dll > %t.1.txt
6# RUN: lld-link /debug /pdbaltpath:test.pdb /dll /out:%t.dll /entry:DllMain %t.obj
7# RUN: llvm-readobj --coff-debug-directory %t.dll > %t.2.txt
8# RUN: cat %t.1.txt %t.2.txt | FileCheck %s
9
10# RUN: rm -f %t.dll %t.pdb
11# RUN: lld-link /debug /pdb:%t1.pdb /dll /out:%t.dll /entry:DllMain %t.obj
12# RUN: llvm-readobj --coff-debug-directory %t.dll > %t.3.txt
13# RUN: lld-link /debug /pdb:%t2.pdb /dll /out:%t.dll /entry:DllMain %t.obj
14# RUN: llvm-readobj --coff-debug-directory %t.dll > %t.4.txt
15# RUN: cat %t.3.txt %t.4.txt | FileCheck --check-prefix TWOPDBS %s
16
17# RUN: rm -f %t.dll %t.pdb
18# RUN: lld-link /Brepro /dll /out:%t.dll /entry:DllMain %t.obj
19# RUN: llvm-readobj --coff-debug-directory %t.dll | FileCheck --check-prefix REPRO %s
20
21# RUN: rm -f %t.dll %t.pdb
22# RUN: lld-link /Brepro /debug /dll /out:%t.dll /entry:DllMain %t.obj
23# RUN: llvm-readobj --coff-debug-directory %t.dll | FileCheck --check-prefix REPRODEBUG %s
24
25# RUN: rm -f %t.dll %t.pdb
26# RUN: lld-link /lldmingw /debug:dwarf /dll /out:%t.dll /entry:DllMain %t.obj
27# RUN: llvm-readobj --coff-debug-directory %t.dll | FileCheck --check-prefix MINGW %s
28
29# CHECK: File: [[FILE:.*]].dll
30# CHECK: DebugDirectory [
31# CHECK:   DebugEntry {
32# CHECK:     Characteristics: 0x0
33# CHECK:     TimeDateStamp:
34# CHECK:     MajorVersion: 0x0
35# CHECK:     MinorVersion: 0x0
36# CHECK:     Type: CodeView (0x2)
37# CHECK:     SizeOfData: 0x{{[^0]}}
38# CHECK:     AddressOfRawData: 0x{{[^0]}}
39# CHECK:     PointerToRawData: 0x{{[^0]}}
40# CHECK:     PDBInfo {
41# CHECK:       PDBSignature: 0x53445352
42# CHECK:       PDBGUID: [[GUID:\(([A-Za-z0-9]{2} ?){16}\)]]
43# CHECK:       PDBAge: 1
44# CHECK:       PDBFileName: {{.*}}.pdb
45# CHECK:     }
46# CHECK:   }
47# CHECK: ]
48# CHECK: File: [[FILE]].dll
49# CHECK: DebugDirectory [
50# CHECK:   DebugEntry {
51# CHECK:     Characteristics: 0x0
52# CHECK:     TimeDateStamp:
53# CHECK:     MajorVersion: 0x0
54# CHECK:     MinorVersion: 0x0
55# CHECK:     Type: CodeView (0x2)
56# CHECK:     SizeOfData: 0x{{[^0]}}
57# CHECK:     AddressOfRawData: 0x{{[^0]}}
58# CHECK:     PointerToRawData: 0x{{[^0]}}
59# CHECK:     PDBInfo {
60# CHECK:       PDBSignature: 0x53445352
61# CHECK:       PDBGUID: [[GUID]]
62# CHECK:       PDBAge: 1
63# CHECK:       PDBFileName: {{.*}}.pdb
64# CHECK:     }
65# CHECK:   }
66# CHECK: ]
67
68# TWOPDBS: File: [[FILE:.*]].dll
69# TWOPDBS: DebugDirectory [
70# TWOPDBS:   DebugEntry {
71# TWOPDBS:     Characteristics: 0x0
72# TWOPDBS:     TimeDateStamp:
73# TWOPDBS:     MajorVersion: 0x0
74# TWOPDBS:     MinorVersion: 0x0
75# TWOPDBS:     Type: CodeView (0x2)
76# TWOPDBS:     SizeOfData: 0x{{[^0]}}
77# TWOPDBS:     AddressOfRawData: 0x{{[^0]}}
78# TWOPDBS:     PointerToRawData: 0x{{[^0]}}
79# TWOPDBS:     PDBInfo {
80# TWOPDBS:       PDBSignature: 0x53445352
81# TWOPDBS:       PDBGUID: [[GUID:\(([A-Za-z0-9]{2} ?){16}\)]]
82# TWOPDBS:       PDBAge: 1
83# TWOPDBS:       PDBFileName: {{.*}}.pdb
84# TWOPDBS:     }
85# TWOPDBS:   }
86# TWOPDBS: ]
87# TWOPDBS: File: [[FILE]].dll
88# TWOPDBS: DebugDirectory [
89# TWOPDBS:   DebugEntry {
90# TWOPDBS:     Characteristics: 0x0
91# TWOPDBS:     TimeDateStamp:
92# TWOPDBS:     MajorVersion: 0x0
93# TWOPDBS:     MinorVersion: 0x0
94# TWOPDBS:     Type: CodeView (0x2)
95# TWOPDBS:     SizeOfData: 0x{{[^0]}}
96# TWOPDBS:     AddressOfRawData: 0x{{[^0]}}
97# TWOPDBS:     PointerToRawData: 0x{{[^0]}}
98# TWOPDBS:     PDBInfo {
99# TWOPDBS:       PDBSignature: 0x53445352
100# TWOPDBS-NOT:       PDBGUID: [[GUID]]
101# TWOPDBS:       PDBAge: 1
102# TWOPDBS:       PDBFileName: {{.*}}.pdb
103# TWOPDBS:     }
104# TWOPDBS:   }
105# TWOPDBS: ]
106
107# REPRO: File: {{.*}}.dll
108# REPRO: DebugDirectory [
109# REPRO:   DebugEntry {
110# REPRO:     Characteristics: 0x0
111# REPRO:     TimeDateStamp:
112# REPRO:     MajorVersion: 0x0
113# REPRO:     MinorVersion: 0x0
114# REPRO:     Type: Repro (0x10)
115# REPRO:     SizeOfData: 0x0
116# REPRO:     AddressOfRawData: 0x0
117# REPRO:     PointerToRawData: 0x0
118# REPRO:   }
119# REPRO: ]
120
121# REPRODEBUG: File: {{.*}}.dll
122# REPRODEBUG: DebugDirectory [
123# REPRODEBUG:   DebugEntry {
124# REPRODEBUG:     Characteristics: 0x0
125# REPRODEBUG:     TimeDateStamp:
126# REPRODEBUG:     MajorVersion: 0x0
127# REPRODEBUG:     MinorVersion: 0x0
128# REPRODEBUG:     Type: CodeView (0x2)
129# REPRODEBUG:     SizeOfData: 0x{{[^0]}}
130# REPRODEBUG:     AddressOfRawData: 0x{{[^0]}}
131# REPRODEBUG:     PointerToRawData: 0x{{[^0]}}
132# REPRODEBUG:     PDBInfo {
133# REPRODEBUG:       PDBSignature: 0x53445352
134# REPRODEBUG:       PDBGUID:
135# REPRODEBUG:       PDBAge: 1
136# REPRODEBUG:       PDBFileName:
137# REPRODEBUG:     }
138# REPRODEBUG:   }
139# REPRODEBUG:   DebugEntry {
140# REPRODEBUG:     Characteristics: 0x0
141# REPRODEBUG:     TimeDateStamp:
142# REPRODEBUG:     MajorVersion: 0x0
143# REPRODEBUG:     MinorVersion: 0x0
144# REPRODEBUG:     Type: Repro (0x10)
145# REPRODEBUG:     SizeOfData: 0x0
146# REPRODEBUG:     AddressOfRawData: 0x0
147# REPRODEBUG:     PointerToRawData: 0x0
148# REPRODEBUG:   }
149# REPRODEBUG: ]
150
151# MINGW: File: {{.*}}.dll
152# MINGW: DebugDirectory [
153# MINGW:   DebugEntry {
154# MINGW:     Characteristics: 0x0
155# MINGW:     TimeDateStamp:
156# MINGW:     MajorVersion: 0x0
157# MINGW:     MinorVersion: 0x0
158# MINGW:     Type: CodeView (0x2)
159# MINGW:     SizeOfData: 0x{{[^0]}}
160# MINGW:     AddressOfRawData: 0x{{[^0]}}
161# MINGW:     PointerToRawData: 0x{{[^0]}}
162# MINGW:     PDBInfo {
163# MINGW:       PDBSignature: 0x53445352
164# MINGW:       PDBGUID: [[GUID:\(([A-Za-z0-9]{2} ?){16}\)]]
165# MINGW:       PDBAge: 1
166# MINGW:       PDBFileName:
167# MINGW:     }
168# MINGW:   }
169# MINGW: ]
170--- !COFF
171header:
172  Machine:         IMAGE_FILE_MACHINE_I386
173  Characteristics: [  ]
174sections:
175  - Name:            .text
176    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
177    Alignment:       4
178    SectionData:     31C0C3
179  - Name:            .data
180    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
181    Alignment:       4
182    SectionData:     ''
183  - Name:            .bss
184    Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
185    Alignment:       4
186    SectionData:     ''
187symbols:
188  - Name:            .text
189    Value:           0
190    SectionNumber:   1
191    SimpleType:      IMAGE_SYM_TYPE_NULL
192    ComplexType:     IMAGE_SYM_DTYPE_NULL
193    StorageClass:    IMAGE_SYM_CLASS_STATIC
194    SectionDefinition:
195      Length:          3
196      NumberOfRelocations: 0
197      NumberOfLinenumbers: 0
198      CheckSum:        3963538403
199      Number:          1
200  - Name:            .data
201    Value:           0
202    SectionNumber:   2
203    SimpleType:      IMAGE_SYM_TYPE_NULL
204    ComplexType:     IMAGE_SYM_DTYPE_NULL
205    StorageClass:    IMAGE_SYM_CLASS_STATIC
206    SectionDefinition:
207      Length:          0
208      NumberOfRelocations: 0
209      NumberOfLinenumbers: 0
210      CheckSum:        0
211      Number:          2
212  - Name:            .bss
213    Value:           0
214    SectionNumber:   3
215    SimpleType:      IMAGE_SYM_TYPE_NULL
216    ComplexType:     IMAGE_SYM_DTYPE_NULL
217    StorageClass:    IMAGE_SYM_CLASS_STATIC
218    SectionDefinition:
219      Length:          0
220      NumberOfRelocations: 0
221      NumberOfLinenumbers: 0
222      CheckSum:        0
223      Number:          3
224  - Name:            '@feat.00'
225    Value:           1
226    SectionNumber:   -1
227    SimpleType:      IMAGE_SYM_TYPE_NULL
228    ComplexType:     IMAGE_SYM_DTYPE_NULL
229    StorageClass:    IMAGE_SYM_CLASS_STATIC
230  - Name:            _DllMain
231    Value:           0
232    SectionNumber:   1
233    SimpleType:      IMAGE_SYM_TYPE_NULL
234    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
235    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
236...
237