1 // RUN: llvm-objdump -p %p/Inputs/hello.obj.macho-arm | FileCheck %s 2 // RUN: llvm-objdump -p %p/Inputs/hello.exe.macho-arm \ 3 // RUN: | FileCheck %s -check-prefix=EXE 4 5 CHECK: Mach header 6 CHECK: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags 7 CHECK: MH_MAGIC ARM V7 0x00 OBJECT 3 568 SUBSECTIONS_VIA_SYMBOLS 8 CHECK: Load command 0 9 CHECK: cmd LC_SEGMENT 10 CHECK: cmdsize 464 11 CHECK: segname 12 CHECK: vmaddr 0x00000000 13 CHECK: vmsize 0x00000043 14 CHECK: fileoff 596 15 CHECK: filesize 67 16 CHECK: maxprot rwx 17 CHECK: initprot rwx 18 CHECK: nsects 6 19 CHECK: flags (none) 20 CHECK: Section 21 CHECK: sectname __text 22 CHECK: segname __TEXT 23 CHECK: addr 0x00000000 24 CHECK: size 0x00000036 25 CHECK: offset 596 26 CHECK: align 2^2 (4) 27 CHECK: reloff 664 28 CHECK: nreloc 5 29 CHECK: type S_REGULAR 30 CHECK: attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS 31 CHECK: reserved1 0 32 CHECK: reserved2 0 33 CHECK: Section 34 CHECK: sectname __textcoal_nt 35 CHECK: segname __TEXT 36 CHECK: addr 0x00000036 37 CHECK: size 0x00000000 38 CHECK: offset 650 39 CHECK: align 2^0 (1) 40 CHECK: reloff 0 41 CHECK: nreloc 0 42 CHECK: type S_COALESCED 43 CHECK: attributes PURE_INSTRUCTIONS 44 CHECK: reserved1 0 45 CHECK: reserved2 0 46 CHECK: Section 47 CHECK: sectname __const_coal 48 CHECK: segname __TEXT 49 CHECK: addr 0x00000036 50 CHECK: size 0x00000000 51 CHECK: offset 650 52 CHECK: align 2^0 (1) 53 CHECK: reloff 0 54 CHECK: nreloc 0 55 CHECK: type S_COALESCED 56 CHECK: attributes (none) 57 CHECK: reserved1 0 58 CHECK: reserved2 0 59 CHECK: Section 60 CHECK: sectname __picsymbolstub4 61 CHECK: segname __TEXT 62 CHECK: addr 0x00000036 63 CHECK: size 0x00000000 64 CHECK: offset 650 65 CHECK: align 2^0 (1) 66 CHECK: reloff 0 67 CHECK: nreloc 0 68 CHECK: type S_SYMBOL_STUBS 69 CHECK: attributes (none) 70 CHECK: reserved1 0 (index into indirect symbol table) 71 CHECK: reserved2 16 (size of stubs) 72 CHECK: Section 73 CHECK: sectname __StaticInit 74 CHECK: segname __TEXT 75 CHECK: addr 0x00000036 76 CHECK: size 0x00000000 77 CHECK: offset 650 78 CHECK: align 2^0 (1) 79 CHECK: reloff 0 80 CHECK: nreloc 0 81 CHECK: type S_REGULAR 82 CHECK: attributes PURE_INSTRUCTIONS 83 CHECK: reserved1 0 84 CHECK: reserved2 0 85 CHECK: Section 86 CHECK: sectname __cstring 87 CHECK: segname __TEXT 88 CHECK: addr 0x00000036 89 CHECK: size 0x0000000d 90 CHECK: offset 650 91 CHECK: align 2^0 (1) 92 CHECK: reloff 0 93 CHECK: nreloc 0 94 CHECK: type S_CSTRING_LITERALS 95 CHECK: attributes (none) 96 CHECK: reserved1 0 97 CHECK: reserved2 0 98 CHECK: Load command 1 99 CHECK: cmd LC_SYMTAB 100 CHECK: cmdsize 24 101 CHECK: symoff 704 102 CHECK: nsyms 2 103 CHECK: stroff 728 104 CHECK: strsize 16 105 CHECK: Load command 2 106 CHECK: cmd LC_DYSYMTAB 107 CHECK: cmdsize 80 108 CHECK: ilocalsym 0 109 CHECK: nlocalsym 0 110 CHECK: iextdefsym 0 111 CHECK: nextdefsym 1 112 CHECK: iundefsym 1 113 CHECK: nundefsym 1 114 CHECK: tocoff 0 115 CHECK: ntoc 0 116 CHECK: modtaboff 0 117 CHECK: nmodtab 0 118 CHECK: extrefsymoff 0 119 CHECK: nextrefsyms 0 120 CHECK: indirectsymoff 0 121 CHECK: nindirectsyms 0 122 CHECK: extreloff 0 123 CHECK: nextrel 0 124 CHECK: locreloff 0 125 CHECK: nlocrel 0 126 127 EXE: Mach header 128 EXE: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags 129 EXE: MH_MAGIC ARM V7 0x00 EXECUTE 17 1012 NOUNDEFS DYLDLINK TWOLEVEL PIE 130 EXE: Load command 0 131 EXE: cmd LC_SEGMENT 132 EXE: cmdsize 56 133 EXE: segname __PAGEZERO 134 EXE: vmaddr 0x00000000 135 EXE: vmsize 0x00004000 136 EXE: fileoff 0 137 EXE: filesize 0 138 EXE: maxprot --- 139 EXE: initprot --- 140 EXE: nsects 0 141 EXE: flags (none) 142 EXE: Load command 1 143 EXE: cmd LC_SEGMENT 144 EXE: cmdsize 328 145 EXE: segname __TEXT 146 EXE: vmaddr 0x00004000 147 EXE: vmsize 0x00008000 148 EXE: fileoff 0 149 EXE: filesize 32768 150 EXE: maxprot r-x 151 EXE: initprot r-x 152 EXE: nsects 4 153 EXE: flags (none) 154 EXE: Section 155 EXE: sectname __text 156 EXE: segname __TEXT 157 EXE: addr 0x0000bf84 158 EXE: size 0x00000036 159 EXE: offset 32644 160 EXE: align 2^2 (4) 161 EXE: reloff 0 162 EXE: nreloc 0 163 EXE: type S_REGULAR 164 EXE: attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS 165 EXE: reserved1 0 166 EXE: reserved2 0 167 EXE: Section 168 EXE: sectname __stub_helper 169 EXE: segname __TEXT 170 EXE: addr 0x0000bfbc 171 EXE: size 0x00000030 172 EXE: offset 32700 173 EXE: align 2^2 (4) 174 EXE: reloff 0 175 EXE: nreloc 0 176 EXE: type S_REGULAR 177 EXE: attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS 178 EXE: reserved1 0 179 EXE: reserved2 0 180 EXE: Section 181 EXE: sectname __cstring 182 EXE: segname __TEXT 183 EXE: addr 0x0000bfec 184 EXE: size 0x0000000d 185 EXE: offset 32748 186 EXE: align 2^0 (1) 187 EXE: reloff 0 188 EXE: nreloc 0 189 EXE: type S_CSTRING_LITERALS 190 EXE: attributes (none) 191 EXE: reserved1 0 192 EXE: reserved2 0 193 EXE: Section 194 EXE: sectname __symbolstub1 195 EXE: segname __TEXT 196 EXE: addr 0x0000bffc 197 EXE: size 0x00000004 198 EXE: offset 32764 199 EXE: align 2^2 (4) 200 EXE: reloff 0 201 EXE: nreloc 0 202 EXE: type S_SYMBOL_STUBS 203 EXE: attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS 204 EXE: reserved1 0 (index into indirect symbol table) 205 EXE: reserved2 4 (size of stubs) 206 EXE: Load command 2 207 EXE: cmd LC_SEGMENT 208 EXE: cmdsize 192 209 EXE: segname __DATA 210 EXE: vmaddr 0x0000c000 211 EXE: vmsize 0x00004000 212 EXE: fileoff 32768 213 EXE: filesize 16384 214 EXE: maxprot rw- 215 EXE: initprot rw- 216 EXE: nsects 2 217 EXE: flags (none) 218 EXE: Section 219 EXE: sectname __lazy_symbol 220 EXE: segname __DATA 221 EXE: addr 0x0000c000 222 EXE: size 0x00000004 223 EXE: offset 32768 224 EXE: align 2^2 (4) 225 EXE: reloff 0 226 EXE: nreloc 0 227 EXE: type S_LAZY_SYMBOL_POINTERS 228 EXE: attributes (none) 229 EXE: reserved1 1 (index into indirect symbol table) 230 EXE: reserved2 0 231 EXE: Section 232 EXE: sectname __nl_symbol_ptr 233 EXE: segname __DATA 234 EXE: addr 0x0000c004 235 EXE: size 0x00000008 236 EXE: offset 32772 237 EXE: align 2^2 (4) 238 EXE: reloff 0 239 EXE: nreloc 0 240 EXE: type S_NON_LAZY_SYMBOL_POINTERS 241 EXE: attributes (none) 242 EXE: reserved1 2 (index into indirect symbol table) 243 EXE: reserved2 0 244 EXE: Load command 3 245 EXE: cmd LC_SEGMENT 246 EXE: cmdsize 56 247 EXE: segname __LINKEDIT 248 EXE: vmaddr 0x00010000 249 EXE: vmsize 0x00004000 250 EXE: fileoff 49152 251 EXE: filesize 256 252 EXE: maxprot r-- 253 EXE: initprot r-- 254 EXE: nsects 0 255 EXE: flags (none) 256 EXE: Load command 4 257 EXE: cmd LC_DYLD_INFO_ONLY 258 EXE: cmdsize 48 259 EXE: rebase_off 49152 260 EXE: rebase_size 4 261 EXE: bind_off 49156 262 EXE: bind_size 24 263 EXE: weak_bind_off 0 264 EXE: weak_bind_size 0 265 EXE: lazy_bind_off 49180 266 EXE: lazy_bind_size 16 267 EXE: export_off 49196 268 EXE: export_size 44 269 EXE: Load command 5 270 EXE: cmd LC_SYMTAB 271 EXE: cmdsize 24 272 EXE: symoff 49264 273 EXE: nsyms 5 274 EXE: stroff 49340 275 EXE: strsize 68 276 EXE: Load command 6 277 EXE: cmd LC_DYSYMTAB 278 EXE: cmdsize 80 279 EXE: ilocalsym 0 280 EXE: nlocalsym 1 281 EXE: iextdefsym 1 282 EXE: nextdefsym 2 283 EXE: iundefsym 3 284 EXE: nundefsym 2 285 EXE: tocoff 0 286 EXE: ntoc 0 287 EXE: modtaboff 0 288 EXE: nmodtab 0 289 EXE: extrefsymoff 0 290 EXE: nextrefsyms 0 291 EXE: indirectsymoff 49324 292 EXE: nindirectsyms 4 293 EXE: extreloff 0 294 EXE: nextrel 0 295 EXE: locreloff 0 296 EXE: nlocrel 0 297 EXE: Load command 7 298 EXE: cmd LC_LOAD_DYLINKER 299 EXE: cmdsize 28 300 EXE: name /usr/lib/dyld (offset 12) 301 EXE: Load command 8 302 EXE: cmd LC_UUID 303 EXE: cmdsize 24 304 EXE: uuid C2D9351C-1EF1-330B-A2AB-EED6CF7D2C5D 305 EXE: Load command 9 306 EXE: cmd LC_VERSION_MIN_IPHONEOS 307 EXE: cmdsize 16 308 EXE: version 8.0 309 EXE: sdk 8.0 310 EXE: Load command 10 311 EXE: cmd LC_SOURCE_VERSION 312 EXE: cmdsize 16 313 EXE: version 0.0 314 EXE: Load command 11 315 EXE: cmd LC_MAIN 316 EXE: cmdsize 24 317 EXE: entryoff 32645 318 EXE: stacksize 0 319 EXE: Load command 12 320 EXE: cmd LC_ENCRYPTION_INFO 321 EXE: cmdsize 20 322 EXE: cryptoff 16384 323 EXE: cryptsize 16384 324 EXE: cryptid 0 325 EXE: Load command 13 326 EXE: cmd LC_LOAD_DYLIB 327 EXE: cmdsize 52 328 EXE: name /usr/lib/libSystem.B.dylib (offset 24) 329 EXE: current version 1213.0.0 330 EXE: compatibility version 1.0.0 331 EXE: Load command 14 332 EXE: cmd LC_FUNCTION_STARTS 333 EXE: cmdsize 16 334 EXE: dataoff 49240 335 EXE: datasize 4 336 EXE: Load command 15 337 EXE: cmd LC_DATA_IN_CODE 338 EXE: cmdsize 16 339 EXE: dataoff 49244 340 EXE: datasize 0 341 EXE: Load command 16 342 EXE: cmd LC_DYLIB_CODE_SIGN_DRS 343 EXE: cmdsize 16 344 EXE: dataoff 49244 345 EXE: datasize 20 346