1# RUN: yaml2obj %s -o %t.out 2# RUN: lldb-test object-file %t.out | FileCheck %s 3 4# Test that the deployment target is parsed from the load commands. 5# CHECK: Architecture: x86_64-apple-macosx10.9.0 6--- !mach-o 7FileHeader: 8 magic: 0xFEEDFACF 9 cputype: 0x01000007 10 cpusubtype: 0x80000003 11 filetype: 0x00000002 12 ncmds: 14 13 sizeofcmds: 728 14 flags: 0x00200085 15 reserved: 0x00000000 16LoadCommands: 17 - cmd: LC_SEGMENT_64 18 cmdsize: 72 19 segname: __PAGEZERO 20 vmaddr: 0 21 vmsize: 4294967296 22 fileoff: 0 23 filesize: 0 24 maxprot: 0 25 initprot: 0 26 nsects: 0 27 flags: 0 28 - cmd: LC_SEGMENT_64 29 cmdsize: 232 30 segname: __TEXT 31 vmaddr: 4294967296 32 vmsize: 4096 33 fileoff: 0 34 filesize: 4096 35 maxprot: 7 36 initprot: 5 37 nsects: 2 38 flags: 0 39 Sections: 40 - sectname: __text 41 segname: __TEXT 42 addr: 0x0000000100000FB0 43 size: 8 44 offset: 0x00000FB0 45 align: 0 46 reloff: 0x00000000 47 nreloc: 0 48 flags: 0x80000400 49 reserved1: 0x00000000 50 reserved2: 0x00000000 51 reserved3: 0x00000000 52 - sectname: __unwind_info 53 segname: __TEXT 54 addr: 0x0000000100000FB8 55 size: 72 56 offset: 0x00000FB8 57 align: 2 58 reloff: 0x00000000 59 nreloc: 0 60 flags: 0x00000000 61 reserved1: 0x00000000 62 reserved2: 0x00000000 63 reserved3: 0x00000000 64 - cmd: LC_SEGMENT_64 65 cmdsize: 72 66 segname: __LINKEDIT 67 vmaddr: 4294971392 68 vmsize: 4096 69 fileoff: 4096 70 filesize: 152 71 maxprot: 7 72 initprot: 1 73 nsects: 0 74 flags: 0 75 - cmd: LC_DYLD_INFO_ONLY 76 cmdsize: 48 77 rebase_off: 0 78 rebase_size: 0 79 bind_off: 0 80 bind_size: 0 81 weak_bind_off: 0 82 weak_bind_size: 0 83 lazy_bind_off: 0 84 lazy_bind_size: 0 85 export_off: 4096 86 export_size: 48 87 - cmd: LC_SYMTAB 88 cmdsize: 24 89 symoff: 4152 90 nsyms: 3 91 stroff: 4200 92 strsize: 48 93 - cmd: LC_DYSYMTAB 94 cmdsize: 80 95 ilocalsym: 0 96 nlocalsym: 0 97 iextdefsym: 0 98 nextdefsym: 2 99 iundefsym: 2 100 nundefsym: 1 101 tocoff: 0 102 ntoc: 0 103 modtaboff: 0 104 nmodtab: 0 105 extrefsymoff: 0 106 nextrefsyms: 0 107 indirectsymoff: 0 108 nindirectsyms: 0 109 extreloff: 0 110 nextrel: 0 111 locreloff: 0 112 nlocrel: 0 113 - cmd: LC_LOAD_DYLINKER 114 cmdsize: 32 115 name: 12 116 PayloadString: /usr/lib/dyld 117 ZeroPadBytes: 7 118 - cmd: LC_UUID 119 cmdsize: 24 120 uuid: E75E737C-4FB3-312D-9B17-10987F48F957 121 - cmd: LC_VERSION_MIN_MACOSX 122 cmdsize: 16 123 version: 657664 124 sdk: 658944 125 - cmd: LC_SOURCE_VERSION 126 cmdsize: 16 127 version: 0 128 - cmd: LC_MAIN 129 cmdsize: 24 130 entryoff: 4016 131 stacksize: 0 132 - cmd: LC_LOAD_DYLIB 133 cmdsize: 56 134 dylib: 135 name: 24 136 timestamp: 2 137 current_version: 82102276 138 compatibility_version: 65536 139 PayloadString: /usr/lib/libSystem.B.dylib 140 ZeroPadBytes: 6 141 - cmd: LC_FUNCTION_STARTS 142 cmdsize: 16 143 dataoff: 4144 144 datasize: 8 145 - cmd: LC_DATA_IN_CODE 146 cmdsize: 16 147 dataoff: 4152 148 datasize: 0 149LinkEditData: 150 ExportTrie: 151 TerminalSize: 0 152 NodeOffset: 0 153 Name: '' 154 Flags: 0x0000000000000000 155 Address: 0x0000000000000000 156 Other: 0x0000000000000000 157 ImportName: '' 158 Children: 159 - TerminalSize: 0 160 NodeOffset: 5 161 Name: _ 162 Flags: 0x0000000000000000 163 Address: 0x0000000000000000 164 Other: 0x0000000000000000 165 ImportName: '' 166 Children: 167 - TerminalSize: 2 168 NodeOffset: 33 169 Name: _mh_execute_header 170 Flags: 0x0000000000000000 171 Address: 0x0000000000000000 172 Other: 0x0000000000000000 173 ImportName: '' 174 - TerminalSize: 3 175 NodeOffset: 37 176 Name: main 177 Flags: 0x0000000000000000 178 Address: 0x0000000000000FB0 179 Other: 0x0000000000000000 180 ImportName: '' 181 NameList: 182 - n_strx: 2 183 n_type: 0x0F 184 n_sect: 1 185 n_desc: 16 186 n_value: 4294967296 187 - n_strx: 22 188 n_type: 0x0F 189 n_sect: 1 190 n_desc: 0 191 n_value: 4294971312 192 - n_strx: 28 193 n_type: 0x01 194 n_sect: 0 195 n_desc: 256 196 n_value: 0 197 StringTable: 198 - ' ' 199 - __mh_execute_header 200 - _main 201 - dyld_stub_binder 202 - '' 203 - '' 204 - '' 205... 206