Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-readobj / bigobj.test
blob10972144315d161882e0b54fb14043f0d892299a
1 RUN: llvm-readobj --file-headers --sections --symbols --relocations %p/Inputs/bigobj.coff-x86-64 | FileCheck %s
3 CHECK:      File: {{(.*[/\\])?}}bigobj.coff-x86-64
4 CHECK-NEXT: Format: COFF-x86-64
5 CHECK-NEXT: Arch: x86_64
6 CHECK-NEXT: AddressSize: 64bit
7 CHECK-NEXT: ImageFileHeader {
8 CHECK-NEXT:   Machine: IMAGE_FILE_MACHINE_AMD64 (0x8664)
9 CHECK-NEXT:   SectionCount: 3
10 CHECK-NEXT:   TimeDateStamp: 1970-01-01 00:00:00 (0x0)
11 CHECK-NEXT:   PointerToSymbolTable: 0xB0
12 CHECK-NEXT:   SymbolCount: 8
13 CHECK-NEXT:   OptionalHeaderSize: 0
14 CHECK-NEXT:   Characteristics [ (0x0)
15 CHECK-NEXT:   ]
16 CHECK-NEXT: }
17 CHECK-NEXT: Sections [
18 CHECK-NEXT:   Section {
19 CHECK-NEXT:     Number: 1
20 CHECK-NEXT:     Name: .text (2E 74 65 78 74 00 00 00)
21 CHECK-NEXT:     VirtualSize: 0x0
22 CHECK-NEXT:     VirtualAddress: 0x0
23 CHECK-NEXT:     RawDataSize: 0
24 CHECK-NEXT:     PointerToRawData: 0x0
25 CHECK-NEXT:     PointerToRelocations: 0x0
26 CHECK-NEXT:     PointerToLineNumbers: 0x0
27 CHECK-NEXT:     RelocationCount: 0
28 CHECK-NEXT:     LineNumberCount: 0
29 CHECK-NEXT:     Characteristics [ (0x60500020)
30 CHECK-NEXT:       IMAGE_SCN_ALIGN_16BYTES (0x500000)
31 CHECK-NEXT:       IMAGE_SCN_CNT_CODE (0x20)
32 CHECK-NEXT:       IMAGE_SCN_MEM_EXECUTE (0x20000000)
33 CHECK-NEXT:       IMAGE_SCN_MEM_READ (0x40000000)
34 CHECK-NEXT:     ]
35 CHECK-NEXT:   }
36 CHECK-NEXT:   Section {
37 CHECK-NEXT:     Number: 2
38 CHECK-NEXT:     Name: .data (2E 64 61 74 61 00 00 00)
39 CHECK-NEXT:     VirtualSize: 0x0
40 CHECK-NEXT:     VirtualAddress: 0x0
41 CHECK-NEXT:     RawDataSize: 0
42 CHECK-NEXT:     PointerToRawData: 0x0
43 CHECK-NEXT:     PointerToRelocations: 0x0
44 CHECK-NEXT:     PointerToLineNumbers: 0x0
45 CHECK-NEXT:     RelocationCount: 0
46 CHECK-NEXT:     LineNumberCount: 0
47 CHECK-NEXT:     Characteristics [ (0xC0500040)
48 CHECK-NEXT:       IMAGE_SCN_ALIGN_16BYTES (0x500000)
49 CHECK-NEXT:       IMAGE_SCN_CNT_INITIALIZED_DATA (0x40)
50 CHECK-NEXT:       IMAGE_SCN_MEM_READ (0x40000000)
51 CHECK-NEXT:       IMAGE_SCN_MEM_WRITE (0x80000000)
52 CHECK-NEXT:     ]
53 CHECK-NEXT:   }
54 CHECK-NEXT:   Section {
55 CHECK-NEXT:     Number: 3
56 CHECK-NEXT:     Name: .bss (2E 62 73 73 00 00 00 00)
57 CHECK-NEXT:     VirtualSize: 0x0
58 CHECK-NEXT:     VirtualAddress: 0x0
59 CHECK-NEXT:     RawDataSize: 0
60 CHECK-NEXT:     PointerToRawData: 0x0
61 CHECK-NEXT:     PointerToRelocations: 0x0
62 CHECK-NEXT:     PointerToLineNumbers: 0x0
63 CHECK-NEXT:     RelocationCount: 0
64 CHECK-NEXT:     LineNumberCount: 0
65 CHECK-NEXT:     Characteristics [ (0xC0500080)
66 CHECK-NEXT:       IMAGE_SCN_ALIGN_16BYTES (0x500000)
67 CHECK-NEXT:       IMAGE_SCN_CNT_UNINITIALIZED_DATA (0x80)
68 CHECK-NEXT:       IMAGE_SCN_MEM_READ (0x40000000)
69 CHECK-NEXT:       IMAGE_SCN_MEM_WRITE (0x80000000)
70 CHECK-NEXT:     ]
71 CHECK-NEXT:   }
72 CHECK-NEXT: ]
73 CHECK-NEXT: Relocations [
74 CHECK-NEXT: ]
75 CHECK-NEXT: Symbols [
76 CHECK-NEXT:   Symbol {
77 CHECK-NEXT:     Name: .file
78 CHECK-NEXT:     Value: 0
79 CHECK-NEXT:     Section:  IMAGE_SYM_DEBUG (-2)
80 CHECK-NEXT:     BaseType: Null (0x0)
81 CHECK-NEXT:     ComplexType: Null (0x0)
82 CHECK-NEXT:     StorageClass: File (0x67)
83 CHECK-NEXT:     AuxSymbolCount: 1
84 CHECK-NEXT:     AuxFileRecord {
85 CHECK-NEXT:       FileName: fake
86 CHECK-NEXT:     }
87 CHECK-NEXT:   }
88 CHECK-NEXT:   Symbol {
89 CHECK-NEXT:     Name: .text
90 CHECK-NEXT:     Value: 0
91 CHECK-NEXT:     Section: .text (1)
92 CHECK-NEXT:     BaseType: Null (0x0)
93 CHECK-NEXT:     ComplexType: Null (0x0)
94 CHECK-NEXT:     StorageClass: Static (0x3)
95 CHECK-NEXT:     AuxSymbolCount: 1
96 CHECK-NEXT:     AuxSectionDef {
97 CHECK-NEXT:       Length: 0
98 CHECK-NEXT:       RelocationCount: 0
99 CHECK-NEXT:       LineNumberCount: 0
100 CHECK-NEXT:       Checksum: 0x0
101 CHECK-NEXT:       Number: 0
102 CHECK-NEXT:       Selection: 0x0
103 CHECK-NEXT:     }
104 CHECK-NEXT:   }
105 CHECK-NEXT:   Symbol {
106 CHECK-NEXT:     Name: .data
107 CHECK-NEXT:     Value: 0
108 CHECK-NEXT:     Section: .data (2)
109 CHECK-NEXT:     BaseType: Null (0x0)
110 CHECK-NEXT:     ComplexType: Null (0x0)
111 CHECK-NEXT:     StorageClass: Static (0x3)
112 CHECK-NEXT:     AuxSymbolCount: 1
113 CHECK-NEXT:     AuxSectionDef {
114 CHECK-NEXT:       Length: 0
115 CHECK-NEXT:       RelocationCount: 0
116 CHECK-NEXT:       LineNumberCount: 0
117 CHECK-NEXT:       Checksum: 0x0
118 CHECK-NEXT:       Number: 0
119 CHECK-NEXT:       Selection: 0x0
120 CHECK-NEXT:     }
121 CHECK-NEXT:   }
122 CHECK-NEXT:   Symbol {
123 CHECK-NEXT:     Name: .bss
124 CHECK-NEXT:     Value: 0
125 CHECK-NEXT:     Section: .bss (3)
126 CHECK-NEXT:     BaseType: Null (0x0)
127 CHECK-NEXT:     ComplexType: Null (0x0)
128 CHECK-NEXT:     StorageClass: Static (0x3)
129 CHECK-NEXT:     AuxSymbolCount: 1
130 CHECK-NEXT:     AuxSectionDef {
131 CHECK-NEXT:       Length: 0
132 CHECK-NEXT:       RelocationCount: 0
133 CHECK-NEXT:       LineNumberCount: 0
134 CHECK-NEXT:       Checksum: 0x0
135 CHECK-NEXT:       Number: 0
136 CHECK-NEXT:       Selection: 0x0
137 CHECK-NEXT:     }
138 CHECK-NEXT:   }
139 CHECK-NEXT: ]