1# RUN: mkdir -p %t.dir 2# RUN: yaml2obj %p/Inputs/delayimports-error.yaml -o %t1.obj 3# RUN: lld-link /out:%t.dir/foo.dll /dll %t1.obj /export:datasym,DATA /noentry 4 5# RUN: yaml2obj %s -o %t2.obj 6# RUN: env LLD_IN_TEST=1 not lld-link /out:%t.exe /entry:main %t2.obj \ 7# RUN: %t.dir/foo.lib /delayload:foo.dll \ 8# RUN: /alternatename:__delayLoadHelper2=main /opt:noref >& %t.log 9# RUN: FileCheck %s < %t.log 10 11# CHECK: cannot delay-load foo.dll due to import of data: __declspec(dllimport) datasym 12 13--- !COFF 14header: 15 Machine: IMAGE_FILE_MACHINE_AMD64 16 Characteristics: [] 17sections: 18 - Name: .text 19 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ] 20 Alignment: 16 21 SectionData: 0000000000000000 22symbols: 23 - Name: .text 24 Value: 0 25 SectionNumber: 1 26 SimpleType: IMAGE_SYM_TYPE_NULL 27 ComplexType: IMAGE_SYM_DTYPE_NULL 28 StorageClass: IMAGE_SYM_CLASS_STATIC 29 SectionDefinition: 30 Length: 8 31 NumberOfRelocations: 0 32 NumberOfLinenumbers: 0 33 CheckSum: 0 34 Number: 0 35 - Name: main 36 Value: 0 37 SectionNumber: 1 38 SimpleType: IMAGE_SYM_TYPE_NULL 39 ComplexType: IMAGE_SYM_DTYPE_FUNCTION 40 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 41 - Name: __imp_datasym 42 Value: 0 43 SectionNumber: 0 44 SimpleType: IMAGE_SYM_TYPE_NULL 45 ComplexType: IMAGE_SYM_DTYPE_NULL 46 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 47... 48