1 # This test has an S_GPROC32_ID symbol that doesn't refer to an LF_FUNC_ID
2 # record. Make sure we have reasonable behavior.
4 # RUN: yaml2obj %s -o %t.obj
5 # RUN: lld-link %t.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s --check-prefix=WARNING
6 # RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
7 # RUN: lld-link %t.obj -out:%t.exe -debug -debug:ghash -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s --check-prefix=WARNING
8 # RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
10 # WARNING: warning: procedure symbol record for `main` in {{.*}}.tmp.obj refers to PDB item index 0x{{.*}} which is not a valid function ID record
12 # CHECK: Mod 0000 | `{{.*}}pdb-invalid-func-type{{.*}}.tmp.obj`:
13 # CHECK: 4 | S_GPROC32 [size = 44] `main`
14 # CHECK: parent = 0, end = 80, addr = 0001:0000, code size = 3
15 # CHECK: type = `0x0007 (<not translated>)`, debug start = 0, debug end = 2, flags = none
16 # CHECK: 48 | S_FRAMEPROC [size = 32]
17 # CHECK: 80 | S_END [size = 4]
21 Machine: IMAGE_FILE_MACHINE_AMD64
25 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
35 # Refers to the wrong kind of type record (LF_PROCEDURE vs
45 BytesOfCalleeSavedRegisters: 0
46 OffsetOfExceptionHandler: 0
47 SectionIdOfExceptionHandler: 0
48 Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
57 - FileName: 'c:\src\llvm-project\build\t.c'
66 - FileName: 'c:\src\llvm-project\build\t.c'
68 Checksum: 270A878DCC1B845655B162F56C4F5020
71 - 'c:\src\llvm-project\build\t.c'
75 Type: IMAGE_REL_AMD64_SECREL
78 Type: IMAGE_REL_AMD64_SECTION
81 Type: IMAGE_REL_AMD64_SECREL
84 Type: IMAGE_REL_AMD64_SECTION
86 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
105 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
112 SimpleType: IMAGE_SYM_TYPE_NULL
113 ComplexType: IMAGE_SYM_DTYPE_NULL
114 StorageClass: IMAGE_SYM_CLASS_STATIC
117 NumberOfRelocations: 4
118 NumberOfLinenumbers: 0
124 SimpleType: IMAGE_SYM_TYPE_NULL
125 ComplexType: IMAGE_SYM_DTYPE_NULL
126 StorageClass: IMAGE_SYM_CLASS_STATIC
129 NumberOfRelocations: 0
130 NumberOfLinenumbers: 0
136 SimpleType: IMAGE_SYM_TYPE_NULL
137 ComplexType: IMAGE_SYM_DTYPE_NULL
138 StorageClass: IMAGE_SYM_CLASS_STATIC
141 NumberOfRelocations: 0
142 NumberOfLinenumbers: 0
148 SimpleType: IMAGE_SYM_TYPE_NULL
149 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
150 StorageClass: IMAGE_SYM_CLASS_EXTERNAL