llvm-project/lld/test/COFF/pdb.test

192 lines
6.1 KiB
Plaintext
Raw Normal View History

# RUN: yaml2obj %s > %t.obj
# RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:DllMain %t.obj
# RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory -pdb-stream \
# RUN: -dbi-stream -ipi-stream %t.pdb | FileCheck %s
# RUN: llvm-pdbdump raw -section-map -section-headers %t.pdb | \
# RUN: FileCheck -check-prefix RAW %s
# CHECK: MSF:
# CHECK-NEXT: SuperBlock:
# CHECK-NEXT: BlockSize: 4096
# CHECK-NEXT: FreeBlockMap:
# CHECK-NEXT: NumBlocks: 10
# CHECK-NEXT: NumDirectoryBytes: 48
# CHECK-NEXT: Unknown1: 0
# CHECK-NEXT: BlockMapAddr: 3
# CHECK-NEXT: NumDirectoryBlocks: 1
# CHECK-NEXT: DirectoryBlocks: [ 9 ]
# CHECK-NEXT: NumStreams: 6
# CHECK-NEXT: FileSize: 40960
# CHECK-NEXT: StreamSizes: [ 0, 48, 56, 154, 56, 80 ]
# CHECK-NEXT: StreamMap:
# CHECK-NEXT: - Stream: [ ]
# CHECK-NEXT: - Stream: [ 5 ]
# CHECK-NEXT: - Stream: [ 7 ]
# CHECK-NEXT: - Stream: [ 6 ]
# CHECK-NEXT: - Stream: [ 8 ]
# CHECK-NEXT: - Stream: [ 4 ]
# CHECK-NEXT: PdbStream:
# CHECK-NEXT: Age: 1
# CHECK-NEXT: Guid: '{00000000-0000-0000-0000-000000000000}'
# CHECK-NEXT: Signature: 0
# CHECK-NEXT: Version: VC70
# CHECK-NEXT: NamedStreams:
# CHECK-NEXT: DbiStream:
# CHECK-NEXT: VerHeader: V110
# CHECK-NEXT: Age: 1
# CHECK-NEXT: BuildNumber: 0
# CHECK-NEXT: PdbDllVersion: 0
# CHECK-NEXT: PdbDllRbld: 0
# CHECK-NEXT: Flags: 0
# CHECK-NEXT: MachineType: x86
# CHECK-NEXT: IpiStream:
# CHECK-NEXT: Version: VC80
# CHECK-NEXT: Records:
# RAW: Section Map [
# RAW-NEXT: Entry {
# RAW-NEXT: Flags [ (0x10D)
# RAW-NEXT: AddressIs32Bit (0x8)
# RAW-NEXT: Execute (0x4)
# RAW-NEXT: IsSelector (0x100)
# RAW-NEXT: Read (0x1)
# RAW-NEXT: ]
# RAW-NEXT: Ovl: 0
# RAW-NEXT: Group: 0
# RAW-NEXT: Frame: 1
# RAW-NEXT: SecName: 65535
# RAW-NEXT: ClassName: 65535
# RAW-NEXT: Offset: 0
# RAW-NEXT: SecByteLength:
# RAW-NEXT: }
# RAW-NEXT: Entry {
# RAW-NEXT: Flags [ (0x109)
# RAW-NEXT: AddressIs32Bit (0x8)
# RAW-NEXT: IsSelector (0x100)
# RAW-NEXT: Read (0x1)
# RAW-NEXT: ]
# RAW-NEXT: Ovl: 0
# RAW-NEXT: Group: 0
# RAW-NEXT: Frame: 2
# RAW-NEXT: SecName: 65535
# RAW-NEXT: ClassName: 65535
# RAW-NEXT: Offset: 0
# RAW-NEXT: SecByteLength:
# RAW-NEXT: }
# RAW-NEXT: Entry {
# RAW-NEXT: Flags [ (0x208)
# RAW-NEXT: AddressIs32Bit (0x8)
# RAW-NEXT: IsAbsoluteAddress (0x200)
# RAW-NEXT: ]
# RAW-NEXT: Ovl: 0
# RAW-NEXT: Group: 0
# RAW-NEXT: Frame: 3
# RAW-NEXT: SecName: 65535
# RAW-NEXT: ClassName: 65535
# RAW-NEXT: Offset: 0
# RAW-NEXT: SecByteLength: 4294967295
# RAW-NEXT: }
# RAW-NEXT: ]
# RAW-NEXT: Section Headers [
# RAW-NEXT: {
# RAW-NEXT: Name: .text
# RAW-NEXT: Virtual Size:
# RAW-NEXT: Virtual Address:
# RAW-NEXT: Size of Raw Data:
# RAW-NEXT: File Pointer to Raw Data:
# RAW-NEXT: File Pointer to Relocations: 0
# RAW-NEXT: File Pointer to Linenumbers: 0
# RAW-NEXT: Number of Relocations: 0
# RAW-NEXT: Number of Linenumbers: 0
# RAW-NEXT: Characteristics [ (0x60000020)
# RAW-NEXT: IMAGE_SCN_CNT_CODE (0x20)
# RAW-NEXT: IMAGE_SCN_MEM_EXECUTE (0x20000000)
# RAW-NEXT: IMAGE_SCN_MEM_READ (0x40000000)
# RAW-NEXT: ]
# RAW-NEXT: }
# RAW-NEXT: {
# RAW-NEXT: Name: .rdata
# RAW-NEXT: Virtual Size:
# RAW-NEXT: Virtual Address:
# RAW-NEXT: Size of Raw Data:
# RAW-NEXT: File Pointer to Raw Data:
# RAW-NEXT: File Pointer to Relocations: 0
# RAW-NEXT: File Pointer to Linenumbers: 0
# RAW-NEXT: Number of Relocations: 0
# RAW-NEXT: Number of Linenumbers: 0
# RAW-NEXT: Characteristics [ (0x40000040)
# RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA (0x40)
# RAW-NEXT: IMAGE_SCN_MEM_READ (0x40000000)
# RAW-NEXT: ]
# RAW-NEXT: }
# RAW-NEXT: ]
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: [ ]
sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: 31C0C3
- Name: .data
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
Alignment: 4
SectionData: ''
- Name: .bss
Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
Alignment: 4
SectionData: ''
symbols:
- Name: .text
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 3
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 3963538403
Number: 1
- Name: .data
Value: 0
SectionNumber: 2
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 0
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 2
- Name: .bss
Value: 0
SectionNumber: 3
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 0
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 3
- Name: '@feat.00'
Value: 1
SectionNumber: -1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- Name: _DllMain
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
...