[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / Object / yaml2obj-readobj.test
blobee938e87635f0a1fcd2f68381675a56c16e98de8
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)
7 # COFF-I386-NEXT:  ]
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
16 # COFF-I386-NEXT:     }
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
22 # COFF-I386-NEXT:     }
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
28 # COFF-I386-NEXT:     }
29 # COFF-I386-NEXT:   }
30 # COFF-I386-NEXT: ]
32 !COFF
33 header: !Header
34   Machine: IMAGE_FILE_MACHINE_I386 # (0x14c)
35   Characteristics: [ IMAGE_FILE_DEBUG_STRIPPED ]
37 sections:
38   - !Section
39     Name: .text
40     Alignment: 16
41     Characteristics: [IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ, ] # 0x60500020
42     SectionData:  !hex "83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3" # |....D$.......$...............D$.....|
44     Relocations:
45       - !Relocation
46         VirtualAddress: 0xe
47         SymbolName: L_.str
48         Type: IMAGE_REL_I386_DIR32
50       - !Relocation
51         VirtualAddress: 0x13
52         SymbolName: _puts
53         Type: IMAGE_REL_I386_REL32
55       - !Relocation
56         VirtualAddress: 0x18
57         SymbolName: _SomeOtherFunction
58         Type: IMAGE_REL_I386_REL32
60   - !Section
61     Name: .data
62     Alignment: 1
63     Characteristics: [IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE, ] # 0xc0100040
64     SectionData:  !hex "48656C6C6F20576F726C642100" # |Hello World!.|
66 symbols:
67   - !Symbol
68     Name: .text
69     Value: 0
70     SectionNumber: 1
71     SimpleType: IMAGE_SYM_TYPE_NULL # (0)
72     ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
73     StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
74     SectionDefinition:
75       Length:              36
76       NumberOfRelocations: 3
77       NumberOfLinenumbers: 0
78       CheckSum:            0
79       Number:              1
81   - !Symbol
82     Name: .data
83     Value: 0
84     SectionNumber: 2
85     SimpleType: IMAGE_SYM_TYPE_NULL # (0)
86     ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
87     StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
88     SectionDefinition:
89       Length:              13
90       NumberOfRelocations: 0
91       NumberOfLinenumbers: 0
92       CheckSum:            0
93       Number:              2
95   - !Symbol
96     Name: _main
97     Value: 0
98     SectionNumber: 1
99     SimpleType: IMAGE_SYM_TYPE_NULL # (0)
100     ComplexType: IMAGE_SYM_DTYPE_FUNCTION # (2)
101     StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
103   - !Symbol
104     Name: L_.str
105     Value: 0
106     SectionNumber: 2
107     SimpleType: IMAGE_SYM_TYPE_NULL # (0)
108     ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
109     StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
111   - !Symbol
112     Name: _puts
113     Value: 0
114     SectionNumber: 0
115     SimpleType: IMAGE_SYM_TYPE_NULL # (0)
116     ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
117     StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
119   - !Symbol
120     Name: _SomeOtherFunction
121     Value: 0
122     SectionNumber: 0
123     SimpleType: IMAGE_SYM_TYPE_NULL # (0)
124     ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
125     StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)