brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.4 KiB · 5f70205 Raw
146 lines · yaml
1# This is an object compiled with /Zi (see the LF_TYPESERVER2 record) without an2# adjacent type server PDB. Test that LLD fails gracefully on it.3# Also try linking another OBJ with a reference to the same PDB4 5# RUN: yaml2obj %s -o %t1.obj6# RUN: yaml2obj %p/Inputs/pdb-type-server-missing-2.yaml -o %t2.obj7# 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=WARN8# 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=WARN9# 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-empty10# 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=ERR11# 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-empty12 13# WARN: warning: Cannot use debug info for '{{.*}}.obj' [LNK4099]14# WARN-NEXT: [[MSG]]15 16# IGNORE-NOT: warning: Cannot use debug info for '{{.*}}.obj' [LNK4099]17# IGNORE-NOT: [[MSG]]18 19# ERR: error: Cannot use debug info for '{{.*}}.obj' [LNK4099]20# ERR-NEXT: [[MSG]]21 22# IGNORE-ERR-NOT: error: Cannot use debug info for '{{.*}}.obj' [LNK4099]23# IGNORE-ERR-NOT: [[MSG]]24 25--- !COFF26header:27  Machine:         IMAGE_FILE_MACHINE_AMD6428  Characteristics: [  ]29sections:30  - Name:            '.debug$S'31    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]32    Alignment:       133    Subsections:34      - !Symbols35        Records:36          - Kind:            S_GPROC32_ID37            ProcSym:38              CodeSize:        339              DbgStart:        040              DbgEnd:          241              FunctionType:    419942              Flags:           [  ]43              DisplayName:     main44          - Kind:            S_FRAMEPROC45            FrameProcSym:46              TotalFrameBytes: 047              PaddingFrameBytes: 048              OffsetToPadding: 049              BytesOfCalleeSavedRegisters: 050              OffsetOfExceptionHandler: 051              SectionIdOfExceptionHandler: 052              Flags:           [ AsynchronousExceptionHandling, OptimizedForSpeed ]53          - Kind:            S_PROC_ID_END54            ScopeEndSym:55      - !Lines56        CodeSize:        357        Flags:           [  ]58        RelocOffset:     059        RelocSegment:    060        Blocks:61          - FileName:        'c:\src\llvm-project\build\t.c'62            Lines:63              - Offset:          064                LineStart:       165                IsStatement:     true66                EndDelta:        067            Columns:68      - !FileChecksums69        Checksums:70          - FileName:        'c:\src\llvm-project\build\t.c'71            Kind:            MD572            Checksum:        270A878DCC1B845655B162F56C4F502073      - !StringTable74        Strings:75          - 'c:\src\llvm-project\build\t.c'76    Relocations:77      - VirtualAddress:  4478        SymbolName:      main79        Type:            IMAGE_REL_AMD64_SECREL80      - VirtualAddress:  4881        SymbolName:      main82        Type:            IMAGE_REL_AMD64_SECTION83      - VirtualAddress:  10084        SymbolName:      main85        Type:            IMAGE_REL_AMD64_SECREL86      - VirtualAddress:  10487        SymbolName:      main88        Type:            IMAGE_REL_AMD64_SECTION89  - Name:            '.debug$T'90    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]91    Alignment:       192    Types:93      - Kind:            LF_TYPESERVER294        TypeServer2:95          Guid:            '{1B19DF01-BF22-426B-96CE-5258B8329FE5}'96          Age:             1897          Name:            'C:\src\llvm-project\build\definitely_not_found_for_sure.pdb'98  - Name:            '.text$mn'99    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]100    Alignment:       16101    SectionData:     33C0C3102symbols:103  - Name:            '.debug$S'104    Value:           0105    SectionNumber:   1106    SimpleType:      IMAGE_SYM_TYPE_NULL107    ComplexType:     IMAGE_SYM_DTYPE_NULL108    StorageClass:    IMAGE_SYM_CLASS_STATIC109    SectionDefinition:110      Length:          328111      NumberOfRelocations: 4112      NumberOfLinenumbers: 0113      CheckSum:        0114      Number:          0115  - Name:            '.debug$T'116    Value:           0117    SectionNumber:   2118    SimpleType:      IMAGE_SYM_TYPE_NULL119    ComplexType:     IMAGE_SYM_DTYPE_NULL120    StorageClass:    IMAGE_SYM_CLASS_STATIC121    SectionDefinition:122      Length:          564123      NumberOfRelocations: 0124      NumberOfLinenumbers: 0125      CheckSum:        0126      Number:          0127  - Name:            '.text$mn'128    Value:           0129    SectionNumber:   3130    SimpleType:      IMAGE_SYM_TYPE_NULL131    ComplexType:     IMAGE_SYM_DTYPE_NULL132    StorageClass:    IMAGE_SYM_CLASS_STATIC133    SectionDefinition:134      Length:          3135      NumberOfRelocations: 0136      NumberOfLinenumbers: 0137      CheckSum:        4021952397138      Number:          0139  - Name:            main140    Value:           0141    SectionNumber:   3142    SimpleType:      IMAGE_SYM_TYPE_NULL143    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION144    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL145...146