1# REQUIRES: x86 2 3# RUN: yaml2obj %s -o %t.o 4 5# Test that we get both the resource and the code from a single object 6# file that contains both, while merging resources from another object 7# file. 8 9# RUN: lld-link -lldmingw -out:%t.exe %t.o %p/Inputs/id.res.o -entry:main 10# RUN: llvm-readobj --coff-resources %t.exe | FileCheck %s --check-prefix=CHECK-RESOURCES 11# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefix=CHECK-DISASM 12 13# CHECK-RESOURCES: Resources [ 14# CHECK-RESOURCES-NEXT: Total Number of Resources: 2 15 16# CHECK-DISASM: <.text>: 17# CHECK-DISASM-NEXT: movl $42, %eax 18# CHECK-DISASM-NEXT: retq 19 20--- !COFF 21header: 22 Machine: IMAGE_FILE_MACHINE_AMD64 23 Characteristics: [ IMAGE_FILE_LINE_NUMS_STRIPPED ] 24sections: 25 - Name: .rsrc 26 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ] 27 Alignment: 4 28 SectionData: 0000000000000000000000000000010005000000180000800000000000000000000000000100000048000080300000800000000000000000000000000000010009040000600000000A0054004500530054004400490041004C004F0047000000700000006C00000000000000000000000000C0800000000002000A000A00C8002C01000000005400650073007400000001000250000000000A000A00E6000E000100FFFF820043006F006E00740069006E00750065003A0000000000000001500000000042008600A1000D000200FFFF800026004F004B000000000000000000 29 Relocations: 30 - VirtualAddress: 96 31 SymbolName: .rsrc 32 Type: IMAGE_REL_AMD64_ADDR32NB 33 - Name: '.text' 34 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ] 35 Alignment: 16 36 SectionData: B82A000000C3 37symbols: 38 - Name: .rsrc 39 Value: 0 40 SectionNumber: 1 41 SimpleType: IMAGE_SYM_TYPE_NULL 42 ComplexType: IMAGE_SYM_DTYPE_NULL 43 StorageClass: IMAGE_SYM_CLASS_STATIC 44 - Name: '.text' 45 Value: 0 46 SectionNumber: 2 47 SimpleType: IMAGE_SYM_TYPE_NULL 48 ComplexType: IMAGE_SYM_DTYPE_NULL 49 StorageClass: IMAGE_SYM_CLASS_STATIC 50 SectionDefinition: 51 Length: 6 52 NumberOfRelocations: 0 53 NumberOfLinenumbers: 0 54 CheckSum: 0 55 Number: 0 56 - Name: main 57 Value: 0 58 SectionNumber: 2 59 SimpleType: IMAGE_SYM_TYPE_NULL 60 ComplexType: IMAGE_SYM_DTYPE_FUNCTION 61 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 62... 63