1 # RUN: yaml2obj %s | llvm-readobj --file-headers -r --expand-relocs - | FileCheck %s --check-prefix COFF-I386
2 # RUN: yaml2obj -o %t %s
3 # RUN: llvm-readobj --file-headers -r --expand-relocs %t | FileCheck %s --check-prefix COFF-I386
5 # COFF-I386: Characteristics [ (0x200)
6 # COFF-I386-NEXT: IMAGE_FILE_DEBUG_STRIPPED (0x200)
9 # COFF-I386: Relocations [
10 # COFF-I386-NEXT: Section (1) .text {
11 # COFF-I386-NEXT: Relocation {
12 # COFF-I386-NEXT: Offset: 0xE
13 # COFF-I386-NEXT: Type: IMAGE_REL_I386_DIR32 (6)
14 # COFF-I386-NEXT: Symbol: L_.str
15 # COFF-I386-NEXT: SymbolIndex: 5
17 # COFF-I386-NEXT: Relocation {
18 # COFF-I386-NEXT: Offset: 0x13
19 # COFF-I386-NEXT: Type: IMAGE_REL_I386_REL32 (20)
20 # COFF-I386-NEXT: Symbol: _puts
21 # COFF-I386-NEXT: SymbolIndex: 6
23 # COFF-I386-NEXT: Relocation {
24 # COFF-I386-NEXT: Offset: 0x18
25 # COFF-I386-NEXT: Type: IMAGE_REL_I386_REL32 (20)
26 # COFF-I386-NEXT: Symbol: _SomeOtherFunction
27 # COFF-I386-NEXT: SymbolIndex: 7
34 Machine: IMAGE_FILE_MACHINE_I386 # (0x14c)
35 Characteristics: [ IMAGE_FILE_DEBUG_STRIPPED ]
41 Characteristics: [IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ, ] # 0x60500020
42 SectionData: !hex "83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3" # |....D$.......$...............D$.....|
48 Type: IMAGE_REL_I386_DIR32
53 Type: IMAGE_REL_I386_REL32
57 SymbolName: _SomeOtherFunction
58 Type: IMAGE_REL_I386_REL32
63 Characteristics: [IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE, ] # 0xc0100040
64 SectionData: !hex "48656C6C6F20576F726C642100" # |Hello World!.|
71 SimpleType: IMAGE_SYM_TYPE_NULL # (0)
72 ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
73 StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
76 NumberOfRelocations: 3
77 NumberOfLinenumbers: 0
85 SimpleType: IMAGE_SYM_TYPE_NULL # (0)
86 ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
87 StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
90 NumberOfRelocations: 0
91 NumberOfLinenumbers: 0
99 SimpleType: IMAGE_SYM_TYPE_NULL # (0)
100 ComplexType: IMAGE_SYM_DTYPE_FUNCTION # (2)
101 StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
107 SimpleType: IMAGE_SYM_TYPE_NULL # (0)
108 ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
109 StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
115 SimpleType: IMAGE_SYM_TYPE_NULL # (0)
116 ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
117 StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
120 Name: _SomeOtherFunction
123 SimpleType: IMAGE_SYM_TYPE_NULL # (0)
124 ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
125 StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)