1// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s 2 3_b: 4 _c = 0 5_e: 6 _f = 0 7 8 .section __IMPORT,__jump_table,symbol_stubs,pure_instructions+self_modifying_code,5 9.indirect_symbol _a 10 .ascii "\364\364\364\364\364" 11.indirect_symbol _b 12 .ascii "\364\364\364\364\364" 13.indirect_symbol _c 14 .ascii "\364\364\364\364\364" 15 .section __IMPORT,__pointers,non_lazy_symbol_pointers 16.indirect_symbol _d 17 .long 0 18.indirect_symbol _e 19 .long 0 20.indirect_symbol _f 21 .long 0 22 23// CHECK: ('cputype', 7) 24// CHECK: ('cpusubtype', 3) 25// CHECK: ('filetype', 1) 26// CHECK: ('num_load_commands', 3) 27// CHECK: ('load_commands_size', 364) 28// CHECK: ('flag', 0) 29// CHECK: ('load_commands', [ 30// CHECK: # Load Command 0 31// CHECK: (('command', 1) 32// CHECK: ('size', 260) 33// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') 34// CHECK: ('vm_addr', 0) 35// CHECK: ('vm_size', 27) 36// CHECK: ('file_offset', 392) 37// CHECK: ('file_size', 27) 38// CHECK: ('maxprot', 7) 39// CHECK: ('initprot', 7) 40// CHECK: ('num_sections', 3) 41// CHECK: ('flags', 0) 42// CHECK: ('sections', [ 43// CHECK: # Section 0 44// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') 45// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') 46// CHECK: ('address', 0) 47// CHECK: ('size', 0) 48// CHECK: ('offset', 392) 49// CHECK: ('alignment', 0) 50// CHECK: ('reloc_offset', 0) 51// CHECK: ('num_reloc', 0) 52// CHECK: ('flags', 0x80000000) 53// CHECK: ('reserved1', 0) 54// CHECK: ('reserved2', 0) 55// CHECK: ), 56// CHECK: ('_relocations', [ 57// CHECK: ]) 58// CHECK: ('_section_data', '') 59// CHECK: # Section 1 60// CHECK: (('section_name', '__jump_table\x00\x00\x00\x00') 61// CHECK: ('segment_name', '__IMPORT\x00\x00\x00\x00\x00\x00\x00\x00') 62// CHECK: ('address', 0) 63// CHECK: ('size', 15) 64// CHECK: ('offset', 392) 65// CHECK: ('alignment', 0) 66// CHECK: ('reloc_offset', 0) 67// CHECK: ('num_reloc', 0) 68// CHECK: ('flags', 0x84000008) 69// CHECK: ('reserved1', 0) 70// CHECK: ('reserved2', 5) 71// CHECK: ), 72// CHECK: ('_relocations', [ 73// CHECK: ]) 74// CHECK: ('_section_data', 'f4f4f4f4 f4f4f4f4 f4f4f4f4 f4f4f4') 75// CHECK: # Section 2 76// CHECK: (('section_name', '__pointers\x00\x00\x00\x00\x00\x00') 77// CHECK: ('segment_name', '__IMPORT\x00\x00\x00\x00\x00\x00\x00\x00') 78// CHECK: ('address', 15) 79// CHECK: ('size', 12) 80// CHECK: ('offset', 407) 81// CHECK: ('alignment', 0) 82// CHECK: ('reloc_offset', 0) 83// CHECK: ('num_reloc', 0) 84// CHECK: ('flags', 0x6) 85// CHECK: ('reserved1', 3) 86// CHECK: ('reserved2', 0) 87// CHECK: ), 88// CHECK: ('_relocations', [ 89// CHECK: ]) 90// CHECK: ('_section_data', '00000000 00000000 00000000') 91// CHECK: ]) 92// CHECK: ), 93// CHECK: # Load Command 1 94// CHECK: (('command', 2) 95// CHECK: ('size', 24) 96// CHECK: ('symoff', 444) 97// CHECK: ('nsyms', 6) 98// CHECK: ('stroff', 516) 99// CHECK: ('strsize', 20) 100// CHECK: ('_string_data', '\x00_d\x00_a\x00_b\x00_c\x00_e\x00_f\x00\x00') 101// CHECK: ('_symbols', [ 102// CHECK: # Symbol 0 103// CHECK: (('n_strx', 7) 104// CHECK: ('n_type', 0xe) 105// CHECK: ('n_sect', 1) 106// CHECK: ('n_desc', 0) 107// CHECK: ('n_value', 0) 108// CHECK: ('_string', '_b') 109// CHECK: ), 110// CHECK: # Symbol 1 111// CHECK: (('n_strx', 10) 112// CHECK: ('n_type', 0x2) 113// CHECK: ('n_sect', 0) 114// CHECK: ('n_desc', 0) 115// CHECK: ('n_value', 0) 116// CHECK: ('_string', '_c') 117// CHECK: ), 118// CHECK: # Symbol 2 119// CHECK: (('n_strx', 13) 120// CHECK: ('n_type', 0xe) 121// CHECK: ('n_sect', 1) 122// CHECK: ('n_desc', 0) 123// CHECK: ('n_value', 0) 124// CHECK: ('_string', '_e') 125// CHECK: ), 126// CHECK: # Symbol 3 127// CHECK: (('n_strx', 16) 128// CHECK: ('n_type', 0x2) 129// CHECK: ('n_sect', 0) 130// CHECK: ('n_desc', 0) 131// CHECK: ('n_value', 0) 132// CHECK: ('_string', '_f') 133// CHECK: ), 134// CHECK: # Symbol 4 135// CHECK: (('n_strx', 4) 136// CHECK: ('n_type', 0x1) 137// CHECK: ('n_sect', 0) 138// CHECK: ('n_desc', 1) 139// CHECK: ('n_value', 0) 140// CHECK: ('_string', '_a') 141// CHECK: ), 142// CHECK: # Symbol 5 143// CHECK: (('n_strx', 1) 144// CHECK: ('n_type', 0x1) 145// CHECK: ('n_sect', 0) 146// CHECK: ('n_desc', 0) 147// CHECK: ('n_value', 0) 148// CHECK: ('_string', '_d') 149// CHECK: ), 150// CHECK: ]) 151// CHECK: ), 152// CHECK: # Load Command 2 153// CHECK: (('command', 11) 154// CHECK: ('size', 80) 155// CHECK: ('ilocalsym', 0) 156// CHECK: ('nlocalsym', 4) 157// CHECK: ('iextdefsym', 4) 158// CHECK: ('nextdefsym', 0) 159// CHECK: ('iundefsym', 4) 160// CHECK: ('nundefsym', 2) 161// CHECK: ('tocoff', 0) 162// CHECK: ('ntoc', 0) 163// CHECK: ('modtaboff', 0) 164// CHECK: ('nmodtab', 0) 165// CHECK: ('extrefsymoff', 0) 166// CHECK: ('nextrefsyms', 0) 167// CHECK: ('indirectsymoff', 420) 168// CHECK: ('nindirectsyms', 6) 169// CHECK: ('extreloff', 0) 170// CHECK: ('nextrel', 0) 171// CHECK: ('locreloff', 0) 172// CHECK: ('nlocrel', 0) 173// CHECK: ('_indirect_symbols', [ 174// CHECK: # Indirect Symbol 0 175// CHECK: (('symbol_index', 0x4),), 176// CHECK: # Indirect Symbol 1 177// CHECK: (('symbol_index', 0x0),), 178// CHECK: # Indirect Symbol 2 179// CHECK: (('symbol_index', 0x1),), 180// CHECK: # Indirect Symbol 3 181// CHECK: (('symbol_index', 0x5),), 182// CHECK: # Indirect Symbol 4 183// CHECK: (('symbol_index', 0x80000000),), 184// CHECK: # Indirect Symbol 5 185// CHECK: (('symbol_index', 0xc0000000),), 186// CHECK: ]) 187// CHECK: ), 188// CHECK: ]) 189