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
18 // CHECK: ('cputype', 7)
19 // CHECK: ('cpusubtype', 3)
20 // CHECK: ('filetype', 1)
21 // CHECK: ('num_load_commands', 1)
22 // CHECK: ('load_commands_size', 228)
24 // CHECK: ('load_commands', [
25 // CHECK: # Load Command 0
26 // CHECK: (('command', 1)
27 // CHECK: ('size', 124)
28 // CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
29 // CHECK: ('vm_addr', 0)
30 // CHECK: ('vm_size', 4)
31 // CHECK: ('file_offset', 256)
32 // CHECK: ('file_size', 4)
33 // CHECK: ('maxprot', 7)
34 // CHECK: ('initprot', 7)
35 // CHECK: ('num_sections', 1)
36 // CHECK: ('flags', 0)
37 // CHECK: ('sections', [
39 // CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
40 // CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
41 // CHECK: ('address', 0)
43 // CHECK: ('offset', 256)
44 // CHECK: ('alignment', 0)
45 // CHECK: ('reloc_offset', 0)
46 // CHECK: ('num_reloc', 0)
47 // CHECK: ('flags', 0x80000000)
48 // CHECK: ('reserved1', 0)
49 // CHECK: ('reserved2', 0)
53 // CHECK: # Load Command 1
54 // CHECK: (('command', 2)
55 // CHECK: ('size', 24)
56 // CHECK: ('symoff', 260)
57 // CHECK: ('nsyms', 9)
58 // CHECK: ('stroff', 368)
59 // CHECK: ('strsize', 140)
60 // 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')
61 // CHECK: ('_symbols', [
63 // CHECK: (('n_strx', 103)
64 // CHECK: ('n_type', 0xe)
65 // CHECK: ('n_sect', 1)
66 // CHECK: ('n_desc', 0)
67 // CHECK: ('n_value', 0)
68 // CHECK: ('_string', 'sym_local_B')
71 // CHECK: (('n_strx', 115)
72 // CHECK: ('n_type', 0xe)
73 // CHECK: ('n_sect', 1)
74 // CHECK: ('n_desc', 0)
75 // CHECK: ('n_value', 0)
76 // CHECK: ('_string', 'sym_local_A')
79 // CHECK: (('n_strx', 127)
80 // CHECK: ('n_type', 0xe)
81 // CHECK: ('n_sect', 1)
82 // CHECK: ('n_desc', 0)
83 // CHECK: ('n_value', 0)
84 // CHECK: ('_string', 'sym_local_C')
87 // CHECK: (('n_strx', 35)
88 // CHECK: ('n_type', 0xf)
89 // CHECK: ('n_sect', 1)
90 // CHECK: ('n_desc', 0)
91 // CHECK: ('n_value', 0)
92 // CHECK: ('_string', 'sym_globl_def_A')
95 // CHECK: (('n_strx', 1)
96 // CHECK: ('n_type', 0xf)
97 // CHECK: ('n_sect', 1)
98 // CHECK: ('n_desc', 0)
99 // CHECK: ('n_value', 0)
100 // CHECK: ('_string', 'sym_globl_def_B')
103 // CHECK: (('n_strx', 69)
104 // CHECK: ('n_type', 0xf)
105 // CHECK: ('n_sect', 1)
106 // CHECK: ('n_desc', 0)
107 // CHECK: ('n_value', 0)
108 // CHECK: ('_string', 'sym_globl_def_C')
111 // CHECK: (('n_strx', 51)
112 // CHECK: ('n_type', 0x1)
113 // CHECK: ('n_sect', 0)
114 // CHECK: ('n_desc', 0)
115 // CHECK: ('n_value', 0)
116 // CHECK: ('_string', 'sym_globl_undef_A')
119 // CHECK: (('n_strx', 17)
120 // CHECK: ('n_type', 0x1)
121 // CHECK: ('n_sect', 0)
122 // CHECK: ('n_desc', 0)
123 // CHECK: ('n_value', 0)
124 // CHECK: ('_string', 'sym_globl_undef_B')
127 // CHECK: (('n_strx', 85)
128 // CHECK: ('n_type', 0x1)
129 // CHECK: ('n_sect', 0)
130 // CHECK: ('n_desc', 0)
131 // CHECK: ('n_value', 0)
132 // CHECK: ('_string', 'sym_globl_undef_C')
136 // CHECK: # Load Command 2
137 // CHECK: (('command', 11)
138 // CHECK: ('size', 80)
139 // CHECK: ('ilocalsym', 0)
140 // CHECK: ('nlocalsym', 3)
141 // CHECK: ('iextdefsym', 3)
142 // CHECK: ('nextdefsym', 3)
143 // CHECK: ('iundefsym', 6)
144 // CHECK: ('nundefsym', 3)
145 // CHECK: ('tocoff', 0)
146 // CHECK: ('ntoc', 0)
147 // CHECK: ('modtaboff', 0)
148 // CHECK: ('nmodtab', 0)
149 // CHECK: ('extrefsymoff', 0)
150 // CHECK: ('nextrefsyms', 0)
151 // CHECK: ('indirectsymoff', 0)
152 // CHECK: ('nindirectsyms', 0)
153 // CHECK: ('extreloff', 0)
154 // CHECK: ('nextrel', 0)
155 // CHECK: ('locreloff', 0)
156 // CHECK: ('nlocrel', 0)
157 // CHECK: ('_indirect_symbols', [