1 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s
5 .globl sym_globl_undef_B
8 .globl sym_globl_undef_A
10 .globl sym_globl_def_C
11 .globl sym_globl_undef_C
19 // CHECK: ('cputype', 7)
20 // CHECK: ('cpusubtype', 3)
21 // CHECK: ('filetype', 1)
22 // CHECK: ('num_load_commands', 1)
23 // CHECK: ('load_commands_size', 228)
25 // CHECK: ('load_commands', [
26 // CHECK: # Load Command 0
27 // CHECK: (('command', 1)
28 // CHECK: ('size', 124)
29 // CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
30 // CHECK: ('vm_addr', 0)
31 // CHECK: ('vm_size', 4)
32 // CHECK: ('file_offset', 256)
33 // CHECK: ('file_size', 4)
34 // CHECK: ('maxprot', 7)
35 // CHECK: ('initprot', 7)
36 // CHECK: ('num_sections', 1)
37 // CHECK: ('flags', 0)
38 // CHECK: ('sections', [
40 // CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
41 // CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
42 // CHECK: ('address', 0)
44 // CHECK: ('offset', 256)
45 // CHECK: ('alignment', 0)
46 // CHECK: ('reloc_offset', 0)
47 // CHECK: ('num_reloc', 0)
48 // CHECK: ('flags', 0x80000000)
49 // CHECK: ('reserved1', 0)
50 // CHECK: ('reserved2', 0)
54 // CHECK: # Load Command 1
55 // CHECK: (('command', 2)
56 // CHECK: ('size', 24)
57 // CHECK: ('symoff', 260)
58 // CHECK: ('nsyms', 9)
59 // CHECK: ('stroff', 368)
60 // CHECK: ('strsize', 140)
61 // CHECK: ('_string_data', '\x00sym_globl_def_B\x00sym_globl_undef_B\x00sym_globl_def_A\x00sym_globl_undef_A\x00sym_globl_def_C\x00sym_globl_undef_C\x00sym_local_B\x00sym_local_A\x00sym_local_C\x00\x00')
62 // CHECK: ('_symbols', [
64 // CHECK: (('n_strx', 103)
65 // CHECK: ('n_type', 0xe)
66 // CHECK: ('n_sect', 1)
67 // CHECK: ('n_desc', 0)
68 // CHECK: ('n_value', 0)
69 // CHECK: ('_string', 'sym_local_B')
72 // CHECK: (('n_strx', 115)
73 // CHECK: ('n_type', 0xe)
74 // CHECK: ('n_sect', 1)
75 // CHECK: ('n_desc', 0)
76 // CHECK: ('n_value', 0)
77 // CHECK: ('_string', 'sym_local_A')
80 // CHECK: (('n_strx', 127)
81 // CHECK: ('n_type', 0xe)
82 // CHECK: ('n_sect', 1)
83 // CHECK: ('n_desc', 0)
84 // CHECK: ('n_value', 0)
85 // CHECK: ('_string', 'sym_local_C')
88 // CHECK: (('n_strx', 35)
89 // CHECK: ('n_type', 0xf)
90 // CHECK: ('n_sect', 1)
91 // CHECK: ('n_desc', 0)
92 // CHECK: ('n_value', 0)
93 // CHECK: ('_string', 'sym_globl_def_A')
96 // CHECK: (('n_strx', 1)
97 // CHECK: ('n_type', 0xf)
98 // CHECK: ('n_sect', 1)
99 // CHECK: ('n_desc', 0)
100 // CHECK: ('n_value', 0)
101 // CHECK: ('_string', 'sym_globl_def_B')
104 // CHECK: (('n_strx', 69)
105 // CHECK: ('n_type', 0xf)
106 // CHECK: ('n_sect', 1)
107 // CHECK: ('n_desc', 0)
108 // CHECK: ('n_value', 0)
109 // CHECK: ('_string', 'sym_globl_def_C')
112 // CHECK: (('n_strx', 51)
113 // CHECK: ('n_type', 0x1)
114 // CHECK: ('n_sect', 0)
115 // CHECK: ('n_desc', 0)
116 // CHECK: ('n_value', 0)
117 // CHECK: ('_string', 'sym_globl_undef_A')
120 // CHECK: (('n_strx', 17)
121 // CHECK: ('n_type', 0x1)
122 // CHECK: ('n_sect', 0)
123 // CHECK: ('n_desc', 0)
124 // CHECK: ('n_value', 0)
125 // CHECK: ('_string', 'sym_globl_undef_B')
128 // CHECK: (('n_strx', 85)
129 // CHECK: ('n_type', 0x1)
130 // CHECK: ('n_sect', 0)
131 // CHECK: ('n_desc', 0)
132 // CHECK: ('n_value', 0)
133 // CHECK: ('_string', 'sym_globl_undef_C')
137 // CHECK: # Load Command 2
138 // CHECK: (('command', 11)
139 // CHECK: ('size', 80)
140 // CHECK: ('ilocalsym', 0)
141 // CHECK: ('nlocalsym', 3)
142 // CHECK: ('iextdefsym', 3)
143 // CHECK: ('nextdefsym', 3)
144 // CHECK: ('iundefsym', 6)
145 // CHECK: ('nundefsym', 3)
146 // CHECK: ('tocoff', 0)
147 // CHECK: ('ntoc', 0)
148 // CHECK: ('modtaboff', 0)
149 // CHECK: ('nmodtab', 0)
150 // CHECK: ('extrefsymoff', 0)
151 // CHECK: ('nextrefsyms', 0)
152 // CHECK: ('indirectsymoff', 0)
153 // CHECK: ('nindirectsyms', 0)
154 // CHECK: ('extreloff', 0)
155 // CHECK: ('nextrel', 0)
156 // CHECK: ('locreloff', 0)
157 // CHECK: ('nlocrel', 0)
158 // CHECK: ('_indirect_symbols', [