LLVM API Documentation

llvm::MachOWriter::MachOHeader Struct Reference

#include <MachOWriter.h>

Collaboration diagram for llvm::MachOWriter::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
DataBuffer 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 135 of file MachOWriter.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 149 of file MachOWriter.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 162 of file MachOWriter.h.


Constructor & Destructor Documentation

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

Definition at line 214 of file MachOWriter.h.


Member Function Documentation

unsigned llvm::MachOWriter::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 219 of file MachOWriter.h.

void llvm::MachOWriter::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 228 of file MachOWriter.h.

References magic.

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


Member Data Documentation

Definition at line 136 of file MachOWriter.h.

Referenced by setMagic().

Definition at line 137 of file MachOWriter.h.

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

Definition at line 138 of file MachOWriter.h.

Definition at line 139 of file MachOWriter.h.

Definition at line 140 of file MachOWriter.h.

Definition at line 141 of file MachOWriter.h.

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

Definition at line 145 of file MachOWriter.h.


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