 CONSTANT: LC_DYLD_INFO_ONLY     HEX: 80000022
 
 UNION-STRUCT: lc_str
-    { offset    uint32_t }
+    { offset    uint     }
     { ptr       char*    } ;
 
 STRUCT: segment_command
-    { cmd            uint32_t  }
-    { cmdsize        uint32_t  }
+    { cmd            uint      }
+    { cmdsize        uint      }
     { segname        char[16]  }
-    { vmaddr         uint32_t  }
-    { vmsize         uint32_t  }
-    { fileoff        uint32_t  }
-    { filesize       uint32_t  }
+    { vmaddr         uint      }
+    { vmsize         uint      }
+    { fileoff        uint      }
+    { filesize       uint      }
     { maxprot        vm_prot_t }
     { initprot       vm_prot_t }
-    { nsects         uint32_t  }
-    { flags          uint32_t  } ;
+    { nsects         uint      }
+    { flags          uint      } ;
 
 STRUCT: segment_command_64
-    { cmd            uint32_t  }
-    { cmdsize        uint32_t  }
-    { segname        char[16]  }
-    { vmaddr         uint64_t  }
-    { vmsize         uint64_t  }
-    { fileoff        uint64_t  }
-    { filesize       uint64_t  }
-    { maxprot        vm_prot_t }
-    { initprot       vm_prot_t }
-    { nsects         uint32_t  }
-    { flags          uint32_t  } ;
-
+    { cmd            uint       }
+    { cmdsize        uint       }
+    { segname        char[16]   }
+    { vmaddr         ulonglong  }
+    { vmsize         ulonglong  }
+    { fileoff        ulonglong  }
+    { filesize       ulonglong  }
+    { maxprot        vm_prot_t  }
+    { initprot       vm_prot_t  }
+    { nsects         uint       }
+    { flags          uint       } ;
+    
 CONSTANT: SG_HIGHVM               HEX: 1
 CONSTANT: SG_FVMLIB               HEX: 2
 CONSTANT: SG_NORELOC              HEX: 4

CONSTANT: SYMDEF_SORTED "__.SYMDEF SORTED"

STRUCT: ranlib
    { ran_strx uint32_t }
    { ran_off  uint32_t } ;

! reloc.h
STRUCT: relocation_info
    { r_address                            int32_t  }
    { r_symbolnum_pcrel_length_extern_type uint32_t } ;

CONSTANT: R_ABS   0
CONSTANT: R_SCATTERED HEX: 80000000

STRUCT: scattered_relocation_info_big_endian
    { r_scattered_pcrel_length_type_address  uint32_t }
    { r_value                                int32_t  } ;

STRUCT: scattered_relocation_info_little_endian
    { r_address_type_length_pcrel_scattered uint32_t }
    { r_value                               int32_t  } ;

C-ENUM: reloc_type_generic
    GENERIC_RELOC_VANILLA


STRUCT: fvmlib
    { name             lc_str   }
    { minor_version    uint     }
    { header_addr      uint     } ;

STRUCT: fvmlib_command
    { cmd        uint     }
    { cmdsize    uint     }
    { fvmlib     fvmlib   } ;

STRUCT: dylib
    { name                  lc_str   }
    { timestamp             uint     }
    { current_version       uint     }
    { compatibility_version uint     } ;

STRUCT: dylib_command
    { cmd        uint     }
    { cmdsize    uint     }
    { dylib      dylib    } ;

STRUCT: sub_framework_command
    { cmd         uint     }
    { cmdsize     uint     }
    { umbrella    lc_str   } ;

STRUCT: sub_client_command
    { cmd        uint     }
    { cmdsize    uint     }
    { client     lc_str   } ;

STRUCT: sub_umbrella_command
    { cmd             uint     }
    { cmdsize         uint     }
    { sub_umbrella    lc_str   } ;

STRUCT: sub_library_command
    { cmd            uint     }
    { cmdsize        uint     }
    { sub_library    lc_str   } ;

STRUCT: prebound_dylib_command
    { cmd               uint     }
    { cmdsize           uint     }
    { name              lc_str   }
    { nmodules          uint     }
    { linked_modules    lc_str   } ;

STRUCT: dylinker_command
    { cmd        uint     }
    { cmdsize    uint     }
    { name       lc_str   } ;

STRUCT: thread_command
    { cmd        uint }
    { cmdsize    uint } ;

