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