dep-modules.yaml 5.69 KB
# REQUIRES: lld
# RUN: yaml2obj < %p/export-dllfunc.yaml > %t.export-dllfunc.obj
# RUN: yaml2obj < %s > %t.obj
#
# RUN: lld-link /machine:x64 /out:%t.export-dllfunc.dll /noentry /nodefaultlib /dll %t.export-dllfunc.obj /export:DllFunc
# RUN: lld-link /out:%t.exe %t.obj %t.export-dllfunc.lib /nodefaultlib /entry:main /include:DllFunc
#
# RUN: lldb-test object-file -dep-modules %t.exe | FileCheck -check-prefix=DEPS %s


# DEPS: Showing 1 dependent module(s)

# Ignore checking the directory and any tentative string in the path.
# DEPS:   Name: {{.*}}dep-modules.yaml.{{.*}}export-dllfunc.dll


--- !COFF
header:          
  Machine:         IMAGE_FILE_MACHINE_AMD64
  Characteristics: [  ]
sections:        
  - Name:            .text
    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
    Alignment:       16
    SectionData:     4883EC48C7442444000000004889542438894C2434B904000000E80000000089442430B908000000E8000000008944242C8B4424300344242C4883C448C3
    Relocations:     
      - VirtualAddress:  27
        SymbolName:      'DllFunc'
        Type:            IMAGE_REL_AMD64_REL32
      - VirtualAddress:  41
        SymbolName:      'DllFunc'
        Type:            IMAGE_REL_AMD64_REL32
  - 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:     ''
  - Name:            .xdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    Alignment:       4
    SectionData:     '0104010004820000'
  - Name:            .drectve
    Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
    Alignment:       1
    SectionData:     202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
  - Name:            .pdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    Alignment:       4
    SectionData:     '000000003E00000000000000'
    Relocations:     
      - VirtualAddress:  0
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_ADDR32NB
      - VirtualAddress:  4
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_ADDR32NB
      - VirtualAddress:  8
        SymbolName:      .xdata
        Type:            IMAGE_REL_AMD64_ADDR32NB
  - Name:            .llvm_addrsig
    Characteristics: [ IMAGE_SCN_LNK_REMOVE ]
    Alignment:       1
    SectionData:     '10'
symbols:         
  - Name:            .text
    Value:           0
    SectionNumber:   1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition: 
      Length:          62
      NumberOfRelocations: 2
      NumberOfLinenumbers: 0
      CheckSum:        373303044
      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:            .xdata
    Value:           0
    SectionNumber:   4
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition: 
      Length:          8
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        2657791889
      Number:          4
  - Name:            .drectve
    Value:           0
    SectionNumber:   5
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition: 
      Length:          48
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        149686238
      Number:          5
  - Name:            .pdata
    Value:           0
    SectionNumber:   6
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition: 
      Length:          12
      NumberOfRelocations: 3
      NumberOfLinenumbers: 0
      CheckSum:        2420588879
      Number:          6
  - Name:            .llvm_addrsig
    Value:           0
    SectionNumber:   7
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition: 
      Length:          1
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        498536548
      Number:          7
  - Name:            '@feat.00'
    Value:           0
    SectionNumber:   -1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
  - Name:            main
    Value:           0
    SectionNumber:   1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
  - Name:            'DllFunc'
    Value:           0
    SectionNumber:   0
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
...