STRUCT: routines_command
    { cmd             uint }
    { cmdsize         uint }
    { init_address    uint }
    { init_module     uint }
    { reserved1       uint }
    { reserved2       uint }
    { reserved3       uint }
    { reserved4       uint }
    { reserved5       uint }
    { reserved6       uint } ;

STRUCT: routines_command_64
    { cmd             uint      }
    { cmdsize         uint      }
    { init_address    ulonglong }
    { init_module     ulonglong }
    { reserved1       ulonglong }
    { reserved2       ulonglong }
    { reserved3       ulonglong }
    { reserved4       ulonglong }
    { reserved5       ulonglong }
    { reserved6       ulonglong } ;

STRUCT: symtab_command
    { cmd        uint }
    { cmdsize    uint }
    { symoff     uint }
    { nsyms      uint }
    { stroff     uint }
    { strsize    uint } ;

STRUCT: dysymtab_command
    { cmd            uint }
    { cmdsize        uint }
    { ilocalsym      uint }
    { nlocalsym      uint }
    { iextdefsym     uint }
    { nextdefsym     uint }
    { iundefsym      uint }
    { nundefsym      uint }
    { tocoff         uint }
    { ntoc           uint }
    { modtaboff      uint }
    { nmodtab        uint }
    { extrefsymoff   uint }
    { nextrefsyms    uint }
    { indirectsymoff uint }
    { nindirectsyms  uint }
    { extreloff      uint }
    { nextrel        uint }
    { locreloff      uint }
    { nlocrel        uint } ;

CONSTANT: INDIRECT_SYMBOL_LOCAL HEX: 80000000
CONSTANT: INDIRECT_SYMBOL_ABS   HEX: 40000000

STRUCT: dylib_table_of_contents
    { symbol_index uint }
    { module_index uint } ;

STRUCT: dylib_module
    { module_name           uint }
    { iextdefsym            uint }
    { nextdefsym            uint }
    { irefsym               uint }
    { nrefsym               uint }
    { ilocalsym             uint }
    { nlocalsym             uint }
    { iextrel               uint }
    { nextrel               uint }
    { iinit_iterm           uint }
    { ninit_nterm           uint }
    { objc_module_info_addr uint }
    { objc_module_info_size uint } ;

STRUCT: dylib_module_64
    { module_name           uint      }
    { iextdefsym            uint      }
    { nextdefsym            uint      }
    { irefsym               uint      }
    { nrefsym               uint      }
    { ilocalsym             uint      }
    { nlocalsym             uint      }
    { iextrel               uint      }
    { nextrel               uint      }
    { iinit_iterm           uint      }
    { ninit_nterm           uint      }
    { objc_module_info_size uint      }
    { objc_module_info_addr ulonglong } ;

STRUCT: dylib_reference
    { isym_flags uint } ;

STRUCT: twolevel_hints_command
    { cmd     uint }
    { cmdsize uint }
    { offset  uint }
    { nhints  uint } ;

STRUCT: twolevel_hint
    { isub_image_itoc uint } ;

STRUCT: prebind_cksum_command
    { cmd     uint }
    { cmdsize uint }
    { cksum   uint } ;

STRUCT: uuid_command
    { cmd        uint        }
    { cmdsize    uint        }
    { uuid       uchar[16]   } ;

STRUCT: rpath_command
    { cmd         uint     }
    { cmdsize     uint     }
    { path        lc_str   } ;

STRUCT: linkedit_data_command
    { cmd         uint }
    { cmdsize     uint }
    { dataoff     uint }
    { datasize    uint } ;

STRUCT: encryption_info_command
    { cmd       uint }
    { cmdsize   uint }
    { cryptoff  uint }
    { cryptsize uint }
    { cryptid   uint } ;

STRUCT: dyld_info_command
    { cmd              uint }
    { cmdsize          uint }
    { rebase_off       uint }
    { rebase_size      uint }
    { bind_off         uint }
    { bind_size        uint }
    { weak_bind_off    uint }
    { weak_bind_size   uint }
    { lazy_bind_off    uint }
    { lazy_bind_size   uint }
    { export_off       uint }
    { export_size      uint } ;

CONSTANT: REBASE_TYPE_POINTER                     1
CONSTANT: REBASE_TYPE_TEXT_ABSOLUTE32             2
