brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.5 KiB · aedcefa Raw
151 lines · yaml
1 2# Test linking an OBJ with a reference to an out-of-date PDB type server3# RUN: cd %S/Inputs4# RUN: yaml2obj %s -o %t.obj5# RUN: lld-link %t.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s6# RUN: lld-link %t.obj -out:%t.exe -debug:ghash -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s7# RUN: cd %S8 9# CHECK: warning: Cannot use debug info for '{{.*}}.obj'10# CHECK-NEXT: The signature does not match; the file(s) might be out of date11 12# Also test linking an OBJ with a reference to *valid* PDB type server13# RUN: cd %S/Inputs14# RUN: yaml2obj %S/Inputs/pdb-type-server-valid-signature.yaml -o %t2.obj15# RUN: lld-link %t2.obj -out:%t2.exe -debug -pdb:%t2.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s -check-prefix=VALID-SIGNATURE -allow-empty16# RUN: cd %S17 18# VALID-SIGNATURE-NOT: warning: Cannot use debug info for '{{.*}}.obj'19# VALID-SIGNATURE-NOT: The signature does not match; the file(s) might be out of date20 21# Test an invalid path reference to a PDB type server; as a fallback LLD should try to load the PDB in the same path as the OBJ22# RUN: mkdir -p %t.dir23# RUN: yaml2obj %S/Inputs/pdb-type-server-invalid-path.yaml -o %t.dir/3.obj24# RUN: cp %S/Inputs/pdb-diff-cl.pdb %t.dir/pdb-diff-cl.pdb25# RUN: lld-link %t.dir/3.obj -out:%t3.exe -debug -pdb:%t3.pdb -nodefaultlib -entry:main 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix=INVALID-PATH -allow-empty26 27# INVALID-PATH-NOT: warning: Cannot use debug info for '{{.*}}3.obj' [LNK4099]28# INVALID-PATH-NOT: failed to load reference 'c:\some_invalid_path_AABB98765\pdb-diff-cl.pdb': [[MSG]]29 30--- !COFF31header:32  Machine:         IMAGE_FILE_MACHINE_AMD6433  Characteristics: [  ]34sections:35  - Name:            '.debug$S'36    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]37    Alignment:       138    Subsections:39      - !Symbols40        Records:41          - Kind:            S_GPROC32_ID42            ProcSym:43              CodeSize:        344              DbgStart:        045              DbgEnd:          246              FunctionType:    419947              Flags:           [  ]48              DisplayName:     main49          - Kind:            S_FRAMEPROC50            FrameProcSym:51              TotalFrameBytes: 052              PaddingFrameBytes: 053              OffsetToPadding: 054              BytesOfCalleeSavedRegisters: 055              OffsetOfExceptionHandler: 056              SectionIdOfExceptionHandler: 057              Flags:           [ AsynchronousExceptionHandling, OptimizedForSpeed ]58          - Kind:            S_PROC_ID_END59            ScopeEndSym:60      - !Lines61        CodeSize:        362        Flags:           [  ]63        RelocOffset:     064        RelocSegment:    065        Blocks:66          - FileName:        'c:\src\llvm-project\build\t.c'67            Lines:68              - Offset:          069                LineStart:       170                IsStatement:     true71                EndDelta:        072            Columns:73      - !FileChecksums74        Checksums:75          - FileName:        'c:\src\llvm-project\build\t.c'76            Kind:            MD577            Checksum:        270A878DCC1B845655B162F56C4F502078      - !StringTable79        Strings:80          - 'c:\src\llvm-project\build\t.c'81    Relocations:82      - VirtualAddress:  4483        SymbolName:      main84        Type:            IMAGE_REL_AMD64_SECREL85      - VirtualAddress:  4886        SymbolName:      main87        Type:            IMAGE_REL_AMD64_SECTION88      - VirtualAddress:  10089        SymbolName:      main90        Type:            IMAGE_REL_AMD64_SECREL91      - VirtualAddress:  10492        SymbolName:      main93        Type:            IMAGE_REL_AMD64_SECTION94  - Name:            '.debug$T'95    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]96    Alignment:       197    Types:98      - Kind:            LF_TYPESERVER299        TypeServer2:100          Guid:            '{1B19DF01-BF22-426B-96CE-5258B8329FE5}'101          Age:             18102          Name:            'pdb-diff-cl.pdb'103  - Name:            '.text$mn'104    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]105    Alignment:       16106    SectionData:     33C0C3107symbols:108  - Name:            '.debug$S'109    Value:           0110    SectionNumber:   1111    SimpleType:      IMAGE_SYM_TYPE_NULL112    ComplexType:     IMAGE_SYM_DTYPE_NULL113    StorageClass:    IMAGE_SYM_CLASS_STATIC114    SectionDefinition:115      Length:          328116      NumberOfRelocations: 4117      NumberOfLinenumbers: 0118      CheckSum:        0119      Number:          0120  - Name:            '.debug$T'121    Value:           0122    SectionNumber:   2123    SimpleType:      IMAGE_SYM_TYPE_NULL124    ComplexType:     IMAGE_SYM_DTYPE_NULL125    StorageClass:    IMAGE_SYM_CLASS_STATIC126    SectionDefinition:127      Length:          564128      NumberOfRelocations: 0129      NumberOfLinenumbers: 0130      CheckSum:        0131      Number:          0132  - Name:            '.text$mn'133    Value:           0134    SectionNumber:   3135    SimpleType:      IMAGE_SYM_TYPE_NULL136    ComplexType:     IMAGE_SYM_DTYPE_NULL137    StorageClass:    IMAGE_SYM_CLASS_STATIC138    SectionDefinition:139      Length:          3140      NumberOfRelocations: 0141      NumberOfLinenumbers: 0142      CheckSum:        4021952397143      Number:          0144  - Name:            main145    Value:           0146    SectionNumber:   3147    SimpleType:      IMAGE_SYM_TYPE_NULL148    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION149    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL150...151