LLVM API Documentation

llvm::MachOHeader Struct Reference

#include <MachO.h>

Collaboration diagram for llvm::MachOHeader:
[legend]

List of all members.

Public Types

enum  {
  MH_OBJECT = 1, MH_EXECUTE = 2, MH_FVMLIB = 3, MH_CORE = 4,
  MH_PRELOAD = 5, MH_DYLIB = 6, MH_DYLINKER = 7, MH_BUNDLE = 8,
  MH_DYLIB_STUB = 9, MH_DSYM = 10
}
enum  {
  MH_NOUNDEFS = 1 << 0, MH_INCRLINK = 1 << 1, MH_DYLDLINK = 1 << 2, MH_BINDATLOAD = 1 << 3,
  MH_PREBOUND = 1 << 4, MH_SPLIT_SEGS = 1 << 5, MH_LAZY_INIT = 1 << 6, MH_TWOLEVEL = 1 << 7,
  MH_FORCE_FLAT = 1 << 8, MH_NOMULTIDEFS = 1 << 8, MH_NOFIXPREBINDING = 1 << 10, MH_PREBINDABLE = 1 << 11,
  MH_ALLMODSBOUND = 1 << 12, MH_SUBSECTIONS_VIA_SYMBOLS = 1 << 13, MH_CANONICAL = 1 << 14, MH_WEAK_DEFINES = 1 << 15,
  MH_BINDS_TO_WEAK = 1 << 16, MH_ALLOW_STACK_EXECUTION = 1 << 17
}

Public Member Functions

 MachOHeader ()
unsigned cmdSize (bool is64Bit) const
void setMagic (bool isLittleEndian, bool is64Bit)

Public Attributes

uint32_t magic
uint32_t filetype
uint32_t ncmds
uint32_t sizeofcmds
uint32_t flags
uint32_t reserved
std::vector< unsigned char > HeaderData


Detailed Description

MachOHeader - This struct contains the header information about a specific architecture type/subtype pair that is emitted to the file.

Definition at line 101 of file MachO.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
MH_OBJECT 
MH_EXECUTE 
MH_FVMLIB 
MH_CORE 
MH_PRELOAD 
MH_DYLIB 
MH_DYLINKER 
MH_BUNDLE 
MH_DYLIB_STUB 
MH_DSYM 

Definition at line 115 of file MachO.h.

anonymous enum

Enumerator:
MH_NOUNDEFS 
MH_INCRLINK 
MH_DYLDLINK 
MH_BINDATLOAD 
MH_PREBOUND 
MH_SPLIT_SEGS 
MH_LAZY_INIT 
MH_TWOLEVEL 
MH_FORCE_FLAT 
MH_NOMULTIDEFS 
MH_NOFIXPREBINDING 
MH_PREBINDABLE 
MH_ALLMODSBOUND 
MH_SUBSECTIONS_VIA_SYMBOLS 
MH_CANONICAL 
MH_WEAK_DEFINES 
MH_BINDS_TO_WEAK 
MH_ALLOW_STACK_EXECUTION 

Definition at line 128 of file MachO.h.


Constructor & Destructor Documentation

llvm::MachOHeader::MachOHeader (  )  [inline]

Definition at line 180 of file MachO.h.


Member Function Documentation

unsigned llvm::MachOHeader::cmdSize ( bool  is64Bit  )  const [inline]

cmdSize - This routine returns the size of the MachOSection as written to disk, depending on whether the destination is a 64 bit Mach-O file.

Definition at line 185 of file MachO.h.

void llvm::MachOHeader::setMagic ( bool  isLittleEndian,
bool  is64Bit 
) [inline]

setMagic - This routine sets the appropriate value for the 'magic' field based on pointer size and endianness.

Definition at line 194 of file MachO.h.

References magic.

Referenced by llvm::MachOWriter::doInitialization().


Member Data Documentation

Definition at line 102 of file MachO.h.

Referenced by setMagic().

Definition at line 103 of file MachO.h.

Referenced by llvm::MachOWriter::doInitialization().

Definition at line 104 of file MachO.h.

Definition at line 105 of file MachO.h.

Definition at line 106 of file MachO.h.

Definition at line 107 of file MachO.h.

HeaderData - The actual data for the header which we are building up for emission to the file.

Definition at line 111 of file MachO.h.


The documentation for this struct was generated from the following file: