[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / MachO / section-align-2.s
blob39215e20d5755300e9c148c5fdde45770597416c
1 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
3 .byte 0
5 // There should be 3 padding bytes here.
7 .data
8 .align 2
9 foo:
10 .org 8
11 bar:
12 .byte 0
14 .const
15 baz:
17 // CHECK: File: <stdin>
18 // CHECK: Format: Mach-O 32-bit i386
19 // CHECK: Arch: i386
20 // CHECK: AddressSize: 32bit
21 // CHECK: MachHeader {
22 // CHECK: Magic: Magic (0xFEEDFACE)
23 // CHECK: CpuType: X86 (0x7)
24 // CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
25 // CHECK: FileType: Relocatable (0x1)
26 // CHECK: NumOfLoadCommands: 4
27 // CHECK: SizeOfLoadCommands: 380
28 // CHECK: Flags [ (0x0)
29 // CHECK: ]
30 // CHECK: }
31 // CHECK: Sections [
32 // CHECK: Section {
33 // CHECK: Index: 0
34 // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
35 // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
36 // CHECK: Address: 0x0
37 // CHECK: Size: 0x1
38 // CHECK: Offset: 408
39 // CHECK: Alignment: 0
40 // CHECK: RelocationOffset: 0x0
41 // CHECK: RelocationCount: 0
42 // CHECK: Type: Regular (0x0)
43 // CHECK: Attributes [ (0x800000)
44 // CHECK: PureInstructions (0x800000)
45 // CHECK: ]
46 // CHECK: Reserved1: 0x0
47 // CHECK: Reserved2: 0x0
48 // CHECK: }
49 // CHECK: Section {
50 // CHECK: Index: 1
51 // CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
52 // CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
53 // CHECK: Address: 0x4
54 // CHECK: Size: 0x9
55 // CHECK: Offset: 412
56 // CHECK: Alignment: 2
57 // CHECK: RelocationOffset: 0x0
58 // CHECK: RelocationCount: 0
59 // CHECK: Type: Regular (0x0)
60 // CHECK: Attributes [ (0x0)
61 // CHECK: ]
62 // CHECK: Reserved1: 0x0
63 // CHECK: Reserved2: 0x0
64 // CHECK: }
65 // CHECK: Section {
66 // CHECK: Index: 2
67 // CHECK: Name: __const (5F 5F 63 6F 6E 73 74 00 00 00 00 00 00 00 00 00)
68 // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
69 // CHECK: Address: 0xD
70 // CHECK: Size: 0x0
71 // CHECK: Offset: 421
72 // CHECK: Alignment: 0
73 // CHECK: RelocationOffset: 0x0
74 // CHECK: RelocationCount: 0
75 // CHECK: Type: Regular (0x0)
76 // CHECK: Attributes [ (0x0)
77 // CHECK: ]
78 // CHECK: Reserved1: 0x0
79 // CHECK: Reserved2: 0x0
80 // CHECK: }
81 // CHECK: ]
82 // CHECK: Relocations [
83 // CHECK: ]
84 // CHECK: Symbols [
85 // CHECK: Symbol {
86 // CHECK: Name: foo (9)
87 // CHECK: Type: Section (0xE)
88 // CHECK: Section: __data (0x2)
89 // CHECK: RefType: UndefinedNonLazy (0x0)
90 // CHECK: Flags [ (0x0)
91 // CHECK: ]
92 // CHECK: Value: 0x4
93 // CHECK: }
94 // CHECK: Symbol {
95 // CHECK: Name: bar (5)
96 // CHECK: Type: Section (0xE)
97 // CHECK: Section: __data (0x2)
98 // CHECK: RefType: UndefinedNonLazy (0x0)
99 // CHECK: Flags [ (0x0)
100 // CHECK: ]
101 // CHECK: Value: 0xC
102 // CHECK: }
103 // CHECK: Symbol {
104 // CHECK: Name: baz (1)
105 // CHECK: Type: Section (0xE)
106 // CHECK: Section: __const (0x3)
107 // CHECK: RefType: UndefinedNonLazy (0x0)
108 // CHECK: Flags [ (0x0)
109 // CHECK: ]
110 // CHECK: Value: 0xD
111 // CHECK: }
112 // CHECK: ]
113 // CHECK: Indirect Symbols {
114 // CHECK: Number: 0
115 // CHECK: Symbols [
116 // CHECK: ]
117 // CHECK: }
118 // CHECK: Segment {
119 // CHECK: Cmd: LC_SEGMENT
120 // CHECK: Name:
121 // CHECK: Size: 260
122 // CHECK: vmaddr: 0x0
123 // CHECK: vmsize: 0xD
124 // CHECK: fileoff: 408
125 // CHECK: filesize: 13
126 // CHECK: maxprot: rwx
127 // CHECK: initprot: rwx
128 // CHECK: nsects: 3
129 // CHECK: flags: 0x0
130 // CHECK: }
131 // CHECK: Dysymtab {
132 // CHECK: ilocalsym: 0
133 // CHECK: nlocalsym: 3
134 // CHECK: iextdefsym: 3
135 // CHECK: nextdefsym: 0
136 // CHECK: iundefsym: 3
137 // CHECK: nundefsym: 0
138 // CHECK: tocoff: 0
139 // CHECK: ntoc: 0
140 // CHECK: modtaboff: 0
141 // CHECK: nmodtab: 0
142 // CHECK: extrefsymoff: 0
143 // CHECK: nextrefsyms: 0
144 // CHECK: indirectsymoff: 0
145 // CHECK: nindirectsyms: 0
146 // CHECK: extreloff: 0
147 // CHECK: nextrel: 0
148 // CHECK: locreloff: 0
149 // CHECK: nlocrel: 0
150 // CHECK: }