Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Calendar
  - Forums
  - IRC
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# core.sys.darwin.mach.loader

License:
Boost License 1.0.
Authors:
Jacob Carlborg
Version:
Initial created: Feb 20, 2010-2018

Source core/sys/darwin/mach/loade.d

struct `mach_header`;
  Represents the header of a Mach-O file for 32-bit architecture.
  uint `magic`;
    The mach magic number identifier.
  int `cputype`;
    CPU specifier.
  int `cpusubtype`;
    Machine specifier.
  uint `filetype`;
    The type of the file.
  uint `ncmds`;
    Number of load commands.
  uint `sizeofcmds`;
    The size of all the load commands.
  uint `flags`;
    Flags.
struct `mach_header_64`;
  Represents the header of a Mach-O file for 64-bit architecture.
  uint `magic`;
    The mach magic number identifier.
  int `cputype`;
    CPU specifier.
  int `cpusubtype`;
    Machine specifier.
  uint `filetype`;
    The type of the file.
  uint `ncmds`;
    Number of load commands.
  uint `sizeofcmds`;
    The size of all the load commands.
  uint `flags`;
    Flags.
  uint `reserved`;
    Reserved.
enum `MH_MAGIC`: uint;
enum `MH_CIGAM`: uint;
enum `MH_MAGIC_64`: uint;
enum `MH_CIGAM_64`: uint;
enum `SEG_PAGEZERO`: string;
enum `SEG_TEXT`: string;
enum `SECT_TEXT`: string;
enum `SECT_FVMLIB_INIT0`: string;
enum `SECT_FVMLIB_INIT1`: string;
enum `SEG_DATA`: string;
enum `SECT_DATA`: string;
enum `SECT_BSS`: string;
enum `SECT_COMMON`: string;
enum `SEG_OBJC`: string;
enum `SECT_OBJC_SYMBOLS`: string;
enum `SECT_OBJC_MODULES`: string;
enum `SECT_OBJC_STRINGS`: string;
enum `SECT_OBJC_REFS`: string;
enum `SEG_ICON`: string;
enum `SECT_ICON_HEADER`: string;
enum `SECT_ICON_TIFF`: string;
enum `SEG_LINKEDIT`: string;
enum `SEG_UNIXSTACK`: string;
enum `SEG_IMPORT`: string;
struct `segment_command`;
  Represents a segment command in a Mach-O file for 32-bit architecture.
  uint `cmd`;
    Type of load command, i.e. LC_SEGMENT.
  uint `cmdsize`;
    The size of this segment, includes size of section structs.
  char[16] `segname`;
    The name of this segment.
  uint `vmaddr`;
    Memory address of this segment.
  uint `vmsize`;
    Memory size of this segment.
  uint `fileoff`;
    File offset of this segment.
  uint `filesize`;
    Amount to map from the file.
  int `maxprot`;
    Maximum VM protection.
  int `initprot`;
    Initial VM protection.
  uint `nsects`;
    Number of sections in this segment.
  uint `flags`;
    Flags.
struct `segment_command_64`;
  Represents a segment command in a Mach-O file for 64-bit architecture.
  uint `cmd`;
    Type of load command, i.e. LC_SEGMENT.
  uint `cmdsize`;
    The size of this segment, includes size of section structs.
  char[16] `segname`;
    The name of this segment.
  long `vmaddr`;
    Memory address of this segment.
  long `vmsize`;
    Memory size of this segment.
  long `fileoff`;
    File offset of this segment.
  long `filesize`;
    Amount to map from the file.
  int `maxprot`;
    Maximum VM protection.
  int `initprot`;
    Initial VM protection.
  uint `nsects`;
    Number of sections in this segment.
  uint `flags`;
    Flags.
struct `section`;
  Represents a section in a Mach-O file for 32-bit architecture.
  char[16] `sectname`;
    The name of this this section.
  char[16] `segname`;
    The name of the segment this section belongs to.
  uint `addr`;
    The memory address of this section.
  uint `size`;
    The size of this section in bytes.
  uint `offset`;
    The file offset of this section.
  uint `align_`;
    The alignment (power of two) of this section.
  uint `reloff`;
    The file offset of the relocation entries.
  uint `nreloc`;
    The number of relocation entries.
  uint `flags`;
    Flags, section type and attributes.
  uint `reserved1`;
    Reserved.
  uint `reserved2`;
    Reserved.
struct `section_64`;
  Represents a section in a Mach-O file for 64-bit architecture.
  char[16] `sectname`;
    The name of this this section.
  char[16] `segname`;
    The name of the segment this section belongs to.
  ulong `addr`;
    The memory address of this section.
  ulong `size`;
    The size of this section in bytes.
  uint `offset`;
    The file offset of this section.
  uint `align_`;
    The alignment (power of two) of this section.
  uint `reloff`;
    The file offset of the relocation entries.
  uint `nreloc`;
    The number of relocation entries.
  uint `flags`;
    Flags, section type and attributes.
  uint `reserved1`;
    Reserved.
  uint `reserved2`;
    Reserved.
  uint `reserved3`;
    Reserved.

Copyright © 1999-2019 by the D Language Foundation | Page generated by Ddoc on Sat Jun 15 14:47:57 2019