1 # This is an object compiled with /Zi (see the LF_TYPESERVER2 record) without an
2 # adjacent type server PDB. Test that LLD fails gracefully on it.
3 # Also try linking another OBJ with a reference to the same PDB
5 # RUN: yaml2obj %s -o %t1.obj
6 # RUN: yaml2obj %p/Inputs/pdb-type-server-missing-2.yaml -o %t2.obj
7 # RUN: lld-link %t1.obj %t2.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix=WARN
8 # RUN: lld-link %t1.obj %t2.obj -out:%t.exe -debug:ghash -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix=WARN
9 # RUN: lld-link %t1.obj %t2.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main /ignore:4099 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix=IGNORE -allow-empty
10 # RUN: not lld-link %t1.obj %t2.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main /WX 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix=ERR
11 # RUN: lld-link %t1.obj %t2.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main /ignore:4099 /WX 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix=IGNORE-ERR -allow-empty
13 # WARN: warning: Cannot use debug info for '{{.*}}.obj' [LNK4099]
16 # IGNORE-NOT: warning: Cannot use debug info for '{{.*}}.obj' [LNK4099]
19 # ERR: error: Cannot use debug info for '{{.*}}.obj' [LNK4099]
22 # IGNORE-ERR-NOT: error: Cannot use debug info for '{{.*}}.obj' [LNK4099]
23 # IGNORE-ERR-NOT: [[MSG]]
27 Machine: IMAGE_FILE_MACHINE_AMD64
31 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
49 BytesOfCalleeSavedRegisters: 0
50 OffsetOfExceptionHandler: 0
51 SectionIdOfExceptionHandler: 0
52 Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
61 - FileName: 'c:\src\llvm-project\build\t.c'
70 - FileName: 'c:\src\llvm-project\build\t.c'
72 Checksum: 270A878DCC1B845655B162F56C4F5020
75 - 'c:\src\llvm-project\build\t.c'
79 Type: IMAGE_REL_AMD64_SECREL
82 Type: IMAGE_REL_AMD64_SECTION
85 Type: IMAGE_REL_AMD64_SECREL
88 Type: IMAGE_REL_AMD64_SECTION
90 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
93 - Kind: LF_TYPESERVER2
95 Guid: '{1B19DF01-BF22-426B-96CE-5258B8329FE5}'
97 Name: 'C:\src\llvm-project\build\definitely_not_found_for_sure.pdb'
99 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
106 SimpleType: IMAGE_SYM_TYPE_NULL
107 ComplexType: IMAGE_SYM_DTYPE_NULL
108 StorageClass: IMAGE_SYM_CLASS_STATIC
111 NumberOfRelocations: 4
112 NumberOfLinenumbers: 0
118 SimpleType: IMAGE_SYM_TYPE_NULL
119 ComplexType: IMAGE_SYM_DTYPE_NULL
120 StorageClass: IMAGE_SYM_CLASS_STATIC
123 NumberOfRelocations: 0
124 NumberOfLinenumbers: 0
130 SimpleType: IMAGE_SYM_TYPE_NULL
131 ComplexType: IMAGE_SYM_DTYPE_NULL
132 StorageClass: IMAGE_SYM_CLASS_STATIC
135 NumberOfRelocations: 0
136 NumberOfLinenumbers: 0
142 SimpleType: IMAGE_SYM_TYPE_NULL
143 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
144 StorageClass: IMAGE_SYM_CLASS_EXTERNAL