Home | History | Annotate | Download | only in MachO
      1 # RUN: yaml2obj %s | obj2yaml | FileCheck %s
      2 
      3 --- !mach-o
      4 IsLittleEndian:  true
      5 FileHeader:      
      6   magic:           0xFEEDFACF
      7   cputype:         0x01000007
      8   cpusubtype:      0x00000003
      9   filetype:        0x00000001
     10   ncmds:           4
     11   sizeofcmds:      512
     12   flags:           0x00002000
     13   reserved:        0x00000000
     14 LoadCommands:    
     15   - cmd:             LC_SEGMENT_64
     16     cmdsize:         392
     17     segname:         ''
     18     vmaddr:          0
     19     vmsize:          240
     20     fileoff:         544
     21     filesize:        240
     22     maxprot:         7
     23     initprot:        7
     24     nsects:          4
     25     flags:           0
     26     Sections:        
     27       - sectname:        __text
     28         segname:         __TEXT
     29         addr:            0x0000000000000000
     30         size:            93
     31         offset:          0x00000220
     32         align:           4
     33         reloff:          0x00000310
     34         nreloc:          3
     35         flags:           0x80000400
     36         reserved1:       0x00000000
     37         reserved2:       0x00000000
     38         reserved3:       0x00000000
     39       - sectname:        __cstring
     40         segname:         __TEXT
     41         addr:            0x000000000000005D
     42         size:            48
     43         offset:          0x0000027D
     44         align:           0
     45         reloff:          0x00000000
     46         nreloc:          0
     47         flags:           0x00000002
     48         reserved1:       0x00000000
     49         reserved2:       0x00000000
     50         reserved3:       0x00000000
     51       - sectname:        __compact_unwind
     52         segname:         __LD
     53         addr:            0x0000000000000090
     54         size:            32
     55         offset:          0x000002B0
     56         align:           3
     57         reloff:          0x00000328
     58         nreloc:          1
     59         flags:           0x02000000
     60         reserved1:       0x00000000
     61         reserved2:       0x00000000
     62         reserved3:       0x00000000
     63       - sectname:        __eh_frame
     64         segname:         __TEXT
     65         addr:            0x00000000000000B0
     66         size:            64
     67         offset:          0x000002D0
     68         align:           3
     69         reloff:          0x00000000
     70         nreloc:          0
     71         flags:           0x6800000B
     72         reserved1:       0x00000000
     73         reserved2:       0x00000000
     74         reserved3:       0x00000000
     75   - cmd:             LC_VERSION_MIN_MACOSX
     76     cmdsize:         16
     77     version:         658432
     78     sdk:             0
     79   - cmd:             LC_SYMTAB
     80     cmdsize:         24
     81     symoff:          816
     82     nsyms:           2
     83     stroff:          848
     84     strsize:         36
     85   - cmd:             LC_DYSYMTAB
     86     cmdsize:         80
     87     ilocalsym:       0
     88     nlocalsym:       0
     89     iextdefsym:      0
     90     nextdefsym:      1
     91     iundefsym:       1
     92     nundefsym:       1
     93     tocoff:          0
     94     ntoc:            0
     95     modtaboff:       0
     96     nmodtab:         0
     97     extrefsymoff:    0
     98     nextrefsyms:     0
     99     indirectsymoff:  0
    100     nindirectsyms:   0
    101     extreloff:       0
    102     nextrel:         0
    103     locreloff:       0
    104     nlocrel:         0
    105 LinkEditData:    
    106   NameList:        
    107     - n_strx:          24
    108       n_type:          0x0F
    109       n_sect:          1
    110       n_desc:          0
    111       n_value:         0
    112     - n_strx:          1
    113       n_type:          0x01
    114       n_sect:          0
    115       n_desc:          0
    116       n_value:         0
    117   StringTable:     
    118     - ''
    119     - _compilerrt_abort_impl
    120     - ___absvdi2
    121     - ''
    122 ...
    123 
    124 #CHECK: FileHeader:      
    125 #CHECK: magic:           0xFEEDFACF
    126 #CHECK:   cputype:         0x01000007
    127 #CHECK:   cpusubtype:      0x00000003
    128 #CHECK:   filetype:        0x00000001
    129 #CHECK:   ncmds:           4
    130 #CHECK:   sizeofcmds:      512
    131 #CHECK:   flags:           0x00002000
    132 #CHECK:   reserved:        0x00000000
    133