1 # RUN: yaml2obj %s -o %t.obj
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
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
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
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
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
29 # CHECK: File: [[FILE:.*]].dll
30 # CHECK: DebugDirectory [
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]}}
41 # CHECK: PDBSignature: 0x53445352
42 # CHECK: PDBGUID: [[GUID:\(([A-Za-z0-9]{2} ?){16}\)]]
44 # CHECK: PDBFileName: {{.*}}.pdb
48 # CHECK: File: [[FILE]].dll
49 # CHECK: DebugDirectory [
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]}}
60 # CHECK: PDBSignature: 0x53445352
61 # CHECK: PDBGUID: [[GUID]]
63 # CHECK: PDBFileName: {{.*}}.pdb
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]}}
80 # TWOPDBS: PDBSignature: 0x53445352
81 # TWOPDBS: PDBGUID: [[GUID:\(([A-Za-z0-9]{2} ?){16}\)]]
83 # TWOPDBS: PDBFileName: {{.*}}.pdb
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]}}
99 # TWOPDBS: PDBSignature: 0x53445352
100 # TWOPDBS-NOT: PDBGUID: [[GUID]]
102 # TWOPDBS: PDBFileName: {{.*}}.pdb
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
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:
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
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]}}
163 # MINGW: PDBSignature: 0x53445352
164 # MINGW: PDBGUID: [[GUID:\(([A-Za-z0-9]{2} ?){16}\)]]
166 # MINGW: PDBFileName:
172 Machine: IMAGE_FILE_MACHINE_I386
176 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
180 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
184 Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
191 SimpleType: IMAGE_SYM_TYPE_NULL
192 ComplexType: IMAGE_SYM_DTYPE_NULL
193 StorageClass: IMAGE_SYM_CLASS_STATIC
196 NumberOfRelocations: 0
197 NumberOfLinenumbers: 0
203 SimpleType: IMAGE_SYM_TYPE_NULL
204 ComplexType: IMAGE_SYM_DTYPE_NULL
205 StorageClass: IMAGE_SYM_CLASS_STATIC
208 NumberOfRelocations: 0
209 NumberOfLinenumbers: 0
215 SimpleType: IMAGE_SYM_TYPE_NULL
216 ComplexType: IMAGE_SYM_DTYPE_NULL
217 StorageClass: IMAGE_SYM_CLASS_STATIC
220 NumberOfRelocations: 0
221 NumberOfLinenumbers: 0
227 SimpleType: IMAGE_SYM_TYPE_NULL
228 ComplexType: IMAGE_SYM_DTYPE_NULL
229 StorageClass: IMAGE_SYM_CLASS_STATIC
233 SimpleType: IMAGE_SYM_TYPE_NULL
234 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
235 StorageClass: IMAGE_SYM_CLASS_EXTERNAL