1# REQUIRES: lld 2# RUN: yaml2obj %p/export-dllfunc.yaml -o %t.export-dllfunc.obj 3# RUN: yaml2obj %s -o %t.obj 4# 5# RUN: lld-link /machine:x64 /out:%t.export-dllfunc.dll /noentry /nodefaultlib /dll %t.export-dllfunc.obj /export:DllFunc 6# RUN: lld-link /out:%t.exe %t.obj %t.export-dllfunc.lib /nodefaultlib /entry:main /include:DllFunc 7# 8# RUN: lldb-test object-file -dep-modules %t.exe | FileCheck -check-prefix=DEPS %s 9 10 11# DEPS: Showing 1 dependent module(s) 12 13# Ignore checking the directory and any tentative string in the path. 14# DEPS: Name: {{.*}}dep-modules.yaml.{{.*}}export-dllfunc.dll 15 16 17--- !COFF 18header: 19 Machine: IMAGE_FILE_MACHINE_AMD64 20 Characteristics: [ ] 21sections: 22 - Name: .text 23 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ] 24 Alignment: 16 25 SectionData: 4883EC48C7442444000000004889542438894C2434B904000000E80000000089442430B908000000E8000000008944242C8B4424300344242C4883C448C3 26 Relocations: 27 - VirtualAddress: 27 28 SymbolName: 'DllFunc' 29 Type: IMAGE_REL_AMD64_REL32 30 - VirtualAddress: 41 31 SymbolName: 'DllFunc' 32 Type: IMAGE_REL_AMD64_REL32 33 - Name: .data 34 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ] 35 Alignment: 4 36 SectionData: '' 37 - Name: .bss 38 Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ] 39 Alignment: 4 40 SectionData: '' 41 - Name: .xdata 42 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] 43 Alignment: 4 44 SectionData: '0104010004820000' 45 - Name: .drectve 46 Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ] 47 Alignment: 1 48 SectionData: 202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962 49 - Name: .pdata 50 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] 51 Alignment: 4 52 SectionData: '000000003E00000000000000' 53 Relocations: 54 - VirtualAddress: 0 55 SymbolName: main 56 Type: IMAGE_REL_AMD64_ADDR32NB 57 - VirtualAddress: 4 58 SymbolName: main 59 Type: IMAGE_REL_AMD64_ADDR32NB 60 - VirtualAddress: 8 61 SymbolName: .xdata 62 Type: IMAGE_REL_AMD64_ADDR32NB 63 - Name: .llvm_addrsig 64 Characteristics: [ IMAGE_SCN_LNK_REMOVE ] 65 Alignment: 1 66 SectionData: '10' 67symbols: 68 - Name: .text 69 Value: 0 70 SectionNumber: 1 71 SimpleType: IMAGE_SYM_TYPE_NULL 72 ComplexType: IMAGE_SYM_DTYPE_NULL 73 StorageClass: IMAGE_SYM_CLASS_STATIC 74 SectionDefinition: 75 Length: 62 76 NumberOfRelocations: 2 77 NumberOfLinenumbers: 0 78 CheckSum: 373303044 79 Number: 1 80 - Name: .data 81 Value: 0 82 SectionNumber: 2 83 SimpleType: IMAGE_SYM_TYPE_NULL 84 ComplexType: IMAGE_SYM_DTYPE_NULL 85 StorageClass: IMAGE_SYM_CLASS_STATIC 86 SectionDefinition: 87 Length: 0 88 NumberOfRelocations: 0 89 NumberOfLinenumbers: 0 90 CheckSum: 0 91 Number: 2 92 - Name: .bss 93 Value: 0 94 SectionNumber: 3 95 SimpleType: IMAGE_SYM_TYPE_NULL 96 ComplexType: IMAGE_SYM_DTYPE_NULL 97 StorageClass: IMAGE_SYM_CLASS_STATIC 98 SectionDefinition: 99 Length: 0 100 NumberOfRelocations: 0 101 NumberOfLinenumbers: 0 102 CheckSum: 0 103 Number: 3 104 - Name: .xdata 105 Value: 0 106 SectionNumber: 4 107 SimpleType: IMAGE_SYM_TYPE_NULL 108 ComplexType: IMAGE_SYM_DTYPE_NULL 109 StorageClass: IMAGE_SYM_CLASS_STATIC 110 SectionDefinition: 111 Length: 8 112 NumberOfRelocations: 0 113 NumberOfLinenumbers: 0 114 CheckSum: 2657791889 115 Number: 4 116 - Name: .drectve 117 Value: 0 118 SectionNumber: 5 119 SimpleType: IMAGE_SYM_TYPE_NULL 120 ComplexType: IMAGE_SYM_DTYPE_NULL 121 StorageClass: IMAGE_SYM_CLASS_STATIC 122 SectionDefinition: 123 Length: 48 124 NumberOfRelocations: 0 125 NumberOfLinenumbers: 0 126 CheckSum: 149686238 127 Number: 5 128 - Name: .pdata 129 Value: 0 130 SectionNumber: 6 131 SimpleType: IMAGE_SYM_TYPE_NULL 132 ComplexType: IMAGE_SYM_DTYPE_NULL 133 StorageClass: IMAGE_SYM_CLASS_STATIC 134 SectionDefinition: 135 Length: 12 136 NumberOfRelocations: 3 137 NumberOfLinenumbers: 0 138 CheckSum: 2420588879 139 Number: 6 140 - Name: .llvm_addrsig 141 Value: 0 142 SectionNumber: 7 143 SimpleType: IMAGE_SYM_TYPE_NULL 144 ComplexType: IMAGE_SYM_DTYPE_NULL 145 StorageClass: IMAGE_SYM_CLASS_STATIC 146 SectionDefinition: 147 Length: 1 148 NumberOfRelocations: 0 149 NumberOfLinenumbers: 0 150 CheckSum: 498536548 151 Number: 7 152 - Name: '@feat.00' 153 Value: 0 154 SectionNumber: -1 155 SimpleType: IMAGE_SYM_TYPE_NULL 156 ComplexType: IMAGE_SYM_DTYPE_NULL 157 StorageClass: IMAGE_SYM_CLASS_STATIC 158 - Name: main 159 Value: 0 160 SectionNumber: 1 161 SimpleType: IMAGE_SYM_TYPE_NULL 162 ComplexType: IMAGE_SYM_DTYPE_FUNCTION 163 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 164 - Name: 'DllFunc' 165 Value: 0 166 SectionNumber: 0 167 SimpleType: IMAGE_SYM_TYPE_NULL 168 ComplexType: IMAGE_SYM_DTYPE_NULL 169 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 170... 171