1 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
8 .set foo_set1, (_foo + 0xffff0000)
9 .set foo_set2, (_foo - _bar + 0xffff0000)
11 foo_equals = (_foo + 0xffff0000)
12 foo_equals2 = (_foo - _bar + 0xffff0000)
14 .globl foo_set1_global;
15 .set foo_set1_global, (_foo + 0xffff0000)
17 .globl foo_set2_global;
18 .set foo_set2_global, (_foo - _bar + 0xffff0000)
20 // CHECK: File: <stdin>
21 // CHECK: Format: Mach-O 64-bit x86-64
22 // CHECK: Arch: x86_64
23 // CHECK: AddressSize: 64bit
24 // CHECK: MachHeader {
25 // CHECK: Magic: Magic64 (0xFEEDFACF)
26 // CHECK: CpuType: X86-64 (0x1000007)
27 // CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
28 // CHECK: FileType: Relocatable (0x1)
29 // CHECK: NumOfLoadCommands: 4
30 // CHECK: SizeOfLoadCommands: 272
31 // CHECK: Flags [ (0x0)
33 // CHECK: Reserved: 0x0
38 // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
39 // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
40 // CHECK: Address: 0x0
43 // CHECK: Alignment: 0
44 // CHECK: RelocationOffset: 0x0
45 // CHECK: RelocationCount: 0
47 // CHECK: Attributes [ (0x800004)
48 // CHECK: PureInstructions (0x800000)
49 // CHECK: SomeInstructions (0x4)
51 // CHECK: Reserved1: 0x0
52 // CHECK: Reserved2: 0x0
53 // CHECK: Reserved3: 0x0
56 // CHECK: Relocations [
60 // CHECK: Name: _bar (12)
61 // CHECK: Type: Section (0xE)
62 // CHECK: Section: __text (0x1)
63 // CHECK: RefType: UndefinedNonLazy (0x0)
64 // CHECK: Flags [ (0x0)
69 // CHECK: Name: _foo (17)
70 // CHECK: Type: Section (0xE)
71 // CHECK: Section: __text (0x1)
72 // CHECK: RefType: UndefinedNonLazy (0x0)
73 // CHECK: Flags [ (0x0)
78 // CHECK: Name: foo_set1 (75)
79 // CHECK: Type: Section (0xE)
80 // CHECK: Section: __text (0x1)
81 // CHECK: RefType: UndefinedNonLazy (0x0)
82 // CHECK: Flags [ (0x20)
83 // CHECK: NoDeadStrip (0x20)
85 // CHECK: Value: 0xFFFF0001
88 // CHECK: Name: foo_set2 (54)
89 // CHECK: Type: Abs (0x2)
90 // CHECK: Section: (0x0)
91 // CHECK: RefType: UndefinedNonLazy (0x0)
92 // CHECK: Flags [ (0x20)
93 // CHECK: NoDeadStrip (0x20)
95 // CHECK: Value: 0xFFFF0001
98 // CHECK: Name: foo_equals (1)
99 // CHECK: Type: Section (0xE)
100 // CHECK: Section: __text (0x1)
101 // CHECK: RefType: UndefinedNonLazy (0x0)
102 // CHECK: Flags [ (0x0)
104 // CHECK: Value: 0xFFFF0001
107 // CHECK: Name: foo_equals2 (63)
108 // CHECK: Type: Abs (0x2)
109 // CHECK: Section: (0x0)
110 // CHECK: RefType: UndefinedNonLazy (0x0)
111 // CHECK: Flags [ (0x0)
113 // CHECK: Value: 0xFFFF0001
116 // CHECK: Name: foo_set1_global (38)
118 // CHECK: Type: Section (0xE)
119 // CHECK: Section: __text (0x1)
120 // CHECK: RefType: UndefinedNonLazy (0x0)
121 // CHECK: Flags [ (0x20)
122 // CHECK: NoDeadStrip (0x20)
124 // CHECK: Value: 0xFFFF0001
127 // CHECK: Name: foo_set2_global (22)
129 // CHECK: Type: Abs (0x2)
130 // CHECK: Section: (0x0)
131 // CHECK: RefType: UndefinedNonLazy (0x0)
132 // CHECK: Flags [ (0x20)
133 // CHECK: NoDeadStrip (0x20)
135 // CHECK: Value: 0xFFFF0001
138 // CHECK: Indirect Symbols {
144 // CHECK: Cmd: LC_SEGMENT_64
147 // CHECK: vmaddr: 0x0
148 // CHECK: vmsize: 0x2
149 // CHECK: fileoff: 304
150 // CHECK: filesize: 2
151 // CHECK: maxprot: rwx
152 // CHECK: initprot: rwx
157 // CHECK: ilocalsym: 0
158 // CHECK: nlocalsym: 6
159 // CHECK: iextdefsym: 6
160 // CHECK: nextdefsym: 2
161 // CHECK: iundefsym: 8
162 // CHECK: nundefsym: 0
165 // CHECK: modtaboff: 0
167 // CHECK: extrefsymoff: 0
168 // CHECK: nextrefsyms: 0
169 // CHECK: indirectsymoff: 0
170 // CHECK: nindirectsyms: 0
171 // CHECK: extreloff: 0
173 // CHECK: locreloff: 0