| ... | @@ -1,4 +1,3 @@ | ... | @@ -1,4 +1,3 @@ |
| 1 | | | |
| 2 | pub const mach_header = extern struct { | 1 | pub const mach_header = extern struct { |
| 3 | magic: u32, | 2 | magic: u32, |
| 4 | cputype: cpu_type_t, | 3 | cputype: cpu_type_t, |
| ... | @@ -25,26 +24,43 @@ pub const load_command = extern struct { | ... | @@ -25,26 +24,43 @@ pub const load_command = extern struct { |
| 25 | cmdsize: u32, | 24 | cmdsize: u32, |
| 26 | }; | 25 | }; |
| 27 | | 26 | |
| 28 | | | |
| 29 | /// The symtab_command contains the offsets and sizes of the link-edit 4.3BSD | 27 | /// The symtab_command contains the offsets and sizes of the link-edit 4.3BSD |
| 30 | /// "stab" style symbol table information as described in the header files | 28 | /// "stab" style symbol table information as described in the header files |
| 31 | /// <nlist.h> and <stab.h>. | 29 | /// <nlist.h> and <stab.h>. |
| 32 | pub const symtab_command = extern struct { | 30 | pub const symtab_command = extern struct { |
| 33 | cmd: u32, /// LC_SYMTAB | 31 | /// LC_SYMTAB |
| 34 | cmdsize: u32, /// sizeof(struct symtab_command) | 32 | cmd: u32, |
| 35 | symoff: u32, /// symbol table offset | 33 | |
| 36 | nsyms: u32, /// number of symbol table entries | 34 | /// sizeof(struct symtab_command) |
| 37 | stroff: u32, /// string table offset | 35 | cmdsize: u32, |
| 38 | strsize: u32, /// string table size in bytes | 36 | |
| | 37 | /// symbol table offset |
| | 38 | symoff: u32, |
| | 39 | |
| | 40 | /// number of symbol table entries |
| | 41 | nsyms: u32, |
| | 42 | |
| | 43 | /// string table offset |
| | 44 | stroff: u32, |
| | 45 | |
| | 46 | /// string table size in bytes |
| | 47 | strsize: u32, |
| 39 | }; | 48 | }; |
| 40 | | 49 | |
| 41 | /// The linkedit_data_command contains the offsets and sizes of a blob | 50 | /// The linkedit_data_command contains the offsets and sizes of a blob |
| 42 | /// of data in the __LINKEDIT segment. | 51 | /// of data in the __LINKEDIT segment. |
| 43 | const linkedit_data_command = extern struct { | 52 | const linkedit_data_command = extern struct { |
| 44 | cmd: u32,/// LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE, LC_DYLIB_CODE_SIGN_DRS or LC_LINKER_OPTIMIZATION_HINT. | 53 | /// LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE, LC_DYLIB_CODE_SIGN_DRS or LC_LINKER_OPTIMIZATION_HINT. |
| 45 | cmdsize: u32, /// sizeof(struct linkedit_data_command) | 54 | cmd: u32, |
| 46 | dataoff: u32 , /// file offset of data in __LINKEDIT segment | 55 | |
| 47 | datasize: u32 , /// file size of data in __LINKEDIT segment | 56 | /// sizeof(struct linkedit_data_command) |
| | 57 | cmdsize: u32, |
| | 58 | |
| | 59 | /// file offset of data in __LINKEDIT segment |
| | 60 | dataoff: u32, |
| | 61 | |
| | 62 | /// file size of data in __LINKEDIT segment |
| | 63 | datasize: u32, |
| 48 | }; | 64 | }; |
| 49 | | 65 | |
| 50 | /// The segment load command indicates that a part of this file is to be | 66 | /// The segment load command indicates that a part of this file is to be |
| ... | @@ -58,16 +74,35 @@ const linkedit_data_command = extern struct { | ... | @@ -58,16 +74,35 @@ const linkedit_data_command = extern struct { |
| 58 | /// section structures directly follow the segment command and their size is | 74 | /// section structures directly follow the segment command and their size is |
| 59 | /// reflected in cmdsize. | 75 | /// reflected in cmdsize. |
| 60 | pub const segment_command = extern struct { | 76 | pub const segment_command = extern struct { |
| 61 | cmd: u32,/// LC_SEGMENT | 77 | /// LC_SEGMENT |
| 62 | cmdsize: u32,/// includes sizeof section structs | 78 | cmd: u32, |
| 63 | segname: [16]u8,/// segment name | 79 | |
| 64 | vmaddr: u32,/// memory address of this segment | 80 | /// includes sizeof section structs |
| 65 | vmsize: u32,/// memory size of this segment | 81 | cmdsize: u32, |
| 66 | fileoff: u32,/// file offset of this segment | 82 | |
| 67 | filesize: u32,/// amount to map from the file | 83 | /// segment name |
| 68 | maxprot: vm_prot_t,/// maximum VM protection | 84 | segname: [16]u8, |
| 69 | initprot: vm_prot_t,/// initial VM protection | 85 | |
| 70 | nsects: u32,/// number of sections in segment | 86 | /// memory address of this segment |
| | 87 | vmaddr: u32, |
| | 88 | |
| | 89 | /// memory size of this segment |
| | 90 | vmsize: u32, |
| | 91 | |
| | 92 | /// file offset of this segment |
| | 93 | fileoff: u32, |
| | 94 | |
| | 95 | /// amount to map from the file |
| | 96 | filesize: u32, |
| | 97 | |
| | 98 | /// maximum VM protection |
| | 99 | maxprot: vm_prot_t, |
| | 100 | |
| | 101 | /// initial VM protection |
| | 102 | initprot: vm_prot_t, |
| | 103 | |
| | 104 | /// number of sections in segment |
| | 105 | nsects: u32, |
| 71 | flags: u32, | 106 | flags: u32, |
| 72 | }; | 107 | }; |
| 73 | | 108 | |
| ... | @@ -76,17 +111,36 @@ pub const segment_command = extern struct { | ... | @@ -76,17 +111,36 @@ pub const segment_command = extern struct { |
| 76 | /// sections then section_64 structures directly follow the 64-bit segment | 111 | /// sections then section_64 structures directly follow the 64-bit segment |
| 77 | /// command and their size is reflected in cmdsize. | 112 | /// command and their size is reflected in cmdsize. |
| 78 | pub const segment_command_64 = extern struct { | 113 | pub const segment_command_64 = extern struct { |
| 79 | cmd: u32, /// LC_SEGMENT_64 | 114 | /// LC_SEGMENT_64 |
| 80 | cmdsize: u32, /// includes sizeof section_64 structs | 115 | cmd: u32, |
| 81 | segname: [16]u8, /// segment name | 116 | |
| 82 | vmaddr: u64, /// memory address of this segment | 117 | /// includes sizeof section_64 structs |
| 83 | vmsize: u64, /// memory size of this segment | 118 | cmdsize: u32, |
| 84 | fileoff: u64, /// file offset of this segment | 119 | |
| 85 | filesize: u64, /// amount to map from the file | 120 | /// segment name |
| 86 | maxprot: vm_prot_t, /// maximum VM protection | 121 | segname: [16]u8, |
| 87 | initprot: vm_prot_t, /// initial VM protection | 122 | |
| 88 | nsects: u32, /// number of sections in segment | 123 | /// memory address of this segment |
| 89 | flags: u32, | 124 | vmaddr: u64, |
| | 125 | |
| | 126 | /// memory size of this segment |
| | 127 | vmsize: u64, |
| | 128 | |
| | 129 | /// file offset of this segment |
| | 130 | fileoff: u64, |
| | 131 | |
| | 132 | /// amount to map from the file |
| | 133 | filesize: u64, |
| | 134 | |
| | 135 | /// maximum VM protection |
| | 136 | maxprot: vm_prot_t, |
| | 137 | |
| | 138 | /// initial VM protection |
| | 139 | initprot: vm_prot_t, |
| | 140 | |
| | 141 | /// number of sections in segment |
| | 142 | nsects: u32, |
| | 143 | flags: u32, |
| 90 | }; | 144 | }; |
| 91 | | 145 | |
| 92 | /// A segment is made up of zero or more sections. Non-MH_OBJECT files have | 146 | /// A segment is made up of zero or more sections. Non-MH_OBJECT files have |
| ... | @@ -115,32 +169,76 @@ pub const segment_command_64 = extern struct { | ... | @@ -115,32 +169,76 @@ pub const segment_command_64 = extern struct { |
| 115 | /// fields of the section structure for mach object files is described in the | 169 | /// fields of the section structure for mach object files is described in the |
| 116 | /// header file <reloc.h>. | 170 | /// header file <reloc.h>. |
| 117 | pub const @"section" = extern struct { | 171 | pub const @"section" = extern struct { |
| 118 | sectname: [16]u8, /// name of this section | 172 | /// name of this section |
| 119 | segname: [16]u8, /// segment this section goes in | 173 | sectname: [16]u8, |
| 120 | addr: u32, /// memory address of this section | 174 | |
| 121 | size: u32, /// size in bytes of this section | 175 | /// segment this section goes in |
| 122 | offset: u32, /// file offset of this section | 176 | segname: [16]u8, |
| 123 | @"align": u32, /// section alignment (power of 2) | 177 | |
| 124 | reloff: u32, /// file offset of relocation entries | 178 | /// memory address of this section |
| 125 | nreloc: u32, /// number of relocation entries | 179 | addr: u32, |
| 126 | flags: u32, /// flags (section type and attributes | 180 | |
| 127 | reserved1: u32, /// reserved (for offset or index) | 181 | /// size in bytes of this section |
| 128 | reserved2: u32, /// reserved (for count or sizeof) | 182 | size: u32, |
| | 183 | |
| | 184 | /// file offset of this section |
| | 185 | offset: u32, |
| | 186 | |
| | 187 | /// section alignment (power of 2) |
| | 188 | @"align": u32, |
| | 189 | |
| | 190 | /// file offset of relocation entries |
| | 191 | reloff: u32, |
| | 192 | |
| | 193 | /// number of relocation entries |
| | 194 | nreloc: u32, |
| | 195 | |
| | 196 | /// flags (section type and attributes |
| | 197 | flags: u32, |
| | 198 | |
| | 199 | /// reserved (for offset or index) |
| | 200 | reserved1: u32, |
| | 201 | |
| | 202 | /// reserved (for count or sizeof) |
| | 203 | reserved2: u32, |
| 129 | }; | 204 | }; |
| 130 | | 205 | |
| 131 | pub const section_64 = extern struct { | 206 | pub const section_64 = extern struct { |
| 132 | sectname: [16]u8, /// name of this section | 207 | /// name of this section |
| 133 | segname: [16]u8, /// segment this section goes in | 208 | sectname: [16]u8, |
| 134 | addr: u64, /// memory address of this section | 209 | |
| 135 | size: u64, /// size in bytes of this section | 210 | /// segment this section goes in |
| 136 | offset: u32, /// file offset of this section | 211 | segname: [16]u8, |
| 137 | @"align": u32, /// section alignment (power of 2) | 212 | |
| 138 | reloff: u32, /// file offset of relocation entries | 213 | /// memory address of this section |
| 139 | nreloc: u32, /// number of relocation entries | 214 | addr: u64, |
| 140 | flags: u32, /// flags (section type and attributes | 215 | |
| 141 | reserved1: u32, /// reserved (for offset or index) | 216 | /// size in bytes of this section |
| 142 | reserved2: u32, /// reserved (for count or sizeof) | 217 | size: u64, |
| 143 | reserved3: u32, /// reserved | 218 | |
| | 219 | /// file offset of this section |
| | 220 | offset: u32, |
| | 221 | |
| | 222 | /// section alignment (power of 2) |
| | 223 | @"align": u32, |
| | 224 | |
| | 225 | /// file offset of relocation entries |
| | 226 | reloff: u32, |
| | 227 | |
| | 228 | /// number of relocation entries |
| | 229 | nreloc: u32, |
| | 230 | |
| | 231 | /// flags (section type and attributes |
| | 232 | flags: u32, |
| | 233 | |
| | 234 | /// reserved (for offset or index) |
| | 235 | reserved1: u32, |
| | 236 | |
| | 237 | /// reserved (for count or sizeof) |
| | 238 | reserved2: u32, |
| | 239 | |
| | 240 | /// reserved |
| | 241 | reserved3: u32, |
| 144 | }; | 242 | }; |
| 145 | | 243 | |
| 146 | pub const nlist = extern struct { | 244 | pub const nlist = extern struct { |
| ... | @@ -168,116 +266,287 @@ pub const nlist_64 = extern struct { | ... | @@ -168,116 +266,287 @@ pub const nlist_64 = extern struct { |
| 168 | /// simply be ignored. | 266 | /// simply be ignored. |
| 169 | pub const LC_REQ_DYLD = 0x80000000; | 267 | pub const LC_REQ_DYLD = 0x80000000; |
| 170 | | 268 | |
| 171 | pub const LC_SEGMENT = 0x1; /// segment of this file to be mapped | 269 | /// segment of this file to be mapped |
| 172 | pub const LC_SYMTAB = 0x2; /// link-edit stab symbol table info | 270 | pub const LC_SEGMENT = 0x1; |
| 173 | pub const LC_SYMSEG = 0x3; /// link-edit gdb symbol table info (obsolete) | 271 | |
| 174 | pub const LC_THREAD = 0x4; /// thread | 272 | /// link-edit stab symbol table info |
| 175 | pub const LC_UNIXTHREAD = 0x5; /// unix thread (includes a stack) | 273 | pub const LC_SYMTAB = 0x2; |
| 176 | pub const LC_LOADFVMLIB = 0x6; /// load a specified fixed VM shared library | 274 | |
| 177 | pub const LC_IDFVMLIB = 0x7; /// fixed VM shared library identification | 275 | /// link-edit gdb symbol table info (obsolete) |
| 178 | pub const LC_IDENT = 0x8; /// object identification info (obsolete) | 276 | pub const LC_SYMSEG = 0x3; |
| 179 | pub const LC_FVMFILE = 0x9; /// fixed VM file inclusion (internal use) | 277 | |
| 180 | pub const LC_PREPAGE = 0xa; /// prepage command (internal use) | 278 | /// thread |
| 181 | pub const LC_DYSYMTAB = 0xb; /// dynamic link-edit symbol table info | 279 | pub const LC_THREAD = 0x4; |
| 182 | pub const LC_LOAD_DYLIB = 0xc; /// load a dynamically linked shared library | 280 | |
| 183 | pub const LC_ID_DYLIB = 0xd; /// dynamically linked shared lib ident | 281 | /// unix thread (includes a stack) |
| 184 | pub const LC_LOAD_DYLINKER = 0xe; /// load a dynamic linker | 282 | pub const LC_UNIXTHREAD = 0x5; |
| 185 | pub const LC_ID_DYLINKER = 0xf; /// dynamic linker identification | 283 | |
| 186 | pub const LC_PREBOUND_DYLIB = 0x10; /// modules prebound for a dynamically | 284 | /// load a specified fixed VM shared library |
| 187 | pub const LC_ROUTINES = 0x11; /// image routines | 285 | pub const LC_LOADFVMLIB = 0x6; |
| 188 | pub const LC_SUB_FRAMEWORK = 0x12; /// sub framework | 286 | |
| 189 | pub const LC_SUB_UMBRELLA = 0x13; /// sub umbrella | 287 | /// fixed VM shared library identification |
| 190 | pub const LC_SUB_CLIENT = 0x14; /// sub client | 288 | pub const LC_IDFVMLIB = 0x7; |
| 191 | pub const LC_SUB_LIBRARY = 0x15; /// sub library | 289 | |
| 192 | pub const LC_TWOLEVEL_HINTS = 0x16; /// two-level namespace lookup hints | 290 | /// object identification info (obsolete) |
| 193 | pub const LC_PREBIND_CKSUM = 0x17; /// prebind checksum | 291 | pub const LC_IDENT = 0x8; |
| | 292 | |
| | 293 | /// fixed VM file inclusion (internal use) |
| | 294 | pub const LC_FVMFILE = 0x9; |
| | 295 | |
| | 296 | /// prepage command (internal use) |
| | 297 | pub const LC_PREPAGE = 0xa; |
| | 298 | |
| | 299 | /// dynamic link-edit symbol table info |
| | 300 | pub const LC_DYSYMTAB = 0xb; |
| | 301 | |
| | 302 | /// load a dynamically linked shared library |
| | 303 | pub const LC_LOAD_DYLIB = 0xc; |
| | 304 | |
| | 305 | /// dynamically linked shared lib ident |
| | 306 | pub const LC_ID_DYLIB = 0xd; |
| | 307 | |
| | 308 | /// load a dynamic linker |
| | 309 | pub const LC_LOAD_DYLINKER = 0xe; |
| | 310 | |
| | 311 | /// dynamic linker identification |
| | 312 | pub const LC_ID_DYLINKER = 0xf; |
| | 313 | |
| | 314 | /// modules prebound for a dynamically |
| | 315 | pub const LC_PREBOUND_DYLIB = 0x10; |
| | 316 | |
| | 317 | /// image routines |
| | 318 | pub const LC_ROUTINES = 0x11; |
| | 319 | |
| | 320 | /// sub framework |
| | 321 | pub const LC_SUB_FRAMEWORK = 0x12; |
| | 322 | |
| | 323 | /// sub umbrella |
| | 324 | pub const LC_SUB_UMBRELLA = 0x13; |
| | 325 | |
| | 326 | /// sub client |
| | 327 | pub const LC_SUB_CLIENT = 0x14; |
| | 328 | |
| | 329 | /// sub library |
| | 330 | pub const LC_SUB_LIBRARY = 0x15; |
| | 331 | |
| | 332 | /// two-level namespace lookup hints |
| | 333 | pub const LC_TWOLEVEL_HINTS = 0x16; |
| | 334 | |
| | 335 | /// prebind checksum |
| | 336 | pub const LC_PREBIND_CKSUM = 0x17; |
| 194 | | 337 | |
| 195 | /// load a dynamically linked shared library that is allowed to be missing | 338 | /// load a dynamically linked shared library that is allowed to be missing |
| 196 | /// (all symbols are weak imported). | 339 | /// (all symbols are weak imported). |
| 197 | pub const LC_LOAD_WEAK_DYLIB = (0x18 | LC_REQ_DYLD); | 340 | pub const LC_LOAD_WEAK_DYLIB = (0x18 | LC_REQ_DYLD); |
| 198 | | 341 | |
| 199 | pub const LC_SEGMENT_64 = 0x19; /// 64-bit segment of this file to be mapped | 342 | /// 64-bit segment of this file to be mapped |
| 200 | pub const LC_ROUTINES_64 = 0x1a; /// 64-bit image routines | 343 | pub const LC_SEGMENT_64 = 0x19; |
| 201 | pub const LC_UUID = 0x1b; /// the uuid | 344 | |
| 202 | pub const LC_RPATH = (0x1c | LC_REQ_DYLD); /// runpath additions | 345 | /// 64-bit image routines |
| 203 | pub const LC_CODE_SIGNATURE = 0x1d; /// local of code signature | 346 | pub const LC_ROUTINES_64 = 0x1a; |
| 204 | pub const LC_SEGMENT_SPLIT_INFO = 0x1e; /// local of info to split segments | 347 | |
| 205 | pub const LC_REEXPORT_DYLIB = (0x1f | LC_REQ_DYLD); /// load and re-export dylib | 348 | /// the uuid |
| 206 | pub const LC_LAZY_LOAD_DYLIB = 0x20; /// delay load of dylib until first use | 349 | pub const LC_UUID = 0x1b; |
| 207 | pub const LC_ENCRYPTION_INFO = 0x21; /// encrypted segment information | 350 | |
| 208 | pub const LC_DYLD_INFO = 0x22; /// compressed dyld information | 351 | /// runpath additions |
| 209 | pub const LC_DYLD_INFO_ONLY = (0x22|LC_REQ_DYLD); /// compressed dyld information only | 352 | pub const LC_RPATH = (0x1c | LC_REQ_DYLD); |
| 210 | pub const LC_LOAD_UPWARD_DYLIB = (0x23 | LC_REQ_DYLD); /// load upward dylib | 353 | |
| 211 | pub const LC_VERSION_MIN_MACOSX = 0x24; /// build for MacOSX min OS version | 354 | /// local of code signature |
| 212 | pub const LC_VERSION_MIN_IPHONEOS = 0x25; /// build for iPhoneOS min OS version | 355 | pub const LC_CODE_SIGNATURE = 0x1d; |
| 213 | pub const LC_FUNCTION_STARTS = 0x26; /// compressed table of function start addresses | 356 | |
| 214 | pub const LC_DYLD_ENVIRONMENT = 0x27; /// string for dyld to treat like environment variable | 357 | /// local of info to split segments |
| 215 | pub const LC_MAIN = (0x28|LC_REQ_DYLD); /// replacement for LC_UNIXTHREAD | 358 | pub const LC_SEGMENT_SPLIT_INFO = 0x1e; |
| 216 | pub const LC_DATA_IN_CODE = 0x29; /// table of non-instructions in __text | 359 | |
| 217 | pub const LC_SOURCE_VERSION = 0x2A; /// source version used to build binary | 360 | /// load and re-export dylib |
| 218 | pub const LC_DYLIB_CODE_SIGN_DRS = 0x2B; /// Code signing DRs copied from linked dylibs | 361 | pub const LC_REEXPORT_DYLIB = (0x1f | LC_REQ_DYLD); |
| 219 | pub const LC_ENCRYPTION_INFO_64 = 0x2C; /// 64-bit encrypted segment information | 362 | |
| 220 | pub const LC_LINKER_OPTION = 0x2D; /// linker options in MH_OBJECT files | 363 | /// delay load of dylib until first use |
| 221 | pub const LC_LINKER_OPTIMIZATION_HINT = 0x2E; /// optimization hints in MH_OBJECT files | 364 | pub const LC_LAZY_LOAD_DYLIB = 0x20; |
| 222 | pub const LC_VERSION_MIN_TVOS = 0x2F; /// build for AppleTV min OS version | 365 | |
| 223 | pub const LC_VERSION_MIN_WATCHOS = 0x30; /// build for Watch min OS version | 366 | /// encrypted segment information |
| 224 | pub const LC_NOTE = 0x31; /// arbitrary data included within a Mach-O file | 367 | pub const LC_ENCRYPTION_INFO = 0x21; |
| 225 | pub const LC_BUILD_VERSION = 0x32; /// build for platform min OS version | 368 | |
| 226 | | 369 | /// compressed dyld information |
| 227 | pub const MH_MAGIC = 0xfeedface; /// the mach magic number | 370 | pub const LC_DYLD_INFO = 0x22; |
| 228 | pub const MH_CIGAM = 0xcefaedfe; /// NXSwapInt(MH_MAGIC) | 371 | |
| 229 | | 372 | /// compressed dyld information only |
| 230 | pub const MH_MAGIC_64 = 0xfeedfacf; /// the 64-bit mach magic number | 373 | pub const LC_DYLD_INFO_ONLY = (0x22 | LC_REQ_DYLD); |
| 231 | pub const MH_CIGAM_64 = 0xcffaedfe; /// NXSwapInt(MH_MAGIC_64) | 374 | |
| 232 | | 375 | /// load upward dylib |
| 233 | pub const MH_OBJECT = 0x1; /// relocatable object file | 376 | pub const LC_LOAD_UPWARD_DYLIB = (0x23 | LC_REQ_DYLD); |
| 234 | pub const MH_EXECUTE = 0x2; /// demand paged executable file | 377 | |
| 235 | pub const MH_FVMLIB = 0x3; /// fixed VM shared library file | 378 | /// build for MacOSX min OS version |
| 236 | pub const MH_CORE = 0x4; /// core file | 379 | pub const LC_VERSION_MIN_MACOSX = 0x24; |
| 237 | pub const MH_PRELOAD = 0x5; /// preloaded executable file | 380 | |
| 238 | pub const MH_DYLIB = 0x6; /// dynamically bound shared library | 381 | /// build for iPhoneOS min OS version |
| 239 | pub const MH_DYLINKER = 0x7; /// dynamic link editor | 382 | pub const LC_VERSION_MIN_IPHONEOS = 0x25; |
| 240 | pub const MH_BUNDLE = 0x8; /// dynamically bound bundle file | 383 | |
| 241 | pub const MH_DYLIB_STUB = 0x9; /// shared library stub for static linking only, no section contents | 384 | /// compressed table of function start addresses |
| 242 | pub const MH_DSYM = 0xa; /// companion file with only debug sections | 385 | pub const LC_FUNCTION_STARTS = 0x26; |
| 243 | pub const MH_KEXT_BUNDLE = 0xb; /// x86_64 kexts | 386 | |
| | 387 | /// string for dyld to treat like environment variable |
| | 388 | pub const LC_DYLD_ENVIRONMENT = 0x27; |
| | 389 | |
| | 390 | /// replacement for LC_UNIXTHREAD |
| | 391 | pub const LC_MAIN = (0x28 | LC_REQ_DYLD); |
| | 392 | |
| | 393 | /// table of non-instructions in __text |
| | 394 | pub const LC_DATA_IN_CODE = 0x29; |
| | 395 | |
| | 396 | /// source version used to build binary |
| | 397 | pub const LC_SOURCE_VERSION = 0x2A; |
| | 398 | |
| | 399 | /// Code signing DRs copied from linked dylibs |
| | 400 | pub const LC_DYLIB_CODE_SIGN_DRS = 0x2B; |
| | 401 | |
| | 402 | /// 64-bit encrypted segment information |
| | 403 | pub const LC_ENCRYPTION_INFO_64 = 0x2C; |
| | 404 | |
| | 405 | /// linker options in MH_OBJECT files |
| | 406 | pub const LC_LINKER_OPTION = 0x2D; |
| | 407 | |
| | 408 | /// optimization hints in MH_OBJECT files |
| | 409 | pub const LC_LINKER_OPTIMIZATION_HINT = 0x2E; |
| | 410 | |
| | 411 | /// build for AppleTV min OS version |
| | 412 | pub const LC_VERSION_MIN_TVOS = 0x2F; |
| | 413 | |
| | 414 | /// build for Watch min OS version |
| | 415 | pub const LC_VERSION_MIN_WATCHOS = 0x30; |
| | 416 | |
| | 417 | /// arbitrary data included within a Mach-O file |
| | 418 | pub const LC_NOTE = 0x31; |
| | 419 | |
| | 420 | /// build for platform min OS version |
| | 421 | pub const LC_BUILD_VERSION = 0x32; |
| | 422 | |
| | 423 | /// the mach magic number |
| | 424 | pub const MH_MAGIC = 0xfeedface; |
| | 425 | |
| | 426 | /// NXSwapInt(MH_MAGIC) |
| | 427 | pub const MH_CIGAM = 0xcefaedfe; |
| | 428 | |
| | 429 | /// the 64-bit mach magic number |
| | 430 | pub const MH_MAGIC_64 = 0xfeedfacf; |
| | 431 | |
| | 432 | /// NXSwapInt(MH_MAGIC_64) |
| | 433 | pub const MH_CIGAM_64 = 0xcffaedfe; |
| | 434 | |
| | 435 | /// relocatable object file |
| | 436 | pub const MH_OBJECT = 0x1; |
| | 437 | |
| | 438 | /// demand paged executable file |
| | 439 | pub const MH_EXECUTE = 0x2; |
| | 440 | |
| | 441 | /// fixed VM shared library file |
| | 442 | pub const MH_FVMLIB = 0x3; |
| | 443 | |
| | 444 | /// core file |
| | 445 | pub const MH_CORE = 0x4; |
| | 446 | |
| | 447 | /// preloaded executable file |
| | 448 | pub const MH_PRELOAD = 0x5; |
| | 449 | |
| | 450 | /// dynamically bound shared library |
| | 451 | pub const MH_DYLIB = 0x6; |
| | 452 | |
| | 453 | /// dynamic link editor |
| | 454 | pub const MH_DYLINKER = 0x7; |
| | 455 | |
| | 456 | /// dynamically bound bundle file |
| | 457 | pub const MH_BUNDLE = 0x8; |
| | 458 | |
| | 459 | /// shared library stub for static linking only, no section contents |
| | 460 | pub const MH_DYLIB_STUB = 0x9; |
| | 461 | |
| | 462 | /// companion file with only debug sections |
| | 463 | pub const MH_DSYM = 0xa; |
| | 464 | |
| | 465 | /// x86_64 kexts |
| | 466 | pub const MH_KEXT_BUNDLE = 0xb; |
| 244 | | 467 | |
| 245 | // Constants for the flags field of the mach_header | 468 | // Constants for the flags field of the mach_header |
| 246 | | 469 | |
| 247 | pub const MH_NOUNDEFS = 0x1; /// the object file has no undefined references | 470 | /// the object file has no undefined references |
| 248 | pub const MH_INCRLINK = 0x2; /// the object file is the output of an incremental link against a base file and can't be link edited again | 471 | pub const MH_NOUNDEFS = 0x1; |
| 249 | pub const MH_DYLDLINK = 0x4; /// the object file is input for the dynamic linker and can't be staticly link edited again | 472 | |
| 250 | pub const MH_BINDATLOAD = 0x8; /// the object file's undefined references are bound by the dynamic linker when loaded. | 473 | /// the object file is the output of an incremental link against a base file and can't be link edited again |
| 251 | pub const MH_PREBOUND = 0x10; /// the file has its dynamic undefined references prebound. | 474 | pub const MH_INCRLINK = 0x2; |
| 252 | pub const MH_SPLIT_SEGS = 0x20; /// the file has its read-only and read-write segments split | 475 | |
| 253 | pub const MH_LAZY_INIT = 0x40; /// the shared library init routine is to be run lazily via catching memory faults to its writeable segments (obsolete) | 476 | /// the object file is input for the dynamic linker and can't be staticly link edited again |
| 254 | pub const MH_TWOLEVEL = 0x80; /// the image is using two-level name space bindings | 477 | pub const MH_DYLDLINK = 0x4; |
| 255 | pub const MH_FORCE_FLAT = 0x100; /// the executable is forcing all images to use flat name space bindings | 478 | |
| 256 | pub const MH_NOMULTIDEFS = 0x200; /// this umbrella guarantees no multiple defintions of symbols in its sub-images so the two-level namespace hints can always be used. | 479 | /// the object file's undefined references are bound by the dynamic linker when loaded. |
| 257 | pub const MH_NOFIXPREBINDING = 0x400; /// do not have dyld notify the prebinding agent about this executable | 480 | pub const MH_BINDATLOAD = 0x8; |
| 258 | pub const MH_PREBINDABLE = 0x800; /// the binary is not prebound but can have its prebinding redone. only used when MH_PREBOUND is not set. | 481 | |
| 259 | pub const MH_ALLMODSBOUND = 0x1000; /// indicates that this binary binds to all two-level namespace modules of its dependent libraries. only used when MH_PREBINDABLE and MH_TWOLEVEL are both set. | 482 | /// the file has its dynamic undefined references prebound. |
| 260 | pub const MH_SUBSECTIONS_VIA_SYMBOLS = 0x2000;/// safe to divide up the sections into sub-sections via symbols for dead code stripping | 483 | pub const MH_PREBOUND = 0x10; |
| 261 | pub const MH_CANONICAL = 0x4000; /// the binary has been canonicalized via the unprebind operation | 484 | |
| 262 | pub const MH_WEAK_DEFINES = 0x8000; /// the final linked image contains external weak symbols | 485 | /// the file has its read-only and read-write segments split |
| 263 | pub const MH_BINDS_TO_WEAK = 0x10000; /// the final linked image uses weak symbols | 486 | pub const MH_SPLIT_SEGS = 0x20; |
| 264 | | 487 | |
| 265 | pub const MH_ALLOW_STACK_EXECUTION = 0x20000;/// When this bit is set, all stacks in the task will be given stack execution privilege. Only used in MH_EXECUTE filetypes. | 488 | /// the shared library init routine is to be run lazily via catching memory faults to its writeable segments (obsolete) |
| 266 | pub const MH_ROOT_SAFE = 0x40000; /// When this bit is set, the binary declares it is safe for use in processes with uid zero | 489 | pub const MH_LAZY_INIT = 0x40; |
| 267 | | 490 | |
| 268 | pub const MH_SETUID_SAFE = 0x80000; /// When this bit is set, the binary declares it is safe for use in processes when issetugid() is true | 491 | /// the image is using two-level name space bindings |
| 269 | | 492 | pub const MH_TWOLEVEL = 0x80; |
| 270 | pub const MH_NO_REEXPORTED_DYLIBS = 0x100000; /// When this bit is set on a dylib, the static linker does not need to examine dependent dylibs to see if any are re-exported | 493 | |
| 271 | pub const MH_PIE = 0x200000; /// When this bit is set, the OS will load the main executable at a random address. Only used in MH_EXECUTE filetypes. | 494 | /// the executable is forcing all images to use flat name space bindings |
| 272 | pub const MH_DEAD_STRIPPABLE_DYLIB = 0x400000; /// Only for use on dylibs. When linking against a dylib that has this bit set, the static linker will automatically not create a LC_LOAD_DYLIB load command to the dylib if no symbols are being referenced from the dylib. | 495 | pub const MH_FORCE_FLAT = 0x100; |
| 273 | pub const MH_HAS_TLV_DESCRIPTORS = 0x800000; /// Contains a section of type S_THREAD_LOCAL_VARIABLES | 496 | |
| 274 | | 497 | /// this umbrella guarantees no multiple defintions of symbols in its sub-images so the two-level namespace hints can always be used. |
| 275 | pub const MH_NO_HEAP_EXECUTION = 0x1000000; /// When this bit is set, the OS will run the main executable with a non-executable heap even on platforms (e.g. i386) that don't require it. Only used in MH_EXECUTE filetypes. | 498 | pub const MH_NOMULTIDEFS = 0x200; |
| 276 | | 499 | |
| 277 | pub const MH_APP_EXTENSION_SAFE = 0x02000000; /// The code was linked for use in an application extension. | 500 | /// do not have dyld notify the prebinding agent about this executable |
| 278 | | 501 | pub const MH_NOFIXPREBINDING = 0x400; |
| 279 | pub const MH_NLIST_OUTOFSYNC_WITH_DYLDINFO = 0x04000000; /// The external symbols listed in the nlist symbol table do not include all the symbols listed in the dyld info. | 502 | |
| | 503 | /// the binary is not prebound but can have its prebinding redone. only used when MH_PREBOUND is not set. |
| | 504 | pub const MH_PREBINDABLE = 0x800; |
| | 505 | |
| | 506 | /// indicates that this binary binds to all two-level namespace modules of its dependent libraries. only used when MH_PREBINDABLE and MH_TWOLEVEL are both set. |
| | 507 | pub const MH_ALLMODSBOUND = 0x1000; |
| | 508 | |
| | 509 | /// safe to divide up the sections into sub-sections via symbols for dead code stripping |
| | 510 | pub const MH_SUBSECTIONS_VIA_SYMBOLS = 0x2000; |
| | 511 | |
| | 512 | /// the binary has been canonicalized via the unprebind operation |
| | 513 | pub const MH_CANONICAL = 0x4000; |
| | 514 | |
| | 515 | /// the final linked image contains external weak symbols |
| | 516 | pub const MH_WEAK_DEFINES = 0x8000; |
| | 517 | |
| | 518 | /// the final linked image uses weak symbols |
| | 519 | pub const MH_BINDS_TO_WEAK = 0x10000; |
| | 520 | |
| | 521 | /// When this bit is set, all stacks in the task will be given stack execution privilege. Only used in MH_EXECUTE filetypes. |
| | 522 | pub const MH_ALLOW_STACK_EXECUTION = 0x20000; |
| | 523 | |
| | 524 | /// When this bit is set, the binary declares it is safe for use in processes with uid zero |
| | 525 | pub const MH_ROOT_SAFE = 0x40000; |
| | 526 | |
| | 527 | /// When this bit is set, the binary declares it is safe for use in processes when issetugid() is true |
| | 528 | pub const MH_SETUID_SAFE = 0x80000; |
| | 529 | |
| | 530 | /// When this bit is set on a dylib, the static linker does not need to examine dependent dylibs to see if any are re-exported |
| | 531 | pub const MH_NO_REEXPORTED_DYLIBS = 0x100000; |
| 280 | | 532 | |
| | 533 | /// When this bit is set, the OS will load the main executable at a random address. Only used in MH_EXECUTE filetypes. |
| | 534 | pub const MH_PIE = 0x200000; |
| | 535 | |
| | 536 | /// Only for use on dylibs. When linking against a dylib that has this bit set, the static linker will automatically not create a LC_LOAD_DYLIB load command to the dylib if no symbols are being referenced from the dylib. |
| | 537 | pub const MH_DEAD_STRIPPABLE_DYLIB = 0x400000; |
| | 538 | |
| | 539 | /// Contains a section of type S_THREAD_LOCAL_VARIABLES |
| | 540 | pub const MH_HAS_TLV_DESCRIPTORS = 0x800000; |
| | 541 | |
| | 542 | /// When this bit is set, the OS will run the main executable with a non-executable heap even on platforms (e.g. i386) that don't require it. Only used in MH_EXECUTE filetypes. |
| | 543 | pub const MH_NO_HEAP_EXECUTION = 0x1000000; |
| | 544 | |
| | 545 | /// The code was linked for use in an application extension. |
| | 546 | pub const MH_APP_EXTENSION_SAFE = 0x02000000; |
| | 547 | |
| | 548 | /// The external symbols listed in the nlist symbol table do not include all the symbols listed in the dyld info. |
| | 549 | pub const MH_NLIST_OUTOFSYNC_WITH_DYLDINFO = 0x04000000; |
| 281 | | 550 | |
| 282 | /// The flags field of a section structure is separated into two parts a section | 551 | /// The flags field of a section structure is separated into two parts a section |
| 283 | /// type and section attributes. The section types are mutually exclusive (it | 552 | /// type and section attributes. The section types are mutually exclusive (it |
| ... | @@ -285,52 +554,129 @@ pub const MH_NLIST_OUTOFSYNC_WITH_DYLDINFO = 0x04000000; /// The external symbol | ... | @@ -285,52 +554,129 @@ pub const MH_NLIST_OUTOFSYNC_WITH_DYLDINFO = 0x04000000; /// The external symbol |
| 285 | /// than one attribute). | 554 | /// than one attribute). |
| 286 | /// 256 section types | 555 | /// 256 section types |
| 287 | pub const SECTION_TYPE = 0x000000ff; | 556 | pub const SECTION_TYPE = 0x000000ff; |
| 288 | pub const SECTION_ATTRIBUTES = 0xffffff00; /// 24 section attributes | 557 | |
| 289 | | 558 | /// 24 section attributes |
| 290 | pub const S_REGULAR = 0x0; /// regular section | 559 | pub const SECTION_ATTRIBUTES = 0xffffff00; |
| 291 | pub const S_ZEROFILL = 0x1; /// zero fill on demand section | 560 | |
| 292 | pub const S_CSTRING_LITERALS = 0x2; /// section with only literal C string | 561 | /// regular section |
| 293 | pub const S_4BYTE_LITERALS = 0x3; /// section with only 4 byte literals | 562 | pub const S_REGULAR = 0x0; |
| 294 | pub const S_8BYTE_LITERALS = 0x4; /// section with only 8 byte literals | 563 | |
| 295 | pub const S_LITERAL_POINTERS = 0x5; /// section with only pointers to | 564 | /// zero fill on demand section |
| 296 | | 565 | pub const S_ZEROFILL = 0x1; |
| 297 | | 566 | |
| 298 | pub const N_STAB = 0xe0; /// if any of these bits set, a symbolic debugging entry | 567 | /// section with only literal C string |
| 299 | pub const N_PEXT = 0x10; /// private external symbol bit | 568 | pub const S_CSTRING_LITERALS = 0x2; |
| 300 | pub const N_TYPE = 0x0e; /// mask for the type bits | 569 | |
| 301 | pub const N_EXT = 0x01; /// external symbol bit, set for external symbols | 570 | /// section with only 4 byte literals |
| 302 | | 571 | pub const S_4BYTE_LITERALS = 0x3; |
| 303 | | 572 | |
| 304 | pub const N_GSYM = 0x20; /// global symbol: name,,NO_SECT,type,0 | 573 | /// section with only 8 byte literals |
| 305 | pub const N_FNAME = 0x22; /// procedure name (f77 kludge): name,,NO_SECT,0,0 | 574 | pub const S_8BYTE_LITERALS = 0x4; |
| 306 | pub const N_FUN = 0x24; /// procedure: name,,n_sect,linenumber,address | 575 | |
| 307 | pub const N_STSYM = 0x26; /// static symbol: name,,n_sect,type,address | 576 | /// section with only pointers to |
| 308 | pub const N_LCSYM = 0x28; /// .lcomm symbol: name,,n_sect,type,address | 577 | pub const S_LITERAL_POINTERS = 0x5; |
| 309 | pub const N_BNSYM = 0x2e; /// begin nsect sym: 0,,n_sect,0,address | 578 | |
| 310 | pub const N_AST = 0x32; /// AST file path: name,,NO_SECT,0,0 | 579 | /// if any of these bits set, a symbolic debugging entry |
| 311 | pub const N_OPT = 0x3c; /// emitted with gcc2_compiled and in gcc source | 580 | pub const N_STAB = 0xe0; |
| 312 | pub const N_RSYM = 0x40; /// register sym: name,,NO_SECT,type,register | 581 | |
| 313 | pub const N_SLINE = 0x44; /// src line: 0,,n_sect,linenumber,address | 582 | /// private external symbol bit |
| 314 | pub const N_ENSYM = 0x4e; /// end nsect sym: 0,,n_sect,0,address | 583 | pub const N_PEXT = 0x10; |
| 315 | pub const N_SSYM = 0x60; /// structure elt: name,,NO_SECT,type,struct_offset | 584 | |
| 316 | pub const N_SO = 0x64; /// source file name: name,,n_sect,0,address | 585 | /// mask for the type bits |
| 317 | pub const N_OSO = 0x66; /// object file name: name,,0,0,st_mtime | 586 | pub const N_TYPE = 0x0e; |
| 318 | pub const N_LSYM = 0x80; /// local sym: name,,NO_SECT,type,offset | 587 | |
| 319 | pub const N_BINCL = 0x82; /// include file beginning: name,,NO_SECT,0,sum | 588 | /// external symbol bit, set for external symbols |
| 320 | pub const N_SOL = 0x84; /// #included file name: name,,n_sect,0,address | 589 | pub const N_EXT = 0x01; |
| 321 | pub const N_PARAMS = 0x86; /// compiler parameters: name,,NO_SECT,0,0 | 590 | |
| 322 | pub const N_VERSION = 0x88; /// compiler version: name,,NO_SECT,0,0 | 591 | /// global symbol: name,,NO_SECT,type,0 |
| 323 | pub const N_OLEVEL = 0x8A; /// compiler -O level: name,,NO_SECT,0,0 | 592 | pub const N_GSYM = 0x20; |
| 324 | pub const N_PSYM = 0xa0; /// parameter: name,,NO_SECT,type,offset | 593 | |
| 325 | pub const N_EINCL = 0xa2; /// include file end: name,,NO_SECT,0,0 | 594 | /// procedure name (f77 kludge): name,,NO_SECT,0,0 |
| 326 | pub const N_ENTRY = 0xa4; /// alternate entry: name,,n_sect,linenumber,address | 595 | pub const N_FNAME = 0x22; |
| 327 | pub const N_LBRAC = 0xc0; /// left bracket: 0,,NO_SECT,nesting level,address | 596 | |
| 328 | pub const N_EXCL = 0xc2; /// deleted include file: name,,NO_SECT,0,sum | 597 | /// procedure: name,,n_sect,linenumber,address |
| 329 | pub const N_RBRAC = 0xe0; /// right bracket: 0,,NO_SECT,nesting level,address | 598 | pub const N_FUN = 0x24; |
| 330 | pub const N_BCOMM = 0xe2; /// begin common: name,,NO_SECT,0,0 | 599 | |
| 331 | pub const N_ECOMM = 0xe4; /// end common: name,,n_sect,0,0 | 600 | /// static symbol: name,,n_sect,type,address |
| 332 | pub const N_ECOML = 0xe8; /// end common (local name): 0,,n_sect,0,address | 601 | pub const N_STSYM = 0x26; |
| 333 | pub const N_LENG = 0xfe; /// second stab entry with length information | 602 | |
| | 603 | /// .lcomm symbol: name,,n_sect,type,address |
| | 604 | pub const N_LCSYM = 0x28; |
| | 605 | |
| | 606 | /// begin nsect sym: 0,,n_sect,0,address |
| | 607 | pub const N_BNSYM = 0x2e; |
| | 608 | |
| | 609 | /// AST file path: name,,NO_SECT,0,0 |
| | 610 | pub const N_AST = 0x32; |
| | 611 | |
| | 612 | /// emitted with gcc2_compiled and in gcc source |
| | 613 | pub const N_OPT = 0x3c; |
| | 614 | |
| | 615 | /// register sym: name,,NO_SECT,type,register |
| | 616 | pub const N_RSYM = 0x40; |
| | 617 | |
| | 618 | /// src line: 0,,n_sect,linenumber,address |
| | 619 | pub const N_SLINE = 0x44; |
| | 620 | |
| | 621 | /// end nsect sym: 0,,n_sect,0,address |
| | 622 | pub const N_ENSYM = 0x4e; |
| | 623 | |
| | 624 | /// structure elt: name,,NO_SECT,type,struct_offset |
| | 625 | pub const N_SSYM = 0x60; |
| | 626 | |
| | 627 | /// source file name: name,,n_sect,0,address |
| | 628 | pub const N_SO = 0x64; |
| | 629 | |
| | 630 | /// object file name: name,,0,0,st_mtime |
| | 631 | pub const N_OSO = 0x66; |
| | 632 | |
| | 633 | /// local sym: name,,NO_SECT,type,offset |
| | 634 | pub const N_LSYM = 0x80; |
| | 635 | |
| | 636 | /// include file beginning: name,,NO_SECT,0,sum |
| | 637 | pub const N_BINCL = 0x82; |
| | 638 | |
| | 639 | /// #included file name: name,,n_sect,0,address |
| | 640 | pub const N_SOL = 0x84; |
| | 641 | |
| | 642 | /// compiler parameters: name,,NO_SECT,0,0 |
| | 643 | pub const N_PARAMS = 0x86; |
| | 644 | |
| | 645 | /// compiler version: name,,NO_SECT,0,0 |
| | 646 | pub const N_VERSION = 0x88; |
| | 647 | |
| | 648 | /// compiler -O level: name,,NO_SECT,0,0 |
| | 649 | pub const N_OLEVEL = 0x8A; |
| | 650 | |
| | 651 | /// parameter: name,,NO_SECT,type,offset |
| | 652 | pub const N_PSYM = 0xa0; |
| | 653 | |
| | 654 | /// include file end: name,,NO_SECT,0,0 |
| | 655 | pub const N_EINCL = 0xa2; |
| | 656 | |
| | 657 | /// alternate entry: name,,n_sect,linenumber,address |
| | 658 | pub const N_ENTRY = 0xa4; |
| | 659 | |
| | 660 | /// left bracket: 0,,NO_SECT,nesting level,address |
| | 661 | pub const N_LBRAC = 0xc0; |
| | 662 | |
| | 663 | /// deleted include file: name,,NO_SECT,0,sum |
| | 664 | pub const N_EXCL = 0xc2; |
| | 665 | |
| | 666 | /// right bracket: 0,,NO_SECT,nesting level,address |
| | 667 | pub const N_RBRAC = 0xe0; |
| | 668 | |
| | 669 | /// begin common: name,,NO_SECT,0,0 |
| | 670 | pub const N_BCOMM = 0xe2; |
| | 671 | |
| | 672 | /// end common: name,,n_sect,0,0 |
| | 673 | pub const N_ECOMM = 0xe4; |
| | 674 | |
| | 675 | /// end common (local name): 0,,n_sect,0,address |
| | 676 | pub const N_ECOML = 0xe8; |
| | 677 | |
| | 678 | /// second stab entry with length information |
| | 679 | pub const N_LENG = 0xfe; |
| 334 | | 680 | |
| 335 | /// If a segment contains any sections marked with S_ATTR_DEBUG then all | 681 | /// If a segment contains any sections marked with S_ATTR_DEBUG then all |
| 336 | /// sections in that segment must have this attribute. No section other than | 682 | /// sections in that segment must have this attribute. No section other than |
| ... | @@ -339,10 +685,10 @@ pub const N_LENG = 0xfe; /// second stab entry with length information | ... | @@ -339,10 +685,10 @@ pub const N_LENG = 0xfe; /// second stab entry with length information |
| 339 | /// a section type S_REGULAR. The static linker will not copy section contents | 685 | /// a section type S_REGULAR. The static linker will not copy section contents |
| 340 | /// from sections with this attribute into its output file. These sections | 686 | /// from sections with this attribute into its output file. These sections |
| 341 | /// generally contain DWARF debugging info. | 687 | /// generally contain DWARF debugging info. |
| 342 | pub const S_ATTR_DEBUG = 0x02000000; /// a debug section | 688 | /// a debug section |
| | 689 | pub const S_ATTR_DEBUG = 0x02000000; |
| 343 | | 690 | |
| 344 | pub const cpu_type_t = integer_t; | 691 | pub const cpu_type_t = integer_t; |
| 345 | pub const cpu_subtype_t = integer_t; | 692 | pub const cpu_subtype_t = integer_t; |
| 346 | pub const integer_t = c_int; | 693 | pub const integer_t = c_int; |
| 347 | pub const vm_prot_t = c_int; | 694 | pub const vm_prot_t = c_int; |
| 348 | | | |