1# RUN: yaml2obj %s | obj2yaml | FileCheck %s 2 3--- !mach-o 4FileHeader: 5 magic: 0xFEEDFACE 6 cputype: 0x00000007 7 cpusubtype: 0x00000003 8 filetype: 0x00000001 9 ncmds: 4 10 sizeofcmds: 660 11 flags: 0x00002000 12LoadCommands: 13 - cmd: LC_SEGMENT 14 cmdsize: 532 15 segname: '' 16 vmaddr: 0 17 vmsize: 175 18 fileoff: 688 19 filesize: 160 20 maxprot: 7 21 initprot: 7 22 nsects: 7 23 flags: 0 24 Sections: 25 - sectname: __text 26 segname: __TEXT 27 addr: 0x0000000000000000 28 size: 72 29 offset: 0x000002B0 30 align: 4 31 reloff: 0x00000350 32 nreloc: 0 33 flags: 0x80000400 34 reserved1: 0x00000000 35 reserved2: 0x00000000 36 reserved3: 0x00000000 37 - sectname: __data 38 segname: __DATA 39 addr: 0x0000000000000048 40 size: 4 41 offset: 0x000002F8 42 align: 2 43 reloff: 0x00000000 44 nreloc: 0 45 flags: 0x00000000 46 reserved1: 0x00000000 47 reserved2: 0x00000000 48 reserved3: 0x00000000 49 - sectname: __bss 50 segname: __DATA 51 addr: 0x00000000000000A0 52 size: 8 53 offset: 0x00000000 54 align: 2 55 reloff: 0x00000000 56 nreloc: 0 57 flags: 0x00000001 58 reserved1: 0x00000000 59 reserved2: 0x00000000 60 reserved3: 0x00000000 61 - sectname: __thread_bss 62 segname: __DATA 63 addr: 0x00000000000000A8 64 size: 7 65 offset: 0x00000000 66 align: 0 67 reloff: 0x00000000 68 nreloc: 0 69 flags: 0x00000012 70 reserved1: 0x00000000 71 reserved2: 0x00000000 72 reserved3: 0x00000000 73 - sectname: __thread_vars 74 segname: __DATA 75 addr: 0x000000000000004C 76 size: 12 77 offset: 0x000002FC 78 align: 0 79 reloff: 0x00000388 80 nreloc: 0 81 flags: 0x00000013 82 reserved1: 0x00000000 83 reserved2: 0x00000000 84 reserved3: 0x00000000 85 - cmd: LC_BUILD_VERSION 86 cmdsize: 24 87 platform: 1 88 minos: 658944 89 sdk: 0 90 ntools: 0 91 - cmd: LC_SYMTAB 92 cmdsize: 24 93 symoff: 928 94 nsyms: 7 95 stroff: 1012 96 strsize: 48 97 - cmd: LC_DYSYMTAB 98 cmdsize: 80 99 ilocalsym: 0 100 nlocalsym: 4 101 iextdefsym: 4 102 nextdefsym: 2 103 iundefsym: 6 104 nundefsym: 1 105 tocoff: 0 106 ntoc: 0 107 modtaboff: 0 108 nmodtab: 0 109 extrefsymoff: 0 110 nextrefsyms: 0 111 indirectsymoff: 0 112 nindirectsyms: 0 113 extreloff: 0 114 nextrel: 0 115 locreloff: 0 116 nlocrel: 0 117LinkEditData: 118 NameList: 119 - n_strx: 44 120 n_type: 0x0E 121 n_sect: 2 122 n_desc: 0 123 n_value: 72 124 - n_strx: 41 125 n_type: 0x0E 126 n_sect: 3 127 n_desc: 0 128 n_value: 160 129 - n_strx: 38 130 n_type: 0x0E 131 n_sect: 3 132 n_desc: 0 133 n_value: 164 134 - n_strx: 1 135 n_type: 0x0E 136 n_sect: 4 137 n_desc: 0 138 n_value: 168 139 - n_strx: 35 140 n_type: 0x0F 141 n_sect: 5 142 n_desc: 0 143 n_value: 76 144 - n_strx: 29 145 n_type: 0x0F 146 n_sect: 1 147 n_desc: 0 148 n_value: 0 149 - n_strx: 13 150 n_type: 0x01 151 n_sect: 0 152 n_desc: 0 153 n_value: 0 154 StringTable: 155 - '' 156 - '_d$tlv$init' 157 - __tlv_bootstrap 158 - _main 159 - _d 160 - _c 161 - _b 162 - _a 163 - '' 164... 165 166# CHECK: - sectname: __text 167# CHECK-NEXT: segname: __TEXT 168# CHECK-NEXT: addr: 0x0 169# CHECK-NEXT: size: 72 170# CHECK-NEXT: offset: 0x2B0 171# CHECK-NEXT: align: 4 172# CHECK-NEXT: reloff: 0x350 173# CHECK-NEXT: nreloc: 0 174# CHECK-NEXT: flags: 0x80000400 175# CHECK-NEXT: reserved1: 0x0 176# CHECK-NEXT: reserved2: 0x0 177# CHECK-NEXT: reserved3: 0x0 178# CHECK-NEXT: content: {{(DEADBEEF|EFBEADDE){18}$}} 179# CHECK-NEXT: - sectname: __data 180# CHECK-NEXT: segname: __DATA 181# CHECK-NEXT: addr: 0x48 182# CHECK-NEXT: size: 4 183# CHECK-NEXT: offset: 0x2F8 184# CHECK-NEXT: align: 2 185# CHECK-NEXT: reloff: 0x0 186# CHECK-NEXT: nreloc: 0 187# CHECK-NEXT: flags: 0x0 188# CHECK-NEXT: reserved1: 0x0 189# CHECK-NEXT: reserved2: 0x0 190# CHECK-NEXT: reserved3: 0x0 191# CHECK-NEXT: content: {{(DEADBEEF|EFBEADDE)$}} 192# CHECK-NEXT: - sectname: __bss 193# CHECK-NEXT: segname: __DATA 194# CHECK-NEXT: addr: 0xA0 195# CHECK-NEXT: size: 8 196# CHECK-NEXT: offset: 0x0 197# CHECK-NEXT: align: 2 198# CHECK-NEXT: reloff: 0x0 199# CHECK-NEXT: nreloc: 0 200# CHECK-NEXT: flags: 0x1 201# CHECK-NEXT: reserved1: 0x0 202# CHECK-NEXT: reserved2: 0x0 203# CHECK-NEXT: reserved3: 0x0 204# CHECK-NEXT: - sectname: __thread_bss 205# CHECK-NEXT: segname: __DATA 206# CHECK-NEXT: addr: 0xA8 207# CHECK-NEXT: size: 7 208# CHECK-NEXT: offset: 0x0 209# CHECK-NEXT: align: 0 210# CHECK-NEXT: reloff: 0x0 211# CHECK-NEXT: nreloc: 0 212# CHECK-NEXT: flags: 0x12 213# CHECK-NEXT: reserved1: 0x0 214# CHECK-NEXT: reserved2: 0x0 215# CHECK-NEXT: reserved3: 0x0 216# CHECK-NEXT: - sectname: __thread_vars 217# CHECK-NEXT: segname: __DATA 218# CHECK-NEXT: addr: 0x4C 219# CHECK-NEXT: size: 12 220# CHECK-NEXT: offset: 0x2FC 221# CHECK-NEXT: align: 0 222# CHECK-NEXT: reloff: 0x388 223# CHECK-NEXT: nreloc: 0 224# CHECK-NEXT: flags: 0x13 225# CHECK-NEXT: reserved1: 0x0 226# CHECK-NEXT: reserved2: 0x0 227# CHECK-NEXT: reserved3: 0x0 228# CHECK-NEXT: content: {{.*}} 